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: migrate .drone.yml to github build action #697

Merged
merged 3 commits into from
May 29, 2024

Conversation

tserong
Copy link
Contributor

@tserong tserong commented Apr 10, 2024

Problem:
Need to migrate from Drone to Github Actions

Solution:
This gives us amd64 and arm64 ISO builds on every pull request and also on branch pushes of master and v*. ISO images are saved with the workflow as artifact ZIP files in case they are useful for manual testing. Unlike with the Drone build, we are not publishing images to releases.rancher.com to avoid potential collisions with images published from the main harvester repo.

This PR also makes a small change to scripts/lib/image to make it easier to debug image pull failures during build.

Related Issue:
harvester/harvester#5327

@tserong tserong force-pushed the wip-ci-github-actions branch 2 times, most recently from 7f8a77d to 5b95b78 Compare April 10, 2024 07:51
@tserong tserong marked this pull request as draft April 10, 2024 07:54
@tserong tserong force-pushed the wip-ci-github-actions branch from 5b95b78 to 7903f02 Compare April 10, 2024 07:57
@tserong tserong changed the title ci: add build github action [EXPERIMENTAL: DO NOT MERGE] @tserong ci: migrate .drone.yml to github build action Apr 10, 2024
@tserong tserong changed the title @tserong ci: migrate .drone.yml to github build action ci: migrate .drone.yml to github build action Apr 10, 2024
@tserong tserong force-pushed the wip-ci-github-actions branch 2 times, most recently from 927dc31 to 4e5ef24 Compare April 10, 2024 08:44
@tserong tserong force-pushed the wip-ci-github-actions branch 13 times, most recently from 77b76aa to edfac50 Compare May 10, 2024 07:50
@tserong tserong force-pushed the wip-ci-github-actions branch 6 times, most recently from 09d5b00 to ed14dd0 Compare May 23, 2024 02:33
tserong added 2 commits May 23, 2024 12:58
This gives us amd64 and arm64 ISO builds on every pull request and also on
branch pushes of master and v*.  ISO images are saved with the workflow
as artifact ZIP files in case they are useful for manual testing.  Unlike
with the Drone build, we are _not_ publishing images to releases.rancher.com
to avoid potential collisions with images published from the main harvester
repo.

Signed-off-by: Tim Serong <[email protected]>
Using `xargs -n1 -t docker image pull --quiet < $image_list` means that
if any individual image fails to pull, `xargs` exits with failure, but
we don't know which image actually failed to pull.  If we instead use
a loop, we bail out immediately and can see which image pull caused the
problem.

Signed-off-by: Tim Serong <[email protected]>
@tserong tserong force-pushed the wip-ci-github-actions branch from ed14dd0 to 6ed5ca5 Compare May 23, 2024 02:58
@tserong tserong marked this pull request as ready for review May 23, 2024 02:59
@tserong tserong requested review from bk201 and FrankYang0529 May 23, 2024 02:59
Copy link
Member

@FrankYang0529 FrankYang0529 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

While the ISO artifacts may theoretically be useful for manually testing PRs,
they are quite large...  Given it's easy enough to build ISOs manually locally
for testing, let's just stick with that and not use so many resources :-)

Signed-off-by: Tim Serong <[email protected]>
Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

Thanks!

@bk201 bk201 merged commit d6e0a6b into harvester:master May 29, 2024
6 checks passed
@tserong tserong deleted the wip-ci-github-actions branch May 29, 2024 22:10
@tserong
Copy link
Contributor Author

tserong commented May 30, 2024

@Mergifyio backport v1.2 v1.3

Copy link

mergify bot commented May 30, 2024

backport v1.2 v1.3

✅ Backports have been created

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