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.
LT1AB
Gerald Manipon 2019-07-22 08:44:35 -07:00
parent 77aa07640a
commit 01d95c4b60
1 changed files with 42 additions and 0 deletions

View File

@ -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: