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

Add project version to Docker tag #583

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

cimnine
Copy link
Collaborator

@cimnine cimnine commented Sep 17, 2021

Related Issue: n/a

New Behavior

In the past, it was difficult to align the version of NetBox (e.g. currently v3.0.2) and the version of NetBox Docker (e.g. currently v1.4.0).

Contrast to Current Behavior

This PR changes the build script and introduces an additional Docker tag for all the built tags. The additional tag contains -${PROJECT_VERSION}. Some examples:

  • latest-ldap will also be tagged latest-ldap-1.4.0
  • v3.0-ldap will also be tagged v3.0-ldap-1.4.0
  • v3.0.2-ldap will also be tagged v3.0.2-ldap-1.4.0
  • snapshot-ldap will also be tagged snapshot-ldap-1.4.0
  • latest will also be tagged latest-1.4.0
  • v3.0 will also be tagged v3.0-1.4.0
  • v3.0.2 will also be tagged v3.0.2-1.4.0
  • snapshot will also be tagged snapshot-1.4.0

Discussion: Benefits and Drawbacks

Once a new version of NetBox Docker is released, only Docker images for the at-that-time current NetBox version (and all later versions) will be produced. For example, if we release this PR as v1.4.1, then v3.0.2-1.4.1 would be tagged, but for example not v3.0.1-1.4.1.

Also, older versions of NetBox Docker will not get new NetBox releases. So, if we release this PR as v1.4.1, and we would have already an image tagged as v3.0.2-1.4.0, then – when NetBox releases v3.0.3, a tag such as v3.0.3-1.4.0 would not be produced. Only v3.0.3-1.4.1 would be built.

That is a good-enough tradeoff for now IMO.

Changes to the Wiki

n/a

Proposed Release Note Entry

Tags containing the corresponding NetBox Docker project version will be available from now on for our Docker images. For example, v3.0.2-ldap-1.4.1 would be such a tag. The v3.0.2 corresponds to the version of the NetBox project, while 1.4.1 corresponds to the version of the NetBox Docker project.

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

@cimnine cimnine added the enhancement The issue describes an enhancement that we would like to implement in the future. label Sep 17, 2021
@cimnine cimnine requested a review from tobiasge September 17, 2021 17:18
@cimnine cimnine self-assigned this Sep 17, 2021
@tobiasge
Copy link
Member

I think we should update the "Prepare a release" section in the wiki to also update the docker-compose.yml with the tag matching the release: image: netboxcommunity/netbox:${VERSION-v3.0-1.4.1}

@cimnine cimnine merged commit 1a868c6 into netbox-community:develop Sep 20, 2021
@cimnine cimnine deleted the NBDoVersionTag branch September 20, 2021 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue describes an enhancement that we would like to implement in the future.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants