Merge pull request #37 from pymonger/master

use circleci workflows for test, docker build, and deploy to dockerhub
LT1AB
piyushrpt 2019-05-10 10:53:21 -07:00 committed by GitHub
commit d7639da51e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 115 additions and 3 deletions

View File

@ -1,6 +1,6 @@
version: 2 version: 2.1
jobs: jobs:
build: test:
docker: docker:
- image: hysds/pge-base:latest - image: hysds/pge-base:latest
user: root user: root
@ -79,5 +79,115 @@ jobs:
topsApp.py --help --steps topsApp.py --help --steps
stripmapApp.py --help --steps stripmapApp.py --help --steps
python3 -c "import isce" python3 -c "import isce"
build:
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
SHA1=$(echo $CIRCLE_SHA1 | cut -c1-7)
echo "export TAG=$SHA1" >> 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
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=$(date -u +%Y%m%d)' >> 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:
- "*"
deploy:
docker:
- image: docker:stable-git
steps:
- setup_remote_docker
- run:
name: Install dependencies
command: |
apk add --no-cache \
curl file
- attach_workspace:
at: images
- run:
name: Deploy
command: |
cd images
source env.sh
docker load -i isce2.tar
docker tag isce/isce2:$TAG isce/isce2:latest
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push isce/isce2:$TAG
docker push isce/isce2:latest
workflows:
version: 2
test:
jobs:
- test
build-deploy:
jobs:
- build:
filters:
branches:
only: master
- deploy:
requires:
- build
filters:
branches:
only: master
weekly:
triggers:
- schedule:
cron: "0 7 * * 0"
filters:
branches:
only:
- master
jobs:
- build-periodically:
filters:
branches:
only: master
- deploy:
requires:
- build-periodically
filters:
branches:
only: master

View File

@ -1,5 +1,7 @@
# ISCE2 # ISCE2
[![CircleCI](https://circleci.com/gh/isce-framework/isce2.svg?style=svg)](https://circleci.com/gh/isce-framework/isce2)
This is the Interferometric synthetic aperture radar Scientific Computing This is the Interferometric synthetic aperture radar Scientific Computing
Environment (ISCE). Its initial development was funded by NASA's Earth Science Environment (ISCE). Its initial development was funded by NASA's Earth Science
Technology Office (ESTO) under the Advanced Information Systems Technology Technology Office (ESTO) under the Advanced Information Systems Technology