From 299766f25df024f0bd349f37c4ecb84f9e61f532 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Mon, 29 Jun 2020 09:35:27 -0500 Subject: [PATCH] add dockerhub deployment to CI --- .circleci/config.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index edc2781..b9c3e88 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,8 +26,37 @@ jobs: resources/enable_profiling.py && pytest --tb=short && resources/profile_queries.py + deploy: + docker: + - image: circleci/buildpack-deps:stretch + environment: + IMAGE_NAME: icecube/file-catalog + steps: + - checkout + - setup_remote_docker + - run: | + echo 'export TAG="${CIRCLE_TAG:=latest}"' >> $BASH_ENV + - run: | + docker build -t $IMAGE_NAME:$TAG . + - run: | + echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin + docker push $IMAGE_NAME:$TAG workflows: version: 2 build_and_test: jobs: - test + - deploy: + context: docker + filters: + branches: + only: master + release: + jobs: + - deploy: + context: docker + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/