From 0bd8f8f50710d6d82fa238e7a6e6c82ae7a4d9e0 Mon Sep 17 00:00:00 2001 From: Bobby Brennan Date: Fri, 7 Jun 2019 13:47:20 -0400 Subject: [PATCH] Tweak CI for forked PRs and better release process (#115) * build new image upon release * skip certain actions during CI on forked PRs --- .circleci/config.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ba791fec7..2f639cfc0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,24 +18,31 @@ references: run: name: Docker login, build, and push command: | - docker login quay.io -u="reactiveops+circleci" -p="${quay_token}" docker build -t $REPO:dev-$CIRCLE_SHA1 . - docker push $REPO:dev-$CIRCLE_SHA1 + if [[ -z $CIRCLE_PR_NUMBER ]]; then + docker login quay.io -u="reactiveops+circleci" -p="${quay_token}" + docker push $REPO:dev-$CIRCLE_SHA1 + else + echo "Skipping docker push for forked PR" + fi docker_tag_release: &docker_tag_release run: name: Docker tag release command: | docker login quay.io -u="reactiveops+circleci" -p="${quay_token}" - docker pull $REPO:dev-$CIRCLE_SHA1 + docker build -t $REPO:dev-$CIRCLE_SHA1 . docker tag $REPO:dev-$CIRCLE_SHA1 $REPO:$CIRCLE_TAG docker push $REPO:$CIRCLE_TAG - update_coverage: &update_coverage run: name: Update Coverage command: | - go test ./pkg/... -coverprofile=coverage.txt -covermode=count - bash <(curl -s https://codecov.io/bash) + if [[ -z $CIRCLE_PR_NUMBER ]]; then + go test ./pkg/... -coverprofile=coverage.txt -covermode=count + bash <(curl -s https://codecov.io/bash) + else + echo "Skipping coverage for forked PR" + fi test_dashboard: &test_dashboard run: