From 01d95c4b60c0b2d7b87f31a89c5403c8af4be5df Mon Sep 17 00:00:00 2001 From: Gerald Manipon Date: Mon, 22 Jul 2019 08:44:35 -0700 Subject: [PATCH 1/2] add circleci job to build and deploy a release Deployed docker image should be able to be pulled via e.g. `docker pull isce2:v2.3.2`. Doing a `docker pull isce2:latest` still pulls the deployed docker image from the most recent of these three circleci jobs: PR merge, weekly build, or release. --- .circleci/config.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 984216f..0adf2fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -106,6 +106,32 @@ jobs: root: images paths: - "*" + build-release: + docker: + - image: docker:stable-git + steps: + - checkout + - setup_remote_docker + - run: + name: Install dependencies + command: | + apk add --no-cache \ + python-dev py-pip bash pigz build-base libffi-dev openssl-dev + pip install \ + docker-compose awscli + - run: + name: Build docker image + command: | + mkdir images + echo "export TAG=$CIRCLE_TAG" >> images/env.sh + source images/env.sh + docker build --rm --force-rm -t isce/isce2:$TAG -f docker/Dockerfile . + cd images + docker save isce/isce2:$TAG > isce2.tar + - persist_to_workspace: + root: images + paths: + - "*" build-periodically: docker: - image: docker:stable-git @@ -172,6 +198,22 @@ workflows: filters: branches: only: master + build-deploy-release: + jobs: + - build-release: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - deploy: + requires: + - build + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ weekly: triggers: - schedule: From 702a78eea20a679a0fc6ac3abf8f7ceb75e18c08 Mon Sep 17 00:00:00 2001 From: Gerald Manipon Date: Mon, 22 Jul 2019 08:53:18 -0700 Subject: [PATCH 2/2] set the correct required job --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0adf2fa..a3aded6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -208,7 +208,7 @@ workflows: ignore: /.*/ - deploy: requires: - - build + - build-release filters: tags: only: /^v.*/