diff --git a/.circleci/config.yml b/.circleci/config.yml index 587a51a3..4ce97bf1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,10 +9,11 @@ jobs: - MRIQC_API_TAG: 1.1.0 - MRIQC_API_DOCKER_IMAGES: "nginx:latest swaggerapi/swagger-ui:latest mongo:latest python:3.7-slim" + - DOCKER_BUILDKIT: 1 machine: # https://discuss.circleci.com/t/linux-machine-executor-images-2021-april-q2-update/39928 # upgrade Docker version - image: ubuntu-2204:2023.02.1 + image: default docker_layer_caching: true working_directory: /tmp/src/mriqc steps: @@ -126,10 +127,12 @@ jobs: name: Build Docker image no_output_timeout: 60m command: | - python3 -m pip install hatch + pyenv local 3 + pip install hatch # Get version before making repo dirty - THISVERSION=$( python3 -m hatch version ) + THISVERSION=$( hatch version ) + # Inject MRIQC-WebAPI secret if [ "${MRIQC_API_SECRET_TOKEN}" != "" ]; then sed -i -E "s//$MRIQC_API_SECRET_TOKEN/" mriqc/config.py @@ -143,6 +146,8 @@ jobs: echo "them to your fork with ``git push origin --tags``" fi + echo "Building version: $THISVERSION." + # Build docker image e=1 && for i in {1..5}; do docker build \ diff --git a/Dockerfile b/Dockerfile index 5ef43932..4fd53e7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -201,6 +201,7 @@ WORKDIR /tmp/ # Run mriqc by default ENTRYPOINT ["/opt/conda/bin/mriqc"] +ARG VERSION ARG BUILD_DATE ARG VCS_REF LABEL org.label-schema.build-date=$BUILD_DATE \