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

Fix automatic tagging of buildx builds #2661

Merged
merged 2 commits into from
Oct 26, 2022
Merged

Conversation

glennmatthews
Copy link
Contributor

@glennmatthews glennmatthews commented Oct 20, 2022

Closes: #N/A

What's Changed

  • Add a new print_command helper function to tasks.py to generalize some logic that was specific to the docker_compose function and provide a common entry point for printing a CLI command before running it.
  • Replace hard-coded default tag of networktocode/nautobot-dev-py3.7:local on buildx task to derive appropriate automatic tags for dev and final images based on the specified Python version - I needed the print_command to help me demonstrate that this was working correctly. :-)
  • Add print_command in a few other cases.
$ INVOKE_NAUTOBOT_PYTHON_VER=3.9 invoke buildx --target final
Building Nautobot final target with Python 3.9 for linux/amd64...
PYTHON_VER=3.9 \
docker buildx build . \
    --platform linux/amd64 \
    --target final \
    --load -f ./docker/Dockerfile \
    --build-arg PYTHON_VER=3.9 \
    -t networktocode/nautobot-py3.9:local \   <------------<<
    --no-cache

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • n/a Unit, Integration Tests
  • n/a Documentation Updates (when adding/changing features)
  • n/a Example Plugin Updates (when adding/changing features)
  • n/a Outline Remaining Work, Constraints from Design

@glennmatthews glennmatthews self-assigned this Oct 20, 2022
Copy link
Contributor

@jathanism jathanism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

tasks.py Show resolved Hide resolved
@glennmatthews glennmatthews merged commit ff5708f into develop Oct 26, 2022
@glennmatthews glennmatthews deleted the gfm-buildx-tasks-fix branch October 26, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants