Skip to content

refactor: simplify update-image-sha.sh script#3516

Open
pratap0007 wants to merge 1 commit into
tektoncd:mainfrom
pratap0007:fix-script
Open

refactor: simplify update-image-sha.sh script#3516
pratap0007 wants to merge 1 commit into
tektoncd:mainfrom
pratap0007:fix-script

Conversation

@pratap0007

Copy link
Copy Markdown
Contributor

Simplify the OpenShift image SHA update script by removing authentication requirements and consolidating the implementation to use only skopeo.

Changes:

  • Remove REGISTRY_USER and REGISTRY_PASSWORD parameters - script now uses existing registry credentials from local skopeo/podman/docker login
  • Replace podman commands with skopeo for better compatibility and consistency (skopeo inspect, skopeo list-tags)
  • Remove manifest-tool container dependency - use skopeo inspect --raw to get image SHA digests directly
  • Remove unused helper functions (log, err, info, die, usage)
  • Remove registry_login() function - no longer needed
  • Improve output formatting with clearer status messages
  • Reduce script from 103 lines to 68 lines while maintaining functionality

The script still updates the same 7 Red Hat images (buildah, kn-client, postgresql-15, skopeo, s2i, ubi-minimal, openjdk-17) across all OpenShift YAML files in:

  • config/openshift/base/operator.yaml
  • operatorhub/openshift/config.yaml
  • operatorhub/openshift/release-artifacts/bundle/manifests/*.yaml
  • cmd/openshift/operator/kodata/tekton-addon/addons/**/*.yaml

Usage is now simpler:
bash hack/openshift/update-image-sha.sh

(No environment variables required)

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

Simplify the OpenShift image SHA update script by removing authentication
requirements and consolidating the implementation to use only skopeo.

Changes:
- Remove REGISTRY_USER and REGISTRY_PASSWORD parameters - script now uses
  existing registry credentials from local skopeo/podman/docker login
- Replace podman commands with skopeo for better compatibility and
  consistency (skopeo inspect, skopeo list-tags)
- Remove manifest-tool container dependency - use skopeo inspect --raw
  to get image SHA digests directly
- Remove unused helper functions (log, err, info, die, usage)
- Remove registry_login() function - no longer needed
- Improve output formatting with clearer status messages
- Reduce script from 103 lines to 68 lines while maintaining functionality

The script still updates the same 7 Red Hat images (buildah, kn-client,
postgresql-15, skopeo, s2i, ubi-minimal, openjdk-17) across all OpenShift
YAML files in:
- config/openshift/base/operator.yaml
- operatorhub/openshift/config.yaml
- operatorhub/openshift/release-artifacts/bundle/manifests/*.yaml
- cmd/openshift/operator/kodata/tekton-addon/addons/**/*.yaml

Usage is now simpler:
  bash hack/openshift/update-image-sha.sh

(No environment variables required)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Jun 21, 2026
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from pratap0007 after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 21, 2026
@jkhelil

jkhelil commented Jun 22, 2026

Copy link
Copy Markdown
Member

@pratap0007 is something that we can automate somwehow using a gh workflow ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants