fradrive/.gitlab-ci/frontend.yml

73 lines
1.9 KiB
YAML

# SPDX-FileCopyrightText: 2024 Sarah Vaupel <sarah.vaupel@uniworx.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
### IMPORTANT NOTICE ###
# Our pipeline consists of static and dynamic parts.
#
# This file only contains the dynamic parts of our pipeline.
# Static jobs are defined in .gitlab-ci.yml.
#
# The marker "#dyn#" (without quotes) will be replaced by concrete values.
###
variables:
FRONTEND_IMAGE_VERSION: #dyn#
stages:
- compile
- lint
- test
default:
image:
name: ${CI_REGISTRY_IMAGE}/frontend/${CI_COMMIT_REF_SLUG}:${FRONTEND_IMAGE_VERSION}
entrypoint: [""]
docker:
platform: x86_64
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
compile:
stage: compile
# image: &frontend-image ${CI_REGISTRY_IMAGE}/frontend/${CI_COMMIT_REF_SLUG}:${FRONTEND_IMAGE_VERSION}
script:
# - &load-frontend-image zcat docker/frontend/image.tar.gz | podman image load
# - make -- --docker-run-frontend-build FRADRIVE_SERVICE=frontend CONTAINER_RUNNER=podman-compose
- make -- frontend-build FRADRIVE_SERVICE=frontend
artifacts:
paths:
- /fradrive/node_modules
- /fradrive/well-known
cache:
- &frontend-cache
key: default-frontend
paths:
- /fradrive/.npm/
- /fradrive/.well-known-cache/
lint:
stage: lint
needs:
# image: *frontend-image
script:
# - *load-frontend-image
# - make -- --docker-run-frontend-lint FRADRIVE_SERVICE=frontend CONTAINER_RUNNER=podman-compose
- make -- frontend-lint FRADRIVE_SERVICE=frontend
cache: *frontend-cache
test:
stage: test
needs:
- compile
# image: *frontend-image
script:
# - *load-frontend-image
# - make -- --docker-run-frontend-test FRADRIVE_SERVICE=frontend CONTAINER_RUNNER=podman-compose
- make -- frontend-test FRADRIVE_SERVICE=frontend
cache: *frontend-cache