Skip to content

Commit 603bf0f

Browse files
authored
don't rely on version_id magic (#233)
# Summary This pull request updates the tagging scheme in the `inventory.yaml` file to replace the `version_id` parameter with the `version` parameter for consistency and clarity across all image tags. The changes affect multiple sections of the file, ensuring uniformity in how image tags are generated. `version_id` is a evergreen magic env which sonar magically picks up and puts into inventory. Therefore we had those weird tags. This magic is not required anymore - since we pass `version` on every image creation ourselves: https://github.com/mongodb/mongodb-kubernetes/blob/7566a394d41642b1de800ff653f9eb1dfcb92f84/pipeline.py#L265-L278. Additionally, operator was the only leftover where we still used that version_id ## Proof of Work - passing ci image build ## Checklist - [ ] Have you linked a jira ticket and/or is the ticket in the title? - [ ] Have you checked whether your jira ticket required DOCSP changes? - [ ] Have you checked for release_note changes? ## Reminder (Please remove this when merging) - Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible - Our Short Guide for PRs: [Link](https://docs.google.com/document/d/1T93KUtdvONq43vfTfUt8l92uo4e4SEEvFbIEKOxGr44/edit?tab=t.0) - Remember the following Communication Standards - use comment prefixes for clarity: * **blocking**: Must be addressed before approval. * **follow-up**: Can be addressed in a later PR or ticket. * **q**: Clarifying question. * **nit**: Non-blocking suggestions. * **note**: Side-note, non-actionable. Example: Praise * --> no prefix is considered a question
1 parent 7566a39 commit 603bf0f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

inventory.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ images:
2727
TARGETARCH: $(inputs.params.architecture)
2828
output:
2929
- registry: $(inputs.params.registry)/mongodb-kubernetes
30-
tag: $(inputs.params.version_id)-context-$(inputs.params.architecture)
30+
tag: $(inputs.params.version)-context-$(inputs.params.architecture)
3131

3232
- name: operator-race-context
3333
task_type: docker_build
@@ -40,7 +40,7 @@ images:
4040
TARGETARCH: $(inputs.params.architecture)
4141
output:
4242
- registry: $(inputs.params.registry)/mongodb-kubernetes
43-
tag: $(inputs.params.version_id)-context-race-$(inputs.params.architecture)
43+
tag: $(inputs.params.version)-context-race-$(inputs.params.architecture)
4444

4545
- name: operator-template-ubi
4646
task_type: dockerfile_template
@@ -55,27 +55,27 @@ images:
5555
task_type: docker_build
5656
dockerfile: $(stages['operator-template-ubi'].outputs[0].dockerfile)
5757
buildargs:
58-
imagebase: $(inputs.params.registry)/mongodb-kubernetes:$(inputs.params.version_id)-context-$(inputs.params.architecture)
58+
imagebase: $(inputs.params.registry)/mongodb-kubernetes:$(inputs.params.version)-context-$(inputs.params.architecture)
5959
output:
6060
- registry: $(inputs.params.registry)/mongodb-kubernetes
61-
tag: $(inputs.params.version_id)-$(inputs.params.architecture)
61+
tag: $(inputs.params.version)-$(inputs.params.architecture)
6262

6363
# we don't do multi-arch for race images; so we can just directly release it
6464
- name: operator-ubi-race-build
6565
task_type: docker_build
6666
dockerfile: $(stages['operator-template-ubi'].outputs[0].dockerfile)
6767
buildargs:
68-
imagebase: $(inputs.params.registry)/mongodb-kubernetes:$(inputs.params.version_id)-context-race-$(inputs.params.architecture)
68+
imagebase: $(inputs.params.registry)/mongodb-kubernetes:$(inputs.params.version)-context-race-$(inputs.params.architecture)
6969
output:
7070
- registry: $(inputs.params.registry)/mongodb-kubernetes
71-
tag: $(inputs.params.version_id)-race
71+
tag: $(inputs.params.version)-race
7272

7373
- name: master-latest
7474
task_type: tag_image
7575
tags: [ "master" ]
7676
source:
7777
registry: $(inputs.params.registry)/mongodb-kubernetes
78-
tag: $(inputs.params.version_id)-$(inputs.params.architecture)
78+
tag: $(inputs.params.version)-$(inputs.params.architecture)
7979
destination:
8080
- registry: $(inputs.params.registry)/mongodb-kubernetes
8181
tag: latest-$(inputs.params.architecture)
@@ -85,7 +85,7 @@ images:
8585
tags: ["release"]
8686
source:
8787
registry: $(inputs.params.registry)/mongodb-kubernetes
88-
tag: $(inputs.params.version_id)-context-$(inputs.params.architecture)
88+
tag: $(inputs.params.version)-context-$(inputs.params.architecture)
8989
destination:
9090
- registry: $(inputs.params.quay_registry)
9191
tag: $(inputs.params.version)-context-$(inputs.params.architecture)

0 commit comments

Comments
 (0)