autoware icon indicating copy to clipboard operation
autoware copied to clipboard

fix(docker): remove build main action

Open oguzkaganozt opened this issue 1 year ago • 1 comments

Description

To simplify CI-CD pipeline ,build-main and build-main-self-hosted can be deleted because they are simply using the same docker build mechanism as docker-build-main and docker-build-main-self-hosted.

Also renaming of:

  • docker-build-and-push-main -> docker-build-main
  • docker-build-and-push-main-self-hosted -> docker-build-main-self-hosted

can be done since docker builds does not pushes every time into the registry the naming implies false positive.

Tests performed

Not applicable.

Effects on system behavior

Not applicable.

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • [ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

oguzkaganozt avatar May 21 '24 12:05 oguzkaganozt

We are using docker-build-and-push-main and docker-build-and-push-main-self-hosted for not only main branch but also the other branches. So are docker-build and docker-build-self-hosted better?

youtalk avatar May 27 '24 13:05 youtalk

@oguzkaganozt I think this PR is important for the workflow refactoring, so I took over and made the necessary modifications.

@xmfcx I've updated the schedule to every day and the README badge. Note that there is no docker-build workflow until this PR is merged, so no badge has been generated. Please review again.

youtalk avatar Jun 04 '24 05:06 youtalk

But now the question is, do we want to update the base image and push it to registry every day?

I think there was a reason to do this twice a month. @mitsudome-r @youtalk

xmfcx avatar Jun 04 '24 11:06 xmfcx

Oh, I finally understood. The difference between build-main and docker-build-and-push-main is allow-push option. That's why it might not be suitable to run docker-build-and-push-main every day. @xmfcx I think so.

youtalk avatar Jun 04 '24 12:06 youtalk

@xmfcx @youtalk @mitsudome-r

Updated the PR so that; we are now using docker-build and docker-build-self-hosted both for daily builds and pushing images to registry twice a month. Please review again.

oguzkaganozt avatar Jun 24 '24 11:06 oguzkaganozt

@oguzkaganozt I'm sorry to review late.

Simplifying the workflow is a very good thing. However, there is a constraint that unless we execute the docker-build action called in the build-main and build-main-self-hosted workflows, we cannot save the cache of docker build's --mount=type=cache cache to the GitHub Actions cache. https://github.com/autowarefoundation/autoware/pull/4865

This might be fixed in a future update of buildkit-cache-dance action, but removing it now would mean disabling the ccache, resulting in CI build times becoming several times slower again.

youtalk avatar Jul 04 '24 04:07 youtalk