From 79178b84265ed2a452308791f8245d6c7b31d79f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 9 Feb 2021 20:14:41 +0100 Subject: [PATCH] chore(gitlab-ci): migrate dependencies to needs --- .gitlab-ci.yml | 56 +++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a915bc15..e0299ccee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,7 +72,8 @@ frontend:build: - npm run frontend:build before_script: *npm needs: - - npm install + - job: npm install + artifacts: true artifacts: paths: - static @@ -80,8 +81,6 @@ frontend:build: - config/webpack.yml name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" expire_in: "1 day" - dependencies: - - npm install retry: 2 interruptible: true @@ -91,9 +90,8 @@ frontend:lint: - npm run frontend:lint before_script: *npm needs: - - npm install - dependencies: - - npm install + - job: npm install + artifacts: true retry: 2 interruptible: true @@ -109,7 +107,8 @@ yesod:build:dev: script: - stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip needs: - - frontend:build + - job: frontend:build + artifacts: true before_script: &haskell - rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d - install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list @@ -127,8 +126,6 @@ yesod:build:dev: - bin/ name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" expire_in: "1 week" - dependencies: - - frontend:build rules: - if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/ @@ -145,14 +142,13 @@ yesod:build: script: - stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip needs: - - frontend:build + - job: frontend:build + artifacts: true before_script: *haskell artifacts: paths: - bin/ name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" - dependencies: - - frontend:build rules: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/ @@ -172,14 +168,13 @@ yesod:build:profile: script: - stack build --profile --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip needs: - - frontend:build + - job: frontend:build + artifacts: true before_script: *haskell artifacts: paths: - bin/ name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" - dependencies: - - frontend:build rules: - if: $CI_COMMIT_REF_NAME =~ /(^|\/)profile($|\/)/ @@ -198,7 +193,8 @@ frontend:test: script: - npm run frontend:test needs: - - npm install + - job: npm install + artifacts: true before_script: - rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d - install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list @@ -209,18 +205,15 @@ frontend:test: - npm install -g npm - hash -r - apt-get install -y --no-install-recommends chromium-browser - dependencies: - - npm install retry: 2 interruptible: true parse-changelog: cache: {} stage: prepare release - dependencies: - - npm install needs: - - npm install + - job: npm install + artifacts: true rules: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/ when: always @@ -246,14 +239,15 @@ parse-changelog: upload: cache: {} + variables: + GIT_STRATEGY: none stage: upload packages image: curlimages/curl:latest needs: - - yesod:build - - parse-changelog - dependencies: - - yesod:build - - parse-changelog + - job: yesod:build + artifacts: true + - job: parse-changelog + artifacts: true rules: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/ when: always @@ -271,13 +265,15 @@ upload: release: cache: {} + variables: + GIT_STRATEGY: none stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest needs: - - upload - - parse-changelog - dependencies: - - parse-changelog + - job: upload + artifacts: false + - job: parse-changelog + artifacts: true rules: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/ when: always