From 08a93abb8ff53fc19b9517df29e4ac787f61641a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 17 Jan 2024 04:53:37 +0100 Subject: [PATCH] chore(gitlab-ci): restructure stages --- .gitlab-ci.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f0d2319a..1b51b79e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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