Merge pull request #51 from pymonger/build-docker-by-release

build and deploy docker by release
LT1AB
piyushrpt 2019-07-28 14:23:33 -07:00 committed by GitHub
commit 25084e21d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions

View File

@ -106,6 +106,32 @@ jobs:
root: images root: images
paths: 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: build-periodically:
docker: docker:
- image: docker:stable-git - image: docker:stable-git
@ -172,6 +198,22 @@ workflows:
filters: filters:
branches: branches:
only: master only: master
build-deploy-release:
jobs:
- build-release:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- deploy:
requires:
- build-release
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
weekly: weekly:
triggers: triggers:
- schedule: - schedule: