chore(gitlab-ci): cleanup
This commit is contained in:
parent
8306bc20e9
commit
aec1daf8ac
@ -15,22 +15,22 @@ variables:
|
|||||||
AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials"
|
AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials"
|
||||||
TRANSFER_METER_FREQUENCY: "2s"
|
TRANSFER_METER_FREQUENCY: "2s"
|
||||||
|
|
||||||
# docker
|
# Docker
|
||||||
ENV_USER: fradrive-env
|
ENV_USER: fradrive-env
|
||||||
|
|
||||||
# backend
|
# Backend
|
||||||
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
|
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
image:
|
image:
|
||||||
name: registry.uniworx.de/fradrive/fradrive/fradrive-env:latest # bookworm
|
name: registry.uniworx.de/fradrive/fradrive/fradrive-env:latest # Debian 12.5 Bookworm
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
docker:
|
docker:
|
||||||
platform: x86_64
|
platform: x86_64
|
||||||
user: ${ENV_USER}
|
user: ${ENV_USER}
|
||||||
before_script:
|
before_script:
|
||||||
- chown -R ${ENV_USER} . # change project directory ownership to (non-root) user inside docker container
|
- chown -R ${ENV_USER} . # Change project directory ownership to (non-root) user inside docker container
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
||||||
expire_in: "1 day"
|
expire_in: "1 day"
|
||||||
@ -40,8 +40,8 @@ default:
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- setup
|
- setup
|
||||||
- lint
|
|
||||||
- build
|
- build
|
||||||
|
- lint
|
||||||
- test
|
- test
|
||||||
- container
|
- container
|
||||||
- prepare release
|
- prepare release
|
||||||
@ -92,28 +92,6 @@ backend dependencies:
|
|||||||
paths:
|
paths:
|
||||||
- .stack
|
- .stack
|
||||||
|
|
||||||
frontend lint:
|
|
||||||
stage: lint
|
|
||||||
script:
|
|
||||||
- make frontend-lint
|
|
||||||
cache:
|
|
||||||
- *frontend-cache
|
|
||||||
needs:
|
|
||||||
- job: frontend dependencies
|
|
||||||
artifacts: true
|
|
||||||
- job: well-known
|
|
||||||
artifacts: true
|
|
||||||
|
|
||||||
backend lint:
|
|
||||||
stage: lint
|
|
||||||
cache:
|
|
||||||
- *stack-cache
|
|
||||||
script:
|
|
||||||
- make backend-lint-prod
|
|
||||||
needs:
|
|
||||||
- job: backend dependencies
|
|
||||||
artifacts: true
|
|
||||||
|
|
||||||
frontend build:
|
frontend build:
|
||||||
stage: build
|
stage: build
|
||||||
cache:
|
cache:
|
||||||
@ -132,8 +110,7 @@ frontend build:
|
|||||||
- static/
|
- static/
|
||||||
- config/webpack.yml
|
- config/webpack.yml
|
||||||
|
|
||||||
# TODO rename to uniworx?
|
uniworx:
|
||||||
backend build:
|
|
||||||
stage: build
|
stage: build
|
||||||
cache:
|
cache:
|
||||||
- *stack-cache
|
- *stack-cache
|
||||||
@ -164,6 +141,7 @@ uniworxdb:
|
|||||||
script:
|
script:
|
||||||
- make bin/uniworxdb
|
- make bin/uniworxdb
|
||||||
needs:
|
needs:
|
||||||
|
# TODO: no frontend needed
|
||||||
- job: frontend dependencies # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
@ -172,6 +150,7 @@ uniworxdb:
|
|||||||
paths:
|
paths:
|
||||||
- bin/uniworxdb
|
- bin/uniworxdb
|
||||||
|
|
||||||
|
# TODO: rewrite
|
||||||
uniworx:exe:uniworxload:
|
uniworx:exe:uniworxload:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@ -187,17 +166,30 @@ uniworx:exe:uniworxload:
|
|||||||
paths:
|
paths:
|
||||||
- uniworx:exe:uniworxload.nar.xz
|
- uniworx:exe:uniworxload.nar.xz
|
||||||
|
|
||||||
# check:
|
frontend lint:
|
||||||
# stage: test
|
stage: lint
|
||||||
# script:
|
script:
|
||||||
# - xzcat frontend.nar.xz | nix-store --import
|
- make frontend-lint
|
||||||
# - xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
cache:
|
||||||
# - nix -L flake check .
|
- *frontend-cache
|
||||||
# needs:
|
needs:
|
||||||
# - job: frontend dependencies # transitive
|
- job: frontend dependencies
|
||||||
# artifacts: false
|
artifacts: true
|
||||||
# - job: frontend build
|
- job: well-known # TODO: is this really needed?
|
||||||
# artifacts: true
|
artifacts: true
|
||||||
|
|
||||||
|
backend lint:
|
||||||
|
stage: lint
|
||||||
|
cache:
|
||||||
|
- *stack-cache
|
||||||
|
script:
|
||||||
|
# TODO: - make backend-lint-dev
|
||||||
|
- make backend-lint-prod
|
||||||
|
needs:
|
||||||
|
- job: backend dependencies
|
||||||
|
artifacts: true
|
||||||
|
- job: uniworx
|
||||||
|
artifacts: true
|
||||||
|
|
||||||
frontend test:
|
frontend test:
|
||||||
stage: test
|
stage: test
|
||||||
@ -207,16 +199,22 @@ frontend test:
|
|||||||
needs:
|
needs:
|
||||||
- job: frontend dependencies
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
|
# TODO: configure report artifacts
|
||||||
|
|
||||||
backend test:
|
backend test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- "nix shell .#gnumake .#stack --command make backend-test"
|
- make backend-test-prod
|
||||||
cache: *stack-cache
|
cache: *stack-cache
|
||||||
needs:
|
needs:
|
||||||
- job: backend dependencies
|
- job: backend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
|
- job: uniworx
|
||||||
|
artifacts: true
|
||||||
|
# TODO: configure report artifacts
|
||||||
|
|
||||||
|
# TODO: unify prod and test versions
|
||||||
|
# TODO: rewrite
|
||||||
container:
|
container:
|
||||||
stage: container
|
stage: container
|
||||||
script:
|
script:
|
||||||
@ -236,6 +234,7 @@ container:
|
|||||||
- uniworx.tar.gz
|
- uniworx.tar.gz
|
||||||
rules: &release-rules
|
rules: &release-rules
|
||||||
- if: $CI_COMMIT_TAG =~ /^v/
|
- if: $CI_COMMIT_TAG =~ /^v/
|
||||||
|
# TODO: rewrite
|
||||||
test container:
|
test container:
|
||||||
stage: container
|
stage: container
|
||||||
script:
|
script:
|
||||||
@ -256,6 +255,8 @@ test container:
|
|||||||
rules: &test-release-rules
|
rules: &test-release-rules
|
||||||
- if: $CI_COMMIT_TAG =~ /^t/
|
- if: $CI_COMMIT_TAG =~ /^t/
|
||||||
|
|
||||||
|
# TODO: unify prod and test versions
|
||||||
|
# TODO: rewrite
|
||||||
parse changelog:
|
parse changelog:
|
||||||
stage: prepare release
|
stage: prepare release
|
||||||
needs:
|
needs:
|
||||||
@ -275,6 +276,7 @@ parse changelog:
|
|||||||
- .current-changelog.md
|
- .current-changelog.md
|
||||||
name: "changelog-${CI_COMMIT_SHORT_SHA}"
|
name: "changelog-${CI_COMMIT_SHORT_SHA}"
|
||||||
expire_in: "1 day"
|
expire_in: "1 day"
|
||||||
|
# TODO: rewrite
|
||||||
parse test changelog:
|
parse test changelog:
|
||||||
stage: prepare release
|
stage: prepare release
|
||||||
needs:
|
needs:
|
||||||
@ -294,6 +296,8 @@ parse test changelog:
|
|||||||
- .current-changelog.md
|
- .current-changelog.md
|
||||||
name: "changelog-${CI_COMMIT_SHORT_SHA}"
|
name: "changelog-${CI_COMMIT_SHORT_SHA}"
|
||||||
|
|
||||||
|
# TODO: unify prod and test versions
|
||||||
|
# TODO: rewrite
|
||||||
upload container:
|
upload container:
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
@ -316,6 +320,7 @@ upload container:
|
|||||||
- job: backend test # sanity
|
- job: backend test # sanity
|
||||||
artifacts: false
|
artifacts: false
|
||||||
rules: *release-rules
|
rules: *release-rules
|
||||||
|
# TODO: rewrite
|
||||||
upload test container:
|
upload test container:
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
@ -339,6 +344,8 @@ upload test container:
|
|||||||
artifacts: false
|
artifacts: false
|
||||||
rules: *test-release-rules
|
rules: *test-release-rules
|
||||||
|
|
||||||
|
# TODO: unify prod and test versions
|
||||||
|
# TODO: rewrite
|
||||||
release:
|
release:
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
@ -359,6 +366,7 @@ release:
|
|||||||
- job: parse changelog
|
- job: parse changelog
|
||||||
artifacts: true
|
artifacts: true
|
||||||
retry: 0
|
retry: 0
|
||||||
|
# TODO: rewrite
|
||||||
test release:
|
test release:
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
|
|||||||
Reference in New Issue
Block a user