Skip to content

Commit

Permalink
fix: containers report wrong version
Browse files Browse the repository at this point in the history
Resolves: #1354
  • Loading branch information
oesteban authored Sep 10, 2024
1 parent d7f9c89 commit 934335f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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/<secret_token>/$MRIQC_API_SECRET_TOKEN/" mriqc/config.py
Expand All @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 934335f

Please sign in to comment.