Avoid pushing postgres-operator image on PRs. (#52)

Do push as postgres-operator from the master branch, and as a
postgres-operator-test when evaluating pull-requests.
This commit is contained in:
Oleksii Kliukin 2017-06-14 14:56:04 +02:00 committed by GitHub
parent 2f5a349477
commit ba6529bec9
1 changed files with 9 additions and 2 deletions

View File

@ -16,8 +16,15 @@ build_steps:
export OPERATOR_TOP_DIR=$GOPATH/src/github.com/zalando-incubator
mkdir -p $OPERATOR_TOP_DIR
ln -s $(pwd) $OPERATOR_TOP_DIR/postgres-operator
- desc: 'Build & push'
- desc: 'Build & push docker image'
cmd: |
export PATH=$PATH:$HOME/go/bin
export IMAGE=registry-write.opensource.zalan.do/acid/postgres-operator
IS_PR_BUILD=${CDP_PULL_REQUEST_NUMBER+"true"}
if [[ ${CDP_TARGET_BRANCH} == "master" && ${IS_PR_BUILD} != "true" ]]
then
IMAGE=registry-write.opensource.zalan.do/acid/postgres-operator
else
IMAGE=registry-write.opensource.zalan.do/acid/postgres-operator-test
fi
export IMAGE
make tools deps docker push