chore(gitlab-ci): cleanup and deduplicate stuff

This commit is contained in:
Sarah Vaupel 2024-07-08 12:41:06 +02:00
parent 46a46b9b13
commit 8306bc20e9

View File

@ -16,7 +16,7 @@ variables:
TRANSFER_METER_FREQUENCY: "2s"
# docker
ENV_USER: "fradrive-env"
ENV_USER: fradrive-env
# backend
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
@ -31,6 +31,11 @@ default:
user: ${ENV_USER}
before_script:
- chown -R ${ENV_USER} . # change project directory ownership to (non-root) user inside docker container
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
stages:
@ -43,26 +48,19 @@ stages:
- release
# TODO: rename to "frontend dependencies"
frontend dependencies:
stage: setup
cache:
- &npm-cache
key: default-npm
paths:
- .npm
- node_modules
paths: &npm-paths
- node_modules/
- .npm/
- .npmrc
script:
- make node_modules
artifacts:
paths:
- node_modules/
- .npm/
- .npmrc
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
paths: *npm-paths
well-known:
stage: setup
@ -80,10 +78,6 @@ well-known:
paths:
- well-known/
- .well-known-cache/
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
backend dependencies:
stage: setup
@ -97,11 +91,6 @@ backend dependencies:
artifacts:
paths:
- .stack
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
frontend lint:
stage: lint
@ -114,8 +103,6 @@ frontend lint:
artifacts: true
- job: well-known
artifacts: true
retry: 2
interruptible: true
backend lint:
stage: lint
@ -126,9 +113,6 @@ backend lint:
needs:
- job: backend dependencies
artifacts: true
retry: 2
interruptible: true
frontend build:
stage: build
@ -147,10 +131,6 @@ frontend build:
paths:
- static/
- config/webpack.yml
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
# TODO rename to uniworx?
backend build:
@ -177,10 +157,6 @@ backend build:
artifacts:
paths:
- bin/
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
resource_group: ram
uniworxdb:
@ -195,10 +171,6 @@ uniworxdb:
artifacts:
paths:
- bin/uniworxdb
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
uniworx:exe:uniworxload:
stage: build
@ -214,11 +186,6 @@ uniworx:exe:uniworxload:
artifacts:
paths:
- uniworx:exe:uniworxload.nar.xz
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
# check:
# stage: test
@ -231,8 +198,6 @@ uniworx:exe:uniworxload:
# artifacts: false
# - job: frontend build
# artifacts: true
# retry: 2
# interruptible: true
frontend test:
stage: test
@ -242,8 +207,6 @@ frontend test:
needs:
- job: frontend dependencies
artifacts: true
retry: 2
interruptible: true
backend test:
stage: test
@ -253,9 +216,6 @@ backend test:
needs:
- job: backend dependencies
artifacts: true
retry: 2
interruptible: true
container:
stage: container
@ -274,10 +234,6 @@ container:
artifacts:
paths:
- uniworx.tar.gz
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
rules: &release-rules
- if: $CI_COMMIT_TAG =~ /^v/
test container:
@ -297,10 +253,6 @@ test container:
artifacts:
paths:
- uniworx.tar.gz
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
rules: &test-release-rules
- if: $CI_COMMIT_TAG =~ /^t/
@ -323,8 +275,6 @@ parse changelog:
- .current-changelog.md
name: "changelog-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
parse test changelog:
stage: prepare release
needs:
@ -343,9 +293,6 @@ parse test changelog:
- .current-version
- .current-changelog.md
name: "changelog-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true
upload container:
variables:
@ -369,7 +316,6 @@ upload container:
- job: backend test # sanity
artifacts: false
rules: *release-rules
retry: 2
upload test container:
variables:
GIT_STRATEGY: none
@ -392,7 +338,6 @@ upload test container:
- job: backend test # sanity
artifacts: false
rules: *test-release-rules
retry: 2
release:
variables:
@ -413,6 +358,7 @@ release:
artifacts: false
- job: parse changelog
artifacts: true
retry: 0
test release:
variables:
GIT_STRATEGY: none
@ -432,3 +378,4 @@ test release:
artifacts: false
- job: parse test changelog
artifacts: true
retry: 0