Skip to content

Commit f67137f

Browse files
committed
CI: Move to docker, attempt to use cache-from
1 parent 610e571 commit f67137f

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

.circleci/config.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ jobs:
3636
- docker/get_base_image.sh
3737

3838
build_images:
39-
machine:
40-
# Ubuntu 14.04 with Docker 17.10.0-ce
41-
image: circleci/classic:201710-02
39+
docker:
40+
- image: docker:17.10.0-ce-git
4241
working_directory: /home/circleci/nipype
4342
steps:
43+
- setup_remote_docker
4444
- checkout:
4545
path: /home/circleci/nipype
4646
- attach_workspace:
4747
at: /tmp
48-
- run:
49-
name: Generate Dockerfiles
50-
command: |
51-
make gen-dockerfiles
5248
- run:
5349
name: Modify Nipype version if necessary
5450
command: |
5551
if [ "$CIRCLE_TAG" != "" ]; then
5652
sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py
5753
fi
54+
- run:
55+
name: Generate Dockerfiles
56+
command: |
57+
make gen-dockerfiles
5858
- run:
5959
name: Get base image (pull or build)
6060
no_output_timeout: 60m
@@ -65,7 +65,7 @@ jobs:
6565
docker pull nipype/nipype:base
6666
elif [ "$GET_BASE" == "BUILD" ]; then
6767
e=1 && for i in {1..5}; do
68-
docker build -t nipype/nipype:base - < docker/Dockerfile.base && e=0 && break || sleep 15
68+
docker build --cache-from=nipype/nipype -t nipype/nipype:base - < docker/Dockerfile.base && e=0 && break || sleep 15
6969
done && [ "$e" -eq "0" ]
7070
else
7171
echo "Error: method to get base image not understood"
@@ -115,11 +115,11 @@ jobs:
115115
- docker/*
116116

117117
test_pytest:
118-
machine:
119-
# Ubuntu 14.04 with Docker 17.10.0-ce
120-
image: circleci/classic:201710-02
118+
docker:
119+
- image: docker:17.10.0-ce-git
121120
working_directory: /home/circleci/nipype
122121
steps:
122+
- setup_remote_docker
123123
- attach_workspace:
124124
at: /tmp
125125
- run:
@@ -166,6 +166,7 @@ jobs:
166166
image: circleci/classic:201710-02
167167
working_directory: /home/circleci/nipype
168168
steps:
169+
- setup_remote_docker
169170
- attach_workspace:
170171
at: /tmp
171172
- run:
@@ -210,11 +211,11 @@ jobs:
210211
path: /home/circleci/work/tests
211212

212213
test_py3_fmri_spm_dartel_linear:
213-
machine:
214-
# Ubuntu 14.04 with Docker 17.10.0-ce
215-
image: circleci/classic:201710-02
214+
docker:
215+
- image: docker:17.10.0-ce-git
216216
working_directory: /home/circleci/nipype
217217
steps:
218+
- setup_remote_docker
218219
- attach_workspace:
219220
at: /tmp
220221
- run:
@@ -257,11 +258,11 @@ jobs:
257258
path: /home/circleci/work/tests
258259

259260
test_fmri_spm_nested_multiproc:
260-
machine:
261-
# Ubuntu 14.04 with Docker 17.10.0-ce
262-
image: circleci/classic:201710-02
261+
docker:
262+
- image: docker:17.10.0-ce-git
263263
working_directory: /home/circleci/nipype
264264
steps:
265+
- setup_remote_docker
265266
- attach_workspace:
266267
at: /tmp
267268
- run:

0 commit comments

Comments
 (0)