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

ci: use runtime image set by env var action #37253

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

Artyop
Copy link
Contributor

@Artyop Artyop commented Jan 24, 2025

This commit

  1. Replace CILIUM_RUNTIME_IMAGE variable set in cilium images (cf. Dockerfiles) with the cilium-runtime image variable set in set-env-var action.
  2. Changes the sed commands present in images/runtime/update-cilium-runtime-images.sh :
    • Changing the way the image variable is set inside the script. Before that the image was a constant, now it will be extracted from the image_full variable passed as parameter of the script.
    • For Dockerfile, it will not check what is prefixed and will update the image based on its name, so if any changes are name for any reason on prefixed image name on Dockerfiles this won't disrupt the image tag/digest update. example : if CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:tag@digest is changed for RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:tag@digest (or any other name) this won't affect the update process
    • For workflows, since the runtime image has been moved to an action (set-env-var), we now look on the .github/actions directory. Also added a double quote character to be sure no templating issue will be encountered when updating the set-env action.
  3. Changes images/scripts/update-cilium-runtime-images.sh, used to lint cilium runtime images in CI, by removing the image name from a constant variable to a parameter passed along the call of the script. We are keeping quay.io/cilium/cilium-runtime as default parameter in the makefile, if nothing is provided to the script/target. But we allow ourselves the possibility to override this variable.

This will allow us to change the repository of the runtime image without having to change the whole image build/lint process.

Follow-up of 8cc07d9

use runtime image set by env var action in build and lint

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 24, 2025
@Artyop Artyop requested a review from nebril January 24, 2025 14:16
@Artyop Artyop force-pushed the pr/artyop/use-runtime-env-var branch from bba4337 to 2ada804 Compare January 24, 2025 14:18
@Artyop Artyop force-pushed the pr/artyop/use-runtime-env-var branch from 2ada804 to 48796db Compare January 24, 2025 14:20
@Artyop Artyop temporarily deployed to release-base-images January 24, 2025 14:20 — with GitHub Actions Inactive
@nebril nebril added the release-note/misc This PR makes changes that have no direct user impact. label Jan 24, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 24, 2025
@Artyop Artyop marked this pull request as ready for review January 27, 2025 11:21
@Artyop Artyop requested review from a team as code owners January 27, 2025 11:21
@Artyop Artyop requested review from aanm and christarazi January 27, 2025 11:21
@Artyop Artyop had a problem deploying to release-base-images January 28, 2025 12:02 — with GitHub Actions Failure
@aanm aanm force-pushed the pr/artyop/use-runtime-env-var branch from 48796db to 56d0709 Compare January 28, 2025 12:59
@aanm aanm requested a review from a team as a code owner January 28, 2025 12:59
@aanm aanm requested a review from kaworu January 28, 2025 12:59
@aanm aanm temporarily deployed to release-base-images January 28, 2025 12:59 — with GitHub Actions Inactive
@aanm aanm had a problem deploying to release-base-images January 28, 2025 13:00 — with GitHub Actions Failure
@aanm aanm temporarily deployed to release-base-images January 28, 2025 13:22 — with GitHub Actions Inactive
@aanm aanm had a problem deploying to release-base-images January 28, 2025 13:23 — with GitHub Actions Failure
Artyop and others added 2 commits January 28, 2025 16:27
This commit :
1. Replace CILIUM_RUNTIME_IMAGE variable set in cilium images (cf. Dockerfiles) with the cilium-runtime image variable set in set-env-var action.
2. Changes the sed commands present in images/runtime/update-cilium-runtime-images.sh :
    - Changing the way the image variable is set inside the script. Before that the image was a constant, now it will be extracted from the image_full variable passed as parameter of the script.
    - For Dockerfile, it will not check what is prefixed and will update the image based on its name, so if any changes are name for any reason on prefixed image name on Dockerfiles this won't disrupt the image tag/digest update.
        example :
            if CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:tag@digest
            is changed for RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:tag@digest (or any other name)
            this won't affect the update process
    - For workflows, since the runtime image has been moved to an action (set-env-var), we now look on the .github/actions directory.
      Also added a double quote character to be sure no templating issue will be encountered when updating the set-env action.
3. Changes images/scripts/update-cilium-runtime-images.sh, used to lint cilium runtime images in CI, by removing the image name from a constant variable to a parameter passed along the call of the script.
   We are keeping quay.io/cilium/cilium-runtime as default parameter in the makefile, if nothing is provided to the script/target. But we allow ourselves the possibility to override this variable.

This will allow us to change the repository of the runtime image without having to change the whole image build/lint process.

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm force-pushed the pr/artyop/use-runtime-env-var branch from 56d0709 to 3cf777f Compare January 28, 2025 15:27
@aanm aanm had a problem deploying to release-base-images January 28, 2025 15:27 — with GitHub Actions Failure
@aanm
Copy link
Member

aanm commented Jan 28, 2025

/test

@aanm aanm enabled auto-merge January 28, 2025 15:28
@Artyop
Copy link
Contributor Author

Artyop commented Jan 29, 2025

@christarazi @kaworu kind ping

@aanm aanm added this pull request to the merge queue Jan 30, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 30, 2025
Merged via the queue into cilium:main with commit 9542013 Jan 30, 2025
64 of 65 checks passed
@nebril nebril added the needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch label Feb 10, 2025
@nbusseneau nbusseneau mentioned this pull request Feb 14, 2025
22 tasks
@nbusseneau nbusseneau added backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. and removed needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels Feb 14, 2025
@github-actions github-actions bot added backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. and removed backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants