chore(gitlab-ci): restructure stages

This commit is contained in:
Sarah Vaupel 2024-01-17 04:53:37 +01:00
parent 65468f53aa
commit 08a93abb8f

View File

@ -25,16 +25,16 @@ variables:
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
stages:
- frontend:build
- frontend:test
- backend:build
- setup
- lint
- build
- test
- container:build
- container
- prepare release
- release
node modules:
stage: frontend:build
stage: setup
cache:
- &npm-cache
key: default-npm
@ -60,8 +60,19 @@ node modules:
retry: 2
interruptible: true
frontend lint:
stage: lint
script:
- "nix-shell --comand 'make frontend-lint'"
before_script: *nix-before
needs:
- job: node modules
artifacts: true
retry: 2
interruptible: true
frontend build:
stage: frontend:build
stage: build
cache:
- &frontend-cache
key: default-frontend
@ -83,19 +94,8 @@ frontend build:
retry: 2
interruptible: true
frontend lint:
stage: frontend:test
script:
- "nix-shell --comand 'make frontend-lint'"
before_script: *nix-before
needs:
- job: node modules
artifacts: true
retry: 2
interruptible: true
uniworx:lib:uniworx:
stage: backend:build
stage: build
script:
- xzcat frontend.nar.xz | nix-store --import
- nix -L build -o result ".#uniworx:lib:uniworx"
@ -115,7 +115,7 @@ uniworx:lib:uniworx:
interruptible: true
uniworx:exe:uniworx:
stage: backend:build
stage: build
script:
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
- nix -L build -o result ".#uniworx:exe:uniworx"
@ -137,7 +137,7 @@ uniworx:exe:uniworx:
interruptible: true
uniworx:exe:uniworxdb:
stage: backend:build
stage: build
script:
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
- nix -L build -o result ".#uniworx:exe:uniworxdb"
@ -159,7 +159,7 @@ uniworx:exe:uniworxdb:
interruptible: true
uniworx:exe:uniworxload:
stage: backend:build
stage: build
script:
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
- nix -L build -o result ".#uniworx:exe:uniworxload"
@ -198,7 +198,7 @@ check:
interruptible: true
container:
stage: container:build
stage: container
script:
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxDocker") uniworx.tar.gz
@ -224,7 +224,7 @@ container:
rules: &release-rules
- if: $CI_COMMIT_TAG =~ /^v/
test container:
stage: container:build
stage: container
script:
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxTestDocker") uniworx.tar.gz