Skip to content

Commit

Permalink
correct python version
Browse files Browse the repository at this point in the history
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
  • Loading branch information
unkcpz committed Sep 7, 2023
1 parent 41c4b8b commit 0fa299b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ You can also specify a custom platform with the `--platform`, example: `docker b

### Test the build images locally

Run
Run

```bash
TAG=newly-build python -m pytest -s tests
TAG=newly-baked python -m pytest -s tests
```

### Trigger a build on ghcr.io and dockerhub
Expand Down
2 changes: 1 addition & 1 deletion .docker/aiida-core-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ RUN set -x && \
tar -xvjf /tmp/micromamba.tar.bz2 --strip-components=1 bin/micromamba && \
rm /tmp/micromamba.tar.bz2 && \
PYTHON_SPECIFIER="python=${PYTHON_VERSION}" && \
if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; fi && \
if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; else PYTHON_SPECIFIER="python=${PYTHON_VERSION}"; fi && \
# Install the packages
./micromamba install \
--root-prefix="${CONDA_DIR}" \
Expand Down
2 changes: 1 addition & 1 deletion .docker/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ variable "TARGETS" {
function "tags" {
params = [image]
result = [
"${REGISTRY}${ORGANIZATION}/${image}:newly-build"
"${REGISTRY}${ORGANIZATION}/${image}:newly-baked"
]
}

Expand Down
2 changes: 1 addition & 1 deletion .docker/tests/test_aiida.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_correct_python_version_installed(aiida_exec, python_version):


def test_correct_pgsql_version_installed(aiida_exec, pgsql_version, variant):
if variant == 'base':
if variant == 'aiida-core-base':
pytest.skip('PostgreSQL is not installed in the base image')

info = json.loads(aiida_exec('mamba list --json --full-name postgresql').decode())[0]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
architecture: ${{ inputs.architecture }}

- name: Build image base and base-with-services (output image name aiida-coer §) 🛠
run: docker buildx bake -f build.json -f docker-bake.hcl --set *.platform=linux/amd64 --load
run: docker buildx bake -f build.json -f docker-bake.hcl --set *.platform=linux/${{ inputs.architecture }} --load
env:
# Full logs for CI build
BUILDKIT_PROGRESS: plain

- name: Run tests ✅
run: TAG=newly-build python -m pytest -s tests
run: TAG=newly-baked python -m pytest -s tests

- name: Save image as a tar for later use 💾
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
declare -a arr=(${{ steps.meta.outputs.tags }})
for tag in "${arr[@]}"; do
arch_tag=$(echo ${tag} | sed "s/:/:${{ inputs.architecture }}-/")
docker tag ${{ env.OWNER }}/${{ matrix.image }}:newly-build ${arch_tag}
docker tag ${{ env.OWNER }}/${{ matrix.image }}:newly-baked ${arch_tag}
docker push ${arch_tag}
# write tag to file
Expand Down

0 comments on commit 0fa299b

Please sign in to comment.