chore(gitlab-ci): more cleanup
This commit is contained in:
parent
a6db39c056
commit
46a46b9b13
@ -10,29 +10,28 @@
|
|||||||
# - if: $CI_COMMIT_TAG =~ /^t/
|
# - if: $CI_COMMIT_TAG =~ /^t/
|
||||||
# - if: $CI_COMMIT_TAG =~ /^d/
|
# - if: $CI_COMMIT_TAG =~ /^d/
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# TODO: old vars; review and maybe remove
|
||||||
|
AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials"
|
||||||
|
TRANSFER_METER_FREQUENCY: "2s"
|
||||||
|
|
||||||
|
# docker
|
||||||
|
ENV_USER: "fradrive-env"
|
||||||
|
|
||||||
|
# backend
|
||||||
|
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 # bookworm
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
docker:
|
docker:
|
||||||
platform: x86_64
|
platform: x86_64
|
||||||
user: fradrive-env
|
user: ${ENV_USER}
|
||||||
before_script:
|
before_script:
|
||||||
- chown -R ${ENV_USER} . #
|
- chown -R ${ENV_USER} . # change project directory ownership to (non-root) user inside docker container
|
||||||
|
|
||||||
variables:
|
|
||||||
NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-23.11/nixexprs.tar.xz"
|
|
||||||
AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials"
|
|
||||||
|
|
||||||
TRANSFER_METER_FREQUENCY: "2s"
|
|
||||||
|
|
||||||
NIX_CONFIG: |-
|
|
||||||
extra-substituters = https://cache.iog.io
|
|
||||||
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
|
|
||||||
|
|
||||||
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
|
|
||||||
|
|
||||||
ENV_USER: "fradrive-env"
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- setup
|
- setup
|
||||||
@ -43,8 +42,9 @@ stages:
|
|||||||
- prepare release
|
- prepare release
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
|
||||||
# TODO: rename to "frontend dependencies"
|
# TODO: rename to "frontend dependencies"
|
||||||
node modules:
|
frontend dependencies:
|
||||||
stage: setup
|
stage: setup
|
||||||
cache:
|
cache:
|
||||||
- &npm-cache
|
- &npm-cache
|
||||||
@ -69,7 +69,7 @@ well-known:
|
|||||||
script:
|
script:
|
||||||
- make well-known
|
- make well-known
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
cache:
|
cache:
|
||||||
- &frontend-cache
|
- &frontend-cache
|
||||||
@ -93,7 +93,6 @@ backend dependencies:
|
|||||||
paths:
|
paths:
|
||||||
- .stack
|
- .stack
|
||||||
script:
|
script:
|
||||||
- echo ${LC_ALL} ${LANG}
|
|
||||||
- make backend-dependencies-prod
|
- make backend-dependencies-prod
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
@ -111,7 +110,7 @@ frontend lint:
|
|||||||
cache:
|
cache:
|
||||||
- *frontend-cache
|
- *frontend-cache
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: well-known
|
- job: well-known
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -138,7 +137,7 @@ frontend build:
|
|||||||
script:
|
script:
|
||||||
- make frontend-build
|
- make frontend-build
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: well-known
|
- job: well-known
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -163,7 +162,7 @@ backend build:
|
|||||||
- cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint
|
- cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint
|
||||||
- cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod
|
- cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: well-known
|
- job: well-known
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -189,7 +188,7 @@ uniworxdb:
|
|||||||
script:
|
script:
|
||||||
- make bin/uniworxdb
|
- make bin/uniworxdb
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -208,7 +207,7 @@ uniworx:exe:uniworxload:
|
|||||||
- nix -L build -o result ".#uniworx:exe:uniworxload"
|
- nix -L build -o result ".#uniworx:exe:uniworxload"
|
||||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworxload.nar.xz
|
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworxload.nar.xz
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -228,7 +227,7 @@ uniworx:exe:uniworxload:
|
|||||||
# - xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
# - xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||||
# - nix -L flake check .
|
# - nix -L flake check .
|
||||||
# needs:
|
# needs:
|
||||||
# - job: node modules # transitive
|
# - job: frontend dependencies # transitive
|
||||||
# artifacts: false
|
# artifacts: false
|
||||||
# - job: frontend build
|
# - job: frontend build
|
||||||
# artifacts: true
|
# artifacts: true
|
||||||
@ -241,7 +240,7 @@ frontend test:
|
|||||||
- make frontend-test
|
- make frontend-test
|
||||||
cache: *frontend-cache
|
cache: *frontend-cache
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
retry: 2
|
retry: 2
|
||||||
interruptible: true
|
interruptible: true
|
||||||
@ -264,7 +263,7 @@ container:
|
|||||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||||
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxDocker") uniworx.tar.gz
|
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxDocker") uniworx.tar.gz
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -287,7 +286,7 @@ test container:
|
|||||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||||
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxTestDocker") uniworx.tar.gz
|
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxTestDocker") uniworx.tar.gz
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -308,7 +307,7 @@ test container:
|
|||||||
parse changelog:
|
parse changelog:
|
||||||
stage: prepare release
|
stage: prepare release
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
rules: *release-rules
|
rules: *release-rules
|
||||||
script:
|
script:
|
||||||
@ -329,7 +328,7 @@ parse changelog:
|
|||||||
parse test changelog:
|
parse test changelog:
|
||||||
stage: prepare release
|
stage: prepare release
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: frontend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
rules: *test-release-rules
|
rules: *test-release-rules
|
||||||
script:
|
script:
|
||||||
@ -357,7 +356,7 @@ upload container:
|
|||||||
- skopeo --insecure-policy copy --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker-archive://$(pwd)/uniworx.tar.gz docker://${CI_REGISTRY_IMAGE}:${VERSION}
|
- skopeo --insecure-policy copy --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker-archive://$(pwd)/uniworx.tar.gz docker://${CI_REGISTRY_IMAGE}:${VERSION}
|
||||||
- skopeo --insecure-policy copy --src-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker://${CI_REGISTRY_IMAGE}:${VERSION} docker://${CI_REGISTRY_IMAGE}:latest
|
- skopeo --insecure-policy copy --src-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker://${CI_REGISTRY_IMAGE}:${VERSION} docker://${CI_REGISTRY_IMAGE}:latest
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -380,7 +379,7 @@ upload test container:
|
|||||||
- skopeo --insecure-policy copy --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker-archive://$(pwd)/uniworx.tar.gz docker://${CI_REGISTRY}/fradrive/fradrive/test:${CI_COMMIT_REF_NAME}
|
- skopeo --insecure-policy copy --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker-archive://$(pwd)/uniworx.tar.gz docker://${CI_REGISTRY}/fradrive/fradrive/test:${CI_COMMIT_REF_NAME}
|
||||||
- skopeo --insecure-policy copy --src-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker://${CI_REGISTRY}/fradrive/fradrive/test:${CI_COMMIT_REF_NAME} docker://${CI_REGISTRY}/fradrive/fradrive/test:latest
|
- skopeo --insecure-policy copy --src-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker://${CI_REGISTRY}/fradrive/fradrive/test:${CI_COMMIT_REF_NAME} docker://${CI_REGISTRY}/fradrive/fradrive/test:latest
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: frontend dependencies # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend build # transitive
|
- job: frontend build # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
|
|||||||
Reference in New Issue
Block a user