chore(gitlab-ci): run profiling build automatically

This commit is contained in:
Gregor Kleen 2021-02-02 20:08:09 +01:00
parent 09ce1bb035
commit 879e7123e8

View File

@ -51,7 +51,7 @@ npm install:
artifacts: artifacts:
paths: paths:
- node_modules/ - node_modules/
name: "${CI_JOB_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day" expire_in: "1 day"
retry: 2 retry: 2
interruptible: true interruptible: true
@ -68,7 +68,7 @@ frontend:build:
- static - static
- well-known - well-known
- config/webpack.yml - config/webpack.yml
name: "${CI_JOB_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day" expire_in: "1 day"
dependencies: dependencies:
- npm install - npm install
@ -112,14 +112,17 @@ yesod:build:dev:
artifacts: artifacts:
paths: paths:
- bin/ - bin/
name: "${CI_JOB_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 week" expire_in: "1 week"
dependencies: dependencies:
- frontend:build - frontend:build
only: rules:
variables: - if: $CI_COMMIT_REF_NAME !~ /^v[0-9].*/
- $CI_COMMIT_REF_NAME !~ /^v[0-9].*/ when: always
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
when: manual
retry: 2 retry: 2
interruptible: true interruptible: true
@ -135,13 +138,16 @@ yesod:build:
artifacts: artifacts:
paths: paths:
- bin/ - bin/
name: "${CI_JOB_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
dependencies: dependencies:
- frontend:build - frontend:build
only: rules:
variables: - if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
- $CI_COMMIT_REF_NAME =~ /^v[0-9].*/ when: always
- if: $CI_COMMIT_REF_NAME !~ /^v[0-9].*/
when: manual
retry: 2 retry: 2
interruptible: true interruptible: true
resource_group: ram resource_group: ram
@ -151,8 +157,6 @@ yesod:build:profile:
<<: *global_cache <<: *global_cache
policy: pull policy: pull
services: *build-services
stage: yesod:build stage: yesod:build
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
@ -162,11 +166,15 @@ yesod:build:profile:
artifacts: artifacts:
paths: paths:
- bin/ - bin/
name: "${CI_JOB_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
dependencies: dependencies:
- frontend:build - frontend:build
when: manual rules:
- if: $CI_COMMIT_REF_NAME =~ /(^|\/)profile($|\/)/
when: always
- if: $CI_COMMIT_REF_NAME !~ /(^|\/)profile($|\/)/
when: manual
retry: 2 retry: 2
interruptible: true interruptible: true