-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
24 lines (19 loc) · 1.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
sudo: required
language: python
services:
- docker
before_install:
- echo "TRAVIS_BRANCH $TRAVIS_BRANCH, TRAVIS_TAG $TRAVIS_TAG, TRAVIS_PULL_REQUEST $TRAVIS_PULL_REQUEST"
- pip install awscli
- docker build -t bids/cpac .
- docker pull filo/docker2singularity
- mkdir -p ${HOME}/singularity_images
- docker run -ti --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ${HOME}/singularity_images:/output filo/docker2singularity "bids/cpac"
script:
- sing_img=$(ls -t ${HOME}/singularity_images | head -n 1); docker run --rm --privileged -v ${HOME}/singularity_images:/output --entrypoint /output/${sing_img}
filo/docker2singularity -h
after_success:
- if [ ! -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sing_img=$(ls -t ${HOME}/singularity_images | head -n 1); version=$( git describe
--tags ); echo "$sing_img ... $version"; aws s3 cp --quiet --acl public-read ${HOME}/singularity_images/${sing_img} s3://fcp-indi/resources/singularity_images/bids_cpac/bids_cpac_${TRAVIS_TAG}.img; aws
s3 cp --quiet --acl public-read ${HOME}/singularity_images/${sing_img} s3://fcp-indi/resources/singularity_images/bids_cpac/bids_cpac_latest.img; fi