Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak CI for forked PRs and better release process #115

Merged
merged 3 commits into from
Jun 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down