chore(gitlab-ci): migrate dependencies to needs
This commit is contained in:
parent
e7fb15af26
commit
79178b8426
@ -72,7 +72,8 @@ frontend:build:
|
|||||||
- npm run frontend:build
|
- npm run frontend:build
|
||||||
before_script: *npm
|
before_script: *npm
|
||||||
needs:
|
needs:
|
||||||
- npm install
|
- job: npm install
|
||||||
|
artifacts: true
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- static
|
- static
|
||||||
@ -80,8 +81,6 @@ frontend:build:
|
|||||||
- config/webpack.yml
|
- config/webpack.yml
|
||||||
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
||||||
expire_in: "1 day"
|
expire_in: "1 day"
|
||||||
dependencies:
|
|
||||||
- npm install
|
|
||||||
retry: 2
|
retry: 2
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
@ -91,9 +90,8 @@ frontend:lint:
|
|||||||
- npm run frontend:lint
|
- npm run frontend:lint
|
||||||
before_script: *npm
|
before_script: *npm
|
||||||
needs:
|
needs:
|
||||||
- npm install
|
- job: npm install
|
||||||
dependencies:
|
artifacts: true
|
||||||
- npm install
|
|
||||||
retry: 2
|
retry: 2
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
@ -109,7 +107,8 @@ yesod:build:dev:
|
|||||||
script:
|
script:
|
||||||
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip
|
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip
|
||||||
needs:
|
needs:
|
||||||
- frontend:build
|
- job: frontend:build
|
||||||
|
artifacts: true
|
||||||
before_script: &haskell
|
before_script: &haskell
|
||||||
- rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d
|
- rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d
|
||||||
- install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list
|
- install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list
|
||||||
@ -127,8 +126,6 @@ yesod:build:dev:
|
|||||||
- bin/
|
- bin/
|
||||||
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
||||||
expire_in: "1 week"
|
expire_in: "1 week"
|
||||||
dependencies:
|
|
||||||
- frontend:build
|
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/
|
- if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/
|
||||||
@ -145,14 +142,13 @@ yesod:build:
|
|||||||
script:
|
script:
|
||||||
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip
|
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip
|
||||||
needs:
|
needs:
|
||||||
- frontend:build
|
- job: frontend:build
|
||||||
|
artifacts: true
|
||||||
before_script: *haskell
|
before_script: *haskell
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- bin/
|
- bin/
|
||||||
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
||||||
dependencies:
|
|
||||||
- frontend:build
|
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
@ -172,14 +168,13 @@ yesod:build:profile:
|
|||||||
script:
|
script:
|
||||||
- stack build --profile --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip
|
- stack build --profile --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip
|
||||||
needs:
|
needs:
|
||||||
- frontend:build
|
- job: frontend:build
|
||||||
|
artifacts: true
|
||||||
before_script: *haskell
|
before_script: *haskell
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- bin/
|
- bin/
|
||||||
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
|
||||||
dependencies:
|
|
||||||
- frontend:build
|
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /(^|\/)profile($|\/)/
|
- if: $CI_COMMIT_REF_NAME =~ /(^|\/)profile($|\/)/
|
||||||
@ -198,7 +193,8 @@ frontend:test:
|
|||||||
script:
|
script:
|
||||||
- npm run frontend:test
|
- npm run frontend:test
|
||||||
needs:
|
needs:
|
||||||
- npm install
|
- job: npm install
|
||||||
|
artifacts: true
|
||||||
before_script:
|
before_script:
|
||||||
- rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d
|
- rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d
|
||||||
- install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list
|
- install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list
|
||||||
@ -209,18 +205,15 @@ frontend:test:
|
|||||||
- npm install -g npm
|
- npm install -g npm
|
||||||
- hash -r
|
- hash -r
|
||||||
- apt-get install -y --no-install-recommends chromium-browser
|
- apt-get install -y --no-install-recommends chromium-browser
|
||||||
dependencies:
|
|
||||||
- npm install
|
|
||||||
retry: 2
|
retry: 2
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
parse-changelog:
|
parse-changelog:
|
||||||
cache: {}
|
cache: {}
|
||||||
stage: prepare release
|
stage: prepare release
|
||||||
dependencies:
|
|
||||||
- npm install
|
|
||||||
needs:
|
needs:
|
||||||
- npm install
|
- job: npm install
|
||||||
|
artifacts: true
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: always
|
||||||
@ -246,14 +239,15 @@ parse-changelog:
|
|||||||
|
|
||||||
upload:
|
upload:
|
||||||
cache: {}
|
cache: {}
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
stage: upload packages
|
stage: upload packages
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
needs:
|
needs:
|
||||||
- yesod:build
|
- job: yesod:build
|
||||||
- parse-changelog
|
artifacts: true
|
||||||
dependencies:
|
- job: parse-changelog
|
||||||
- yesod:build
|
artifacts: true
|
||||||
- parse-changelog
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: always
|
||||||
@ -271,13 +265,15 @@ upload:
|
|||||||
|
|
||||||
release:
|
release:
|
||||||
cache: {}
|
cache: {}
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
stage: release
|
stage: release
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
needs:
|
needs:
|
||||||
- upload
|
- job: upload
|
||||||
- parse-changelog
|
artifacts: false
|
||||||
dependencies:
|
- job: parse-changelog
|
||||||
- parse-changelog
|
artifacts: true
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: always
|
||||||
|
|||||||
Reference in New Issue
Block a user