Skip to content

Commit 76ac7dc

Browse files
clyang82claude
andauthored
Consolidate e2e test image references and add apply-tags task (#421)
* Consolidate e2e test image references and add apply-tags task - Update e2e test image path to use maestro/maestro-e2e for consistency - Simplify image retrieval in Makefile to use latest tag - Remove dynamic tag lookup logic from GitHub workflows - Add apply-tags task to Tekton pipelines for both PR and push workflows - Update all workflow references to use consolidated image path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: clyang82 <chuyang@redhat.com> * Do not apply tags for pull-request Signed-off-by: clyang82 <chuyang@redhat.com> * Remove retrieve-image since we have latest tag Signed-off-by: clyang82 <chuyang@redhat.com> * Revert workflow changes to longrunning.yml and manual-e2e.yml Restore dynamic image SHA resolution for e2e test workflows instead of using :latest tag. This reverts the workflow file changes from commit 190dfe4. Signed-off-by: clyang82 <chuyang@redhat.com> --------- Signed-off-by: clyang82 <chuyang@redhat.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 34e0811 commit 76ac7dc

4 files changed

Lines changed: 21 additions & 35 deletions

File tree

.tekton/maestro-e2e-pull-request.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -529,23 +529,6 @@ spec:
529529
operator: in
530530
values:
531531
- "false"
532-
- name: apply-tags
533-
params:
534-
- name: IMAGE_URL
535-
value: $(tasks.build-image-index.results.IMAGE_URL)
536-
- name: IMAGE_DIGEST
537-
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
538-
runAfter:
539-
- build-image-index
540-
taskRef:
541-
params:
542-
- name: name
543-
value: apply-tags
544-
- name: bundle
545-
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.2@sha256:a61d8a6d0ba804869e8fe57a9289161817afad379ef2d7433d75ae40a148e2ec
546-
- name: kind
547-
value: task
548-
resolver: bundles
549532
- name: push-dockerfile
550533
params:
551534
- name: IMAGE

.tekton/maestro-push.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,23 @@ spec:
367367
operator: in
368368
values:
369369
- "false"
370+
- name: apply-tags
371+
params:
372+
- name: IMAGE_URL
373+
value: $(tasks.build-container.results.IMAGE_URL)
374+
- name: IMAGE_DIGEST
375+
value: $(tasks.build-container.results.IMAGE_DIGEST)
376+
runAfter:
377+
- build-container
378+
taskRef:
379+
params:
380+
- name: name
381+
value: apply-tags
382+
- name: bundle
383+
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.2@sha256:a61d8a6d0ba804869e8fe57a9289161817afad379ef2d7433d75ae40a148e2ec
384+
- name: kind
385+
value: task
386+
resolver: bundles
370387
workspaces:
371388
- name: workspace
372389
- name: git-auth

Makefile

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -352,23 +352,6 @@ e2e-image:
352352
push: image project
353353
$(container_tool) push "$(external_image_registry)/$(image_repository):$(image_tag)"
354354

355-
.PHONY: retrieve-image
356-
retrieve-image:
357-
@echo "Retrieving latest image information from Quay.io..."
358-
@command -v curl >/dev/null 2>&1 || { echo "Error: curl is required but not installed"; exit 1; }
359-
@command -v python3 >/dev/null 2>&1 || { echo "Error: python3 is required but not installed"; exit 1; }
360-
@echo "export internal_image_registry=quay.io/redhat-user-workloads/maestro-rhtap-tenant" > .image-env
361-
@echo "export image_repository=maestro/maestro" >> .image-env
362-
@latest_tag=$$(curl -sf -X GET https://quay.io/api/v1/repository/redhat-user-workloads/maestro-rhtap-tenant/maestro/maestro | python3 -c "import sys, json, re; data = json.load(sys.stdin); tags = [t for t in data.get('tags', {}).values() if not re.search(r'sha256-|on-pr-|maestro-on-pull-request', t.get('name', ''))]; tags.sort(key=lambda x: x.get('last_modified', ''), reverse=True); latest = tags[0]['name'] if tags else ''; print(latest) if latest else sys.exit(1)" || { echo "Error: Failed to retrieve image tag from Quay"; exit 1; }); \
363-
echo "export image_tag=$$latest_tag" >> .image-env
364-
@echo "Image configuration saved to .image-env"
365-
@echo ""
366-
@echo "To use these values, run:"
367-
@echo " source .image-env && make deploy"
368-
@echo ""
369-
@echo "Or export them manually:"
370-
@cat .image-env
371-
372355
deploy-%: project %-template
373356
$(oc) apply -n $(namespace) --filename="templates/$*-template.json" | egrep --color=auto 'configured|$$'
374357

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,12 @@ $ export external_apps_domain=`oc -n openshift-ingress-operator get ingresscontr
286286

287287
If you want to push the image to your OpenShift cluster default registry and then deploy it to the cluster. You need to follow [this document](https://docs.openshift.com/container-platform/4.13/registry/securing-exposing-registry.html) to expose a default registry manually and login into the registry with podman. Then run `make push` to push the image to the registry.
288288

289-
If you want to use the existing image, you can run `make retrieve-image` to retrieve the image info and run `source .image-env` to set the image environment variables.
289+
If you want to use the existing image, set the image environment variables.
290290

291291
```shell
292+
$ export internal_image_registry=quay.io/redhat-user-workloads/maestro-rhtap-tenant
293+
$ export image_repository=maestro/maestro
294+
$ export image_tag=latest
292295
$ make deploy
293296

294297
$ oc get pod -n maestro-root

0 commit comments

Comments
 (0)