From 08de52cab650626245eb21c36b52e13ff12585b1 Mon Sep 17 00:00:00 2001 From: Chin Haur Ng Date: Sun, 1 Sep 2019 09:56:34 +0800 Subject: [PATCH] push to Docker hub from circleCI 3 --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2440b829..2728aa9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,3 +17,11 @@ jobs: command: | docker-compose up -d docker-compose run dockerapp python test.py + - deploy: + name: Push application Docker image + command: | + docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD + docker tag dockerapp_dockerapp $GIT_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 + docker tag dockerapp_dockerapp $GIT_HUB_USER_ID/dockerapp:latest + docker push $GIT_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 + docker push $GIT_HUB_USER_ID/dockerapp:latest \ No newline at end of file