Skip to content

Commit

Permalink
[DEM-105] Push on docker hub images tagged with CircleCI tags
Browse files Browse the repository at this point in the history
This is to be able to get back to previous image in case of crash or problem in a deployment
  • Loading branch information
maatinito committed May 27, 2019
1 parent 1e5857f commit dcc0611
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ jobs:
- run: |
tmp=${CIRCLE_BRANCH##*/}
TAG=cci_${tmp%%_*}
# echo $TAG
echo $TAG
docker build -t $IMAGE:$TAG .
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push $IMAGE:$TAG
if [ "$TAG" == "cci_masterpf" ]; then
docker tag $IMAGE:$TAG $IMAGE:$TAG-$CIRCLE_BUILD_NUM
docker push $IMAGE:$TAG-$CIRCLE_BUILD_NUM
fi
workflows:
version: 2
Expand Down

0 comments on commit dcc0611

Please sign in to comment.