Skip to content

Commit

Permalink
Push image build in from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlin committed Feb 9, 2018
1 parent f63b70e commit fceb724
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ push: image ## Pushes the container image to the registry
docker push $(REGISTRY_URL):latest
docker tag $(REGISTRY_URL):latest $(REGISTRY_URL):$(IMAGE_TAG)
docker push $(REGISTRY_URL):$(IMAGE_TAG)
echo "Pushed: $(REGISTRY_URL):$(IMAGE_TAG)"

tools: tools.timestamp

Expand Down
7 changes: 5 additions & 2 deletions cico_build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -e
# None
###################################################################################
function setup_build_environment() {
[ -f jenkins-env ] && cat jenkins-env | grep -e GIT -e DEVSHIFT -e JOB_NAME > inherit-env
[ -f jenkins-env ] && cat jenkins-env | grep -e GIT -e DEVSHIFT -e JOB_NAME -e ghprbPullId > inherit-env
[ -f inherit-env ] && . inherit-env

# We need to disable selinux for now, XXX
Expand Down Expand Up @@ -64,4 +64,7 @@ make all
if [[ "$JOB_NAME" = "devtools-fabric8-jenkins-proxy-build-master" ]]; then
TAG=$(echo ${GIT_COMMIT} | cut -c1-${DEVSHIFT_TAG_LEN})
make push REGISTRY_USER=${DEVSHIFT_USERNAME} REGISTRY_PASSWORD=${DEVSHIFT_PASSWORD} IMAGE_TAG=${TAG}
fi
elif [[ "$JOB_NAME" = "devtools-fabric8-jenkins-proxy" ]]; then
TAG="PR${ghprbPullId}"
make push REGISTRY_USER=${DEVSHIFT_USERNAME} REGISTRY_PASSWORD=${DEVSHIFT_PASSWORD} IMAGE_TAG=${TAG}
fi

0 comments on commit fceb724

Please sign in to comment.