9
9
- MRIQC_API_TAG : 1.1.0
10
10
- MRIQC_API_DOCKER_IMAGES : " nginx:latest swaggerapi/swagger-ui:latest mongo:latest
11
11
python:3.7-slim"
12
+ - DOCKER_BUILDKIT : 1
12
13
machine :
13
14
# https://discuss.circleci.com/t/linux-machine-executor-images-2021-april-q2-update/39928
14
15
# upgrade Docker version
15
- image : ubuntu-2204:2023.02.1
16
+ image : default
16
17
docker_layer_caching : true
17
18
working_directory : /tmp/src/mriqc
18
19
steps :
@@ -126,10 +127,12 @@ jobs:
126
127
name : Build Docker image
127
128
no_output_timeout : 60m
128
129
command : |
129
- python3 -m pip install hatch
130
+ pyenv local 3
131
+ pip install hatch
130
132
131
133
# Get version before making repo dirty
132
- THISVERSION=$( python3 -m hatch version )
134
+ THISVERSION=$( hatch version )
135
+
133
136
# Inject MRIQC-WebAPI secret
134
137
if [ "${MRIQC_API_SECRET_TOKEN}" != "" ]; then
135
138
sed -i -E "s/<secret_token>/$MRIQC_API_SECRET_TOKEN/" mriqc/config.py
@@ -143,6 +146,8 @@ jobs:
143
146
echo "them to your fork with ``git push origin --tags``"
144
147
fi
145
148
149
+ echo "Building version: $THISVERSION."
150
+
146
151
# Build docker image
147
152
e=1 && for i in {1..5}; do
148
153
docker build \
@@ -153,6 +158,14 @@ jobs:
153
158
--build-arg VERSION="${CIRCLE_TAG:-$THISVERSION}" . \
154
159
&& e=0 && break || sleep 15
155
160
done && [ "$e" -eq "0" ]
161
+
162
+ TARGET_VERSION="${CIRCLE_TAG:-$THISVERSION}"
163
+ TARGET_VERSION="MRIQC v${TARGET_VERSION%+*}"
164
+ DOCKER_VERSION=$( docker run --rm nipreps/mriqc:latest --version )
165
+ DOCKER_VERSION="${DOCKER_VERSION%+*}"
166
+ echo "Target version: \"${TARGET_VERSION}\""
167
+ echo "Docker version: \"${DOCKER_VERSION}\""
168
+ test "${TARGET_VERSION}" == "$DOCKER_VERSION"
156
169
- run :
157
170
name : Docker push to local registry
158
171
no_output_timeout : 40m
0 commit comments