Commit d74dec7d authored by mohoff's avatar mohoff

fix: replace .except-ci-release with .only-on-push and .only-on-push-and-master

parent b6c199f3
Pipeline #22236 passed with stages
in 18 seconds
...@@ -4,6 +4,7 @@ build_image: ...@@ -4,6 +4,7 @@ build_image:
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .set-env-and-tag - .set-env-and-tag
- .skip-artifacts - .skip-artifacts
...@@ -20,6 +21,7 @@ cloud_build: ...@@ -20,6 +21,7 @@ cloud_build:
image: google/cloud-sdk image: google/cloud-sdk
stage: build stage: build
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .set-env-and-tag - .set-env-and-tag
- .skip-artifacts - .skip-artifacts
......
build_npm_package: build_npm_package:
stage: build stage: build
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .cache-pull-only - .cache-pull-only
- .skip-artifacts - .skip-artifacts
......
flow_coverage: flow_coverage:
stage: test stage: test
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .cache-pull-only - .cache-pull-only
- .skip-artifacts - .skip-artifacts
......
flow: flow:
stage: test stage: test
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .cache-pull-only - .cache-pull-only
- .skip-artifacts - .skip-artifacts
......
lint: lint:
stage: test stage: test
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .cache-pull-only - .cache-pull-only
- .skip-artifacts - .skip-artifacts
......
...@@ -33,8 +33,7 @@ production: ...@@ -33,8 +33,7 @@ production:
end end
| { "ingresses": . }' | { "ingresses": . }'
JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)' JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)'
extends: extends: .use-gcloud
- .use-gcloud
script: script:
- | - |
cat << EOF > main.tf cat << EOF > main.tf
......
...@@ -17,6 +17,8 @@ review: ...@@ -17,6 +17,8 @@ review:
- .except-ci-release - .except-ci-release
- .use-gcloud - .use-gcloud
- .skip-artifacts - .skip-artifacts
only:
- merge_requests
script: script:
- jq "${JQ_TRANSFORMATION}" brickblock.json > terraform.tfvars.json - jq "${JQ_TRANSFORMATION}" brickblock.json > terraform.tfvars.json
- export FIRST_INGRESS=$(jq "${JQ_FIRST_INGRESS}" terraform.tfvars.json) - export FIRST_INGRESS=$(jq "${JQ_FIRST_INGRESS}" terraform.tfvars.json)
...@@ -78,7 +80,6 @@ stop_review: ...@@ -78,7 +80,6 @@ stop_review:
| { "ingresses": . }' | { "ingresses": . }'
JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)' JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)'
extends: extends:
- .except-ci-release
- .use-gcloud - .use-gcloud
- .skip-artifacts - .skip-artifacts
script: script:
......
setup: setup:
stage: setup stage: setup
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .cache - .cache
- .skip-artifacts - .skip-artifacts
......
...@@ -38,12 +38,13 @@ variables: ...@@ -38,12 +38,13 @@ variables:
- export NAMESPACE_SLUG=$(echo "$CI_PROJECT_NAMESPACE" | sed -r 's/[^a-zA-Z0-9]+/-/g') - export NAMESPACE_SLUG=$(echo "$CI_PROJECT_NAMESPACE" | sed -r 's/[^a-zA-Z0-9]+/-/g')
- gcloud container clusters get-credentials ${GOOGLE_PROJECT}-${VARIANT}-cluster --zone ${ZONE} --project $GOOGLE_PROJECT - gcloud container clusters get-credentials ${GOOGLE_PROJECT}-${VARIANT}-cluster --zone ${ZONE} --project $GOOGLE_PROJECT
# .except-ci-release is included in jobs that are triggered throughout the lifecycle of merge requests. This includes pipelines on push and merge. .only-merge-requests-and-master:
only:
- merge_requests
- master
.except-ci-release: .except-ci-release:
except: except:
refs:
- schedules
- tags
variables: variables:
- $CI_COMMIT_MESSAGE =~ /\[ci-release\]/ - $CI_COMMIT_MESSAGE =~ /\[ci-release\]/
......
...@@ -13,9 +13,10 @@ staging: ...@@ -13,9 +13,10 @@ staging:
| { "ingresses": . }' | { "ingresses": . }'
JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)' JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)'
extends: extends:
- .except-ci-release
- .use-gcloud - .use-gcloud
- .skip-artifacts - .skip-artifacts
only:
- master
script: script:
- jq "${JQ_TRANSFORMATION}" brickblock.json > terraform.tfvars.json - jq "${JQ_TRANSFORMATION}" brickblock.json > terraform.tfvars.json
- export FIRST_INGRESS=$(jq "${JQ_FIRST_INGRESS}" terraform.tfvars.json) - export FIRST_INGRESS=$(jq "${JQ_FIRST_INGRESS}" terraform.tfvars.json)
...@@ -58,5 +59,3 @@ staging: ...@@ -58,5 +59,3 @@ staging:
environment: environment:
name: staging name: staging
url: https://${FIRST_INGRESS} url: https://${FIRST_INGRESS}
only:
- master
test: test:
stage: test stage: test
extends: extends:
- .only-merge-requests-and-master
- .except-ci-release - .except-ci-release
- .cache-pull-only - .cache-pull-only
- .skip-artifacts - .skip-artifacts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment