Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow releasing docker container does not build master branch #195

Closed
BenjaminRodenberg opened this issue Feb 12, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@BenjaminRodenberg
Copy link
Member

- name: Build and push Dockerfile
uses: docker/build-push-action@v2
with:
push: true
file: "./tools/releasing/packaging/docker/Dockerfile"
tags: ${{ env.docker_username }}/python-bindings:${{ env.TAG }}
build-args: |
PRECICE_TAG=${{ env.PRECICE_TAG }}
PYTHON_BINDINGS_REF=${{ env.BINDINGS_REF }}

The code above does not provide the correct branch to the dockerfile, if running from master, i.e. a release. This results in an incorrect release.

If I run the following locally, everything works:

python-bindings/tools/releasing/packaging/docker$ docker build -t precice/python-bindings:latest --build-arg branch=v3.0.0.0 .

Note: --build-arg=v3.0.0.0 is needed and not --build-arg=master, because master contains 536d385

One can check for the correct version of the bindings being packaged by

docker run -ti precice/python-bindings:latest
python3 -c "import precice; print(precice.__version__)"

At the current state this breaks our automated packaging pipeline and requires manually releasing the docker container.

@BenjaminRodenberg BenjaminRodenberg added the bug Something isn't working label Feb 12, 2024
@BenjaminRodenberg BenjaminRodenberg changed the title Workflow releasing docker container does not build master branch; precice/python-bindings:latest contains incorrect version. Workflow releasing docker container does not build master branch Feb 12, 2024
@BenjaminRodenberg
Copy link
Member Author

I manually released the latest version of the python bindings now to precice/python-bindings:latest. Before the next release we should either fix this issue or deactivate the workflow. The way how things are working currently is very misleading.

BenjaminRodenberg added a commit that referenced this issue Feb 12, 2024
Add notes on docker release and point to #195
@MakisH
Copy link
Member

MakisH commented Feb 12, 2024

Sounds like duplicate of #191

@BenjaminRodenberg
Copy link
Member Author

It's not a duplicate, but it was a false alert. The Dockerfile I used to manually do the release was outdated. With the up-to-date Dockerfile I now run into the issue described in #191, but this is a different story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants