Skip to content

use _GIT_TAG for staging repo image tag#79

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
nojnhuh:cloudbuild
Feb 28, 2025
Merged

use _GIT_TAG for staging repo image tag#79
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
nojnhuh:cloudbuild

Conversation

@nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Feb 26, 2025

@k8s-ci-robot k8s-ci-robot requested review from byako and pohly February 26, 2025 19:33
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 26, 2025
@nojnhuh nojnhuh mentioned this pull request Feb 26, 2025
@nojnhuh nojnhuh changed the title use $_GIT_TAG for staging repo image tag use _GIT_TAG for staging repo image tag Feb 26, 2025
@pohly pohly moved this from 🆕 New to 👀 In review in Dynamic Resource Allocation Feb 27, 2025
cloudbuild.yaml Outdated
env:
- DRIVER_IMAGE_REGISTRY=us-central1-docker.pkg.dev/k8s-staging-images/dra-example-driver
- DRIVER_IMAGE_TAG=$COMMIT_SHA
- DRIVER_IMAGE_TAG=$_GIT_TAG
Copy link
Contributor

Choose a reason for hiding this comment

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

I am unsure how expansion works in the env section. This might have been the problem with the original $COMMIT_SHA, too.

Let's do it as in https://github.com/kubernetes-csi/csi-release-tools/blob/90efb2ca59900f19eba05e65da28beda79c5bb28/cloudbuild.yaml#L32-L47 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated this to follow that pattern.

The docs show at least one example of substitutions of these automatic variables without an explicit mapping in substitutions. I think COMMIT_SHA was empty because Prow invokes a "manually triggered" build which doesn't seem to include that variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

If it can work without the substitutions, then let's try that variant first because it's simpler.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, changed this back.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 27, 2025
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 27, 2025
env:
- DRIVER_IMAGE_REGISTRY=us-central1-docker.pkg.dev/k8s-staging-images/dra-example-driver
- DRIVER_IMAGE_TAG=$COMMIT_SHA
- DRIVER_IMAGE_TAG=$_GIT_TAG # _GIT_TAG is injected by Prow
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: _GIT_TAG doesn't come from Prow, it's from the builder tool.

Magic.

Let's try it, we can always iterate further.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh, pohly

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 28, 2025
@k8s-ci-robot k8s-ci-robot merged commit e3995a4 into kubernetes-sigs:main Feb 28, 2025
6 checks passed
@pohly pohly moved this from 👀 In review to ✅ Done in Dynamic Resource Allocation Feb 28, 2025
@nojnhuh nojnhuh deleted the cloudbuild branch February 28, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants