chore(gitlab-ci): migrate dependencies to needs

This commit is contained in:
Gregor Kleen 2021-02-09 20:14:41 +01:00
parent e7fb15af26
commit 79178b8426

View File

@ -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