Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/maint/20.2.x' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Oct 28, 2020
2 parents 91bc57e + 2d7210b commit 8e2ab46
Showing 1 changed file with 104 additions and 7 deletions.
111 changes: 104 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
echo "Only docs build"
circleci step halt
fi
- restore_cache:
keys:
- build-v4-{{ .Branch }}-{{ epoch }}
Expand All @@ -26,9 +25,25 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Set up Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
mkdir -p /tmp/images
docker save registry:2 | gzip > /tmp/images/registry.tar.gz
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
- run:
Expand Down Expand Up @@ -99,6 +114,7 @@ jobs:
key: build-v4-{{ .Branch }}-{{ epoch }}
paths:
- /tmp/docker
- /tmp/images

get_data:
machine:
Expand Down Expand Up @@ -246,12 +262,26 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- restore_cache:
keys:
- data-v8-{{ .Revision }}
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Set-up a Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
- run:
Expand Down Expand Up @@ -333,6 +363,7 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- restore_cache:
keys:
- data-v8-{{ .Branch }}-{{ .Revision }}
Expand All @@ -342,9 +373,22 @@ jobs:
- ds005-anat-v18-{{ .Branch }}
- ds005-anat-v18-master
- ds005-anat-v18-
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Set-up a Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
- run:
Expand Down Expand Up @@ -523,6 +567,7 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- restore_cache:
keys:
- data-v8-{{ .Branch }}-{{ .Revision }}
Expand All @@ -543,9 +588,22 @@ jobs:
sudo setfacl -m group:$(id -gn):rwx /tmp/${DATASET}/derivatives
pip install --upgrade pip setuptools
pip install --upgrade /tmp/src/fmriprep/wrapper/
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Set-up a Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
- run:
Expand Down Expand Up @@ -681,6 +739,7 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- restore_cache:
keys:
- data-v8-{{ .Branch }}-{{ .Revision }}
Expand All @@ -699,9 +758,22 @@ jobs:
mkdir -p /tmp/${DATASET}/derivatives && sudo setfacl -d -m group:$(id -gn):rwx /tmp/${DATASET}/derivatives && sudo setfacl -m group:$(id -gn):rwx /tmp/${DATASET}/derivatives
pip install --upgrade pip setuptools
pip install --upgrade /tmp/src/fmriprep/wrapper/
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Set-up a Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
- run:
Expand Down Expand Up @@ -812,11 +884,25 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Setup a Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
-v /tmp/docker:/var/lib/registry registry:2
- run:
name: Pull images from local registry
command: |
Expand All @@ -826,11 +912,8 @@ jobs:
name: Deploy to Docker Hub
no_output_timeout: 40m
command: |
if [[ -n "$DOCKER_PASS" ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag nipreps/fmriprep nipreps/fmriprep:${CIRCLE_BRANCH#docker/}
docker push nipreps/fmriprep:${CIRCLE_BRANCH#docker/}
fi
docker tag nipreps/fmriprep nipreps/fmriprep:${CIRCLE_BRANCH#docker/}
docker push nipreps/fmriprep:${CIRCLE_BRANCH#docker/}
deploy_docker:
machine:
Expand All @@ -854,9 +937,23 @@ jobs:
- build-v4-
paths:
- /tmp/docker
- /tmp/images
- run:
name: Docker authentication
command: |
if [[ -n $DOCKER_PASS ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi
- run:
name: Set-up a Docker registry
command: |
if [[ -f /tmp/images/registry.tar.gz ]]; then
echo "Loading saved registry image"
docker load < /tmp/images/registry.tar.gz
else
echo "Pulling registry image from DockerHub"
docker pull registry:2
fi
docker run -d -p 5000:5000 --restart=always --name=registry \
-v /tmp/docker:/var/lib/registry registry:2
- run:
Expand Down

0 comments on commit 8e2ab46

Please sign in to comment.