Skip to content

Commit

Permalink
chore(ci) build Docker image for each commit to the master branch
Browse files Browse the repository at this point in the history
These builds are pushed to following Docker repository:
https://bintray.com/beta/#/kong/kubernetes-ingress-controller/master

From #377 

Co-Authored-By: Colin Hutchinson <hutchic@users.noreply.github.com>
  • Loading branch information
hbagdi and hutchic committed Aug 30, 2019
1 parent 53124f1 commit 085a59f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .ci/build-master.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -e

if [[ "$TRAVIS_BRANCH" != "master" ]];
then
exit 0
fi

REPO="kong-docker-kubernetes-ingress-controller.bintray.io"
export IMGNAME="master"
export TAG=`git rev-parse --short HEAD`

make container
docker tag ${REPO}/${IMGNAME}:${TAG} ${REPO}/${IMGNAME}:latest
echo "${BINTRAY_KEY}" | docker login -u "${BINTRAY_USER}" ${REPO} --password-stdin

docker push ${REPO}/${IMGNAME}:${TAG}
docker push ${REPO}/${IMGNAME}:latest
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ before_script:
script:
- make verify-codegen
- make test-all

after_success:
- .ci/build-master.sh

0 comments on commit 085a59f

Please sign in to comment.