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:
|
||||
NODE_ENV: test
|
||||
|
||||
default:
|
||||
interruptible: true
|
||||
|
||||
cache: &cache
|
||||
key:
|
||||
files:
|
||||
|
@ -25,7 +28,6 @@ deps:
|
|||
cache:
|
||||
<<: *cache
|
||||
policy: push
|
||||
interruptible: true
|
||||
|
||||
danger:
|
||||
stage: test
|
||||
|
@ -33,8 +35,10 @@ danger:
|
|||
# https://github.com/danger/danger-js/issues/1029#issuecomment-998915436
|
||||
- export CI_MERGE_REQUEST_IID=${CI_OPEN_MERGE_REQUESTS#*!}
|
||||
- npx danger ci
|
||||
except:
|
||||
refs:
|
||||
- $CI_DEFAULT_BRANCH
|
||||
allow_failure: true
|
||||
interruptible: true
|
||||
|
||||
lint-js:
|
||||
stage: test
|
||||
|
@ -47,7 +51,6 @@ lint-js:
|
|||
- "**/*.tsx"
|
||||
- ".eslintignore"
|
||||
- ".eslintrc.js"
|
||||
interruptible: true
|
||||
|
||||
lint-sass:
|
||||
stage: test
|
||||
|
@ -57,7 +60,6 @@ lint-sass:
|
|||
- "**/*.scss"
|
||||
- "**/*.css"
|
||||
- ".stylelintrc.json"
|
||||
interruptible: true
|
||||
|
||||
jest:
|
||||
stage: test
|
||||
|
@ -80,17 +82,16 @@ jest:
|
|||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: .coverage/cobertura-coverage.xml
|
||||
interruptible: true
|
||||
|
||||
nginx-test:
|
||||
stage: test
|
||||
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
|
||||
only:
|
||||
changes:
|
||||
- "installation/mastodon.conf"
|
||||
interruptible: true
|
||||
|
||||
build-production:
|
||||
stage: test
|
||||
|
@ -105,7 +106,6 @@ build-production:
|
|||
artifacts:
|
||||
paths:
|
||||
- static
|
||||
interruptible: true
|
||||
|
||||
docs-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
|
||||
only:
|
||||
refs:
|
||||
- develop
|
||||
- $CI_DEFAULT_BRANCH
|
||||
changes:
|
||||
- "docs/**/*"
|
||||
interruptible: true
|
||||
|
||||
review:
|
||||
stage: deploy
|
||||
|
@ -129,7 +128,6 @@ review:
|
|||
script:
|
||||
- npx -y surge static $CI_COMMIT_REF_SLUG.git.soapbox.pub
|
||||
allow_failure: true
|
||||
interruptible: true
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
|
@ -144,8 +142,7 @@ pages:
|
|||
- public
|
||||
only:
|
||||
refs:
|
||||
- develop
|
||||
interruptible: true
|
||||
- $CI_DEFAULT_BRANCH
|
||||
|
||||
docker:
|
||||
stage: deploy
|
||||
|
@ -161,15 +158,8 @@ docker:
|
|||
- docker push $CI_REGISTRY_IMAGE
|
||||
only:
|
||||
refs:
|
||||
- develop
|
||||
interruptible: true
|
||||
- $CI_DEFAULT_BRANCH
|
||||
|
||||
include:
|
||||
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
||||
- template: Security/License-Scanning.gitlab-ci.yml
|
||||
|
||||
gemnasium-dependency_scanning:
|
||||
interruptible: true
|
||||
|
||||
license_scanning:
|
||||
interruptible: true
|
||||
- template: Security/License-Scanning.gitlab-ci.yml
|
Loading…
Reference in a new issue