CircleCI - add goreleaser job

This commit is contained in:
stefanprodan
2019-06-21 15:07:00 +03:00
parent c74456411d
commit a6b2b1246c
2 changed files with 22 additions and 25 deletions
+22
View File
@@ -41,6 +41,19 @@ jobs:
- run: test/container-build.sh
- run: test/container-push.sh
push-binary:
docker:
- image: circleci/golang:1.12
working_directory: ~/build
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run: curl -sL http://git.io/goreleaser | bash
e2e-istio-testing:
machine: true
steps:
@@ -104,6 +117,15 @@ workflows:
filters:
branches:
ignore: gh-pages
- push-binary:
requires:
- build-binary
filters:
branches:
ignore:
- /gh-pages.*/
- /docs-.*/
- /release-.*/
- e2e-istio-testing:
requires:
- build-binary
-25
View File
@@ -17,31 +17,6 @@ addons:
packages:
- docker-ce
script:
- make test-fmt
- make test-codegen
- go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...)
- make build
after_success:
- if [ -z "$DOCKER_USER" ]; then
echo "PR build, skipping image push";
else
BRANCH_COMMIT=${TRAVIS_BRANCH}-$(echo ${TRAVIS_COMMIT} | head -c7);
docker tag weaveworks/flagger:latest weaveworks/flagger:${BRANCH_COMMIT};
echo $DOCKER_PASS | docker login -u=$DOCKER_USER --password-stdin;
docker push weaveworks/flagger:${BRANCH_COMMIT};
fi
- if [ -z "$TRAVIS_TAG" ]; then
echo "Not a release, skipping image push";
else
docker tag weaveworks/flagger:latest weaveworks/flagger:${TRAVIS_TAG};
echo $DOCKER_PASS | docker login -u=$DOCKER_USER --password-stdin;
docker push weaveworks/flagger:$TRAVIS_TAG;
fi
- bash <(curl -s https://codecov.io/bash)
- rm coverage.txt
deploy:
- provider: script
skip_cleanup: true