Merge branch 'ci-default-branch' into 'develop'
GitLab CI: use $CI_DEFAULT_BRANCH, don't run danger on develop See merge request soapbox-pub/soapbox!2097
This commit is contained in:
commit
1697eb7f32
1 changed files with 12 additions and 22 deletions
|
@ -3,6 +3,9 @@ image: node:18
|
||||||
variables:
|
variables:
|
||||||
NODE_ENV: test
|
NODE_ENV: test
|
||||||
|
|
||||||
|
default:
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
cache: &cache
|
cache: &cache
|
||||||
key:
|
key:
|
||||||
files:
|
files:
|
||||||
|
@ -25,7 +28,6 @@ deps:
|
||||||
cache:
|
cache:
|
||||||
<<: *cache
|
<<: *cache
|
||||||
policy: push
|
policy: push
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
danger:
|
danger:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -33,8 +35,10 @@ danger:
|
||||||
# https://github.com/danger/danger-js/issues/1029#issuecomment-998915436
|
# https://github.com/danger/danger-js/issues/1029#issuecomment-998915436
|
||||||
- export CI_MERGE_REQUEST_IID=${CI_OPEN_MERGE_REQUESTS#*!}
|
- export CI_MERGE_REQUEST_IID=${CI_OPEN_MERGE_REQUESTS#*!}
|
||||||
- npx danger ci
|
- npx danger ci
|
||||||
|
except:
|
||||||
|
refs:
|
||||||
|
- $CI_DEFAULT_BRANCH
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
lint-js:
|
lint-js:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -47,7 +51,6 @@ lint-js:
|
||||||
- "**/*.tsx"
|
- "**/*.tsx"
|
||||||
- ".eslintignore"
|
- ".eslintignore"
|
||||||
- ".eslintrc.js"
|
- ".eslintrc.js"
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
lint-sass:
|
lint-sass:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -57,7 +60,6 @@ lint-sass:
|
||||||
- "**/*.scss"
|
- "**/*.scss"
|
||||||
- "**/*.css"
|
- "**/*.css"
|
||||||
- ".stylelintrc.json"
|
- ".stylelintrc.json"
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
jest:
|
jest:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -80,17 +82,16 @@ jest:
|
||||||
coverage_report:
|
coverage_report:
|
||||||
coverage_format: cobertura
|
coverage_format: cobertura
|
||||||
path: .coverage/cobertura-coverage.xml
|
path: .coverage/cobertura-coverage.xml
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
nginx-test:
|
nginx-test:
|
||||||
stage: test
|
stage: test
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
before_script: cp installation/mastodon.conf /etc/nginx/conf.d/default.conf
|
before_script:
|
||||||
|
- cp installation/mastodon.conf /etc/nginx/conf.d/default.conf
|
||||||
script: nginx -t
|
script: nginx -t
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- "installation/mastodon.conf"
|
- "installation/mastodon.conf"
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
build-production:
|
build-production:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -105,7 +106,6 @@ build-production:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- static
|
- static
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
docs-deploy:
|
docs-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -116,10 +116,9 @@ docs-deploy:
|
||||||
- curl -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' https://gitlab.com/api/v4/projects/15685485/trigger/pipeline
|
- curl -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' https://gitlab.com/api/v4/projects/15685485/trigger/pipeline
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- develop
|
- $CI_DEFAULT_BRANCH
|
||||||
changes:
|
changes:
|
||||||
- "docs/**/*"
|
- "docs/**/*"
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
review:
|
review:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -129,7 +128,6 @@ review:
|
||||||
script:
|
script:
|
||||||
- npx -y surge static $CI_COMMIT_REF_SLUG.git.soapbox.pub
|
- npx -y surge static $CI_COMMIT_REF_SLUG.git.soapbox.pub
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -144,8 +142,7 @@ pages:
|
||||||
- public
|
- public
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- develop
|
- $CI_DEFAULT_BRANCH
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -161,15 +158,8 @@ docker:
|
||||||
- docker push $CI_REGISTRY_IMAGE
|
- docker push $CI_REGISTRY_IMAGE
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- develop
|
- $CI_DEFAULT_BRANCH
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
||||||
- template: Security/License-Scanning.gitlab-ci.yml
|
- template: Security/License-Scanning.gitlab-ci.yml
|
||||||
|
|
||||||
gemnasium-dependency_scanning:
|
|
||||||
interruptible: true
|
|
||||||
|
|
||||||
license_scanning:
|
|
||||||
interruptible: true
|
|
Loading…
Reference in a new issue