remove ci merge branches if nightly merge fails (#6369)

pull/6371/head
Alvin Huang 2019-08-21 15:56:27 -04:00 committed by GitHub
parent 5515e094f4
commit ce9cfc773d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -20,7 +20,7 @@ references:
EMAIL: noreply@hashicorp.com EMAIL: noreply@hashicorp.com
GIT_AUTHOR_NAME: circleci-consul GIT_AUTHOR_NAME: circleci-consul
GIT_COMMITTER_NAME: circleci-consul GIT_COMMITTER_NAME: circleci-consul
S3_ARTIFACT_BUCKET: consul-dev-artifacts S3_ARTIFACT_BUCKET: consul-dev-artifacts
BASH_ENV: .circleci/bash_env.sh BASH_ENV: .circleci/bash_env.sh
jobs: jobs:
@ -40,13 +40,13 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- consul-modcache-v1-{{ checksum "go.mod" }} - consul-modcache-v1-{{ checksum "go.mod" }}
- run: - run:
command: go mod download command: go mod download
- save_cache: - save_cache:
key: consul-modcache-v1-{{ checksum "go.mod" }} key: consul-modcache-v1-{{ checksum "go.mod" }}
paths: paths:
- /go/pkg/mod - /go/pkg/mod
- run: - run:
name: check go fmt name: check go fmt
command: | command: |
@ -71,13 +71,13 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- consul-modcache-v1-{{ checksum "go.mod" }} - consul-modcache-v1-{{ checksum "go.mod" }}
- run: - run:
command: make update-vendor command: make update-vendor
- save_cache: - save_cache:
key: consul-modcache-v1-{{ checksum "go.mod" }} key: consul-modcache-v1-{{ checksum "go.mod" }}
paths: paths:
- /go/pkg/mod - /go/pkg/mod
- run: | - run: |
if ! git diff --exit-code; then if ! git diff --exit-code; then
echo "Git directory has vendor changes" echo "Git directory has vendor changes"
@ -90,12 +90,12 @@ jobs:
parallelism: 4 parallelism: 4
environment: environment:
<<: *ENVIRONMENT <<: *ENVIRONMENT
GOTAGS: '' # No tags for OSS but there are for enterprise GOTAGS: "" # No tags for OSS but there are for enterprise
steps: steps:
- checkout - checkout
- restore_cache: # restore cache from dev-build job - restore_cache: # restore cache from dev-build job
keys: keys:
- consul-modcache-v1-{{ checksum "go.mod" }} - consul-modcache-v1-{{ checksum "go.mod" }}
- attach_workspace: - attach_workspace:
at: /go/bin at: /go/bin
- run: mkdir -p $TEST_RESULTS_DIR - run: mkdir -p $TEST_RESULTS_DIR
@ -116,12 +116,12 @@ jobs:
- image: *GOLANG_IMAGE - image: *GOLANG_IMAGE
environment: environment:
<<: *ENVIRONMENT <<: *ENVIRONMENT
GOTAGS: '' # No tags for OSS but there are for enterprise GOTAGS: "" # No tags for OSS but there are for enterprise
steps: steps:
- checkout - checkout
- restore_cache: # restore cache from dev-build job - restore_cache: # restore cache from dev-build job
keys: keys:
- consul-modcache-v1-{{ checksum "go.mod" }} - consul-modcache-v1-{{ checksum "go.mod" }}
- attach_workspace: - attach_workspace:
at: /go/bin at: /go/bin
- run: mkdir -p $TEST_RESULTS_DIR - run: mkdir -p $TEST_RESULTS_DIR
@ -209,13 +209,13 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- consul-modcache-v1-{{ checksum "go.mod" }} - consul-modcache-v1-{{ checksum "go.mod" }}
- run: - run:
command: make dev command: make dev
- save_cache: - save_cache:
key: consul-modcache-v1-{{ checksum "go.mod" }} key: consul-modcache-v1-{{ checksum "go.mod" }}
paths: paths:
- /go/pkg/mod - /go/pkg/mod
# save dev build to pass to downstream jobs # save dev build to pass to downstream jobs
- persist_to_workspace: - persist_to_workspace:
@ -466,8 +466,7 @@ jobs:
- image: *GOLANG_IMAGE - image: *GOLANG_IMAGE
environment: environment:
ENVOY_VERSIONS: "1.8.0" ENVOY_VERSIONS: "1.8.0"
steps: steps: &ENVOY_INTEGRATION_TEST_STEPS
&ENVOY_INTEGRATION_TEST_STEPS
- checkout - checkout
# Get go binary from workspace # Get go binary from workspace
- attach_workspace: - attach_workspace:
@ -508,7 +507,7 @@ jobs:
steps: steps:
- add_ssh_keys: - add_ssh_keys:
fingerprints: fingerprints:
- c6:96:98:82:dc:04:6c:39:dd:ac:83:05:e3:15:1c:98 - c6:96:98:82:dc:04:6c:39:dd:ac:83:05:e3:15:1c:98
- checkout - checkout
- run: - run:
name: Merge Consul OSS master branch into current branch name: Merge Consul OSS master branch into current branch
@ -587,6 +586,7 @@ jobs:
} \ } \
] \ ] \
}" ${CONSUL_SLACK_WEBHOOK_URL} }" ${CONSUL_SLACK_WEBHOOK_URL}
git push --delete origin "${git_merge_branch}"
exit 1 exit 1
fi fi