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

chore(e2e): add GitHub Action for building and pushing Docker images #2334

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gustavolira
Copy link
Contributor

This workflow automates building and pushing the rhdh-e2e-runner image to Quay.io upon changes to the main branch. It targets files under .ibm/images/ and supports both amd64 and arm64 platforms.

Description

Please explain the changes you made here.

Which issue(s) does this PR fix

  • Fixes #?

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

This workflow automates building and pushing the rhdh-e2e-runner image to Quay.io upon changes to the main branch. It targets files under `.ibm/images/` and supports both amd64 and arm64 platforms.

Signed-off-by: Gustavo Lira <[email protected]>
Copy link

openshift-ci bot commented Feb 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from gustavolira. For more information see the Code Review Process.

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

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

@gustavolira gustavolira changed the title Add GitHub Action for building and pushing Docker images chore(e2e): add GitHub Action for building and pushing Docker images Feb 6, 2025
Copy link
Contributor

github-actions bot commented Feb 6, 2025

with:
context: .ibm/images/
push: true
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:latest
Copy link
Member

@zdrapela zdrapela Feb 10, 2025

Choose a reason for hiding this comment

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

Suggested change
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:latest
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:next

I still think we should align the tag naming with the nightly builds of RHDH or with branch names.

So either use next or main here.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:latest
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}

tag based on branch name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zdrapela I can handle it on a specific PR

Copy link
Member

Choose a reason for hiding this comment

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

Suggestion from @subhashkhileri would work perfectly here. Why not incorporate it now 🤔


concurrency:
group: post-merge-build
cancel-in-progress: false
Copy link
Member

Choose a reason for hiding this comment

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

@gustavolira cancel true makes sense, so that only the latest gets build and pushed

with:
context: .ibm/images/
push: true
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:latest
Copy link
Member

Choose a reason for hiding this comment

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

@gustavolira can we make this tag dynamic based on branch name? like for main latest and release 1.4 it will be ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:release-1.4 or simply 1.4

Copy link
Member

Choose a reason for hiding this comment

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

so same job will build different images for different releases and we can simply reference them in our job

Copy link
Member

Choose a reason for hiding this comment

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

I would align with the RHDH nightly builds as @nickboldt suggested: openshift/release#61263 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, using branch name as tag is less confusing.

Copy link
Contributor

on:
push:
branches:
- main
Copy link
Member

Choose a reason for hiding this comment

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

add release 1.3 and 1.4 as well for branch specific tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants