Velero: Move to GitHub Actions

Created on 4 Dec 2019  路  6Comments  路  Source: vmware-tanzu/velero

GitHub Actions are now GA, so we should at least investigate the level of effort required to move our CI/CD pipeline from Travis CI to Actions.

As far as I'm aware, Actions are based solely on container images, and Velero's work is based on running build container from the host. We may be able to break this down into having the build image uploaded to a registry and fetching it.

Rough plan of action:

  • [ ] Add make target solely for building and pushing the build container image to Docker Hub
  • [ ] Rework the build, test, and CI jobs to run inside the build image, pulled from Docker Hub
  • [ ] Add the GH Action files, using the build container image as the base
  • [ ] Remove Travis CI files

Current architecture builds should _not_ change.

Investigate Contour's usage at https://github.com/projectcontour/contour

CCD EnhancemenDev P2 - Long-term important

Most helpful comment

@ashish-amarnath figured out a lot of this today for the CSI plugin repo, so I'd really like to finish the swing here in 1.5 and get our remaining repos fully migrated off Travis. Adding it to the 1.5 milestone.

All 6 comments

Reviewing the GitHub runner docs, it looks like for now the simpler approach may be to use an ubuntu-latest VM that simply runs make ci. This way, we've moved the platform, and the work of moving the builder container around can be deferred. I would still like to do it, but since it's not an absolute requirement, I don't see a solid reason for changing it at the moment.

Some of the other logic, such as tagging the latest Docker image will still have to be adjusted, though, as this is tied into Travis's environment variables. Instead, I think this should rely on the GitHub API. The create event will happen when a tag is cut and we can trigger a container build on that, or we could use a release event when the release is actually pushed up, checking to see if it's a prerelease or not.

PR #2150 moves us to running make ci on branch pushes an on PRs. It doesn't touch .travis.yml as that file does not control Travis's push/PR triggers, only the Travis console does.

Once #2150 is merged, I'll disable Travis builds for PRs. I believe that Travis push builds must be kept until we move container building/publishing to GitHub Actions, but I need to confirm this with their docs.

2150 has merged, and I have disabled Travis builds for PRs.

@ashish-amarnath figured out a lot of this today for the CSI plugin repo, so I'd really like to finish the swing here in 1.5 and get our remaining repos fully migrated off Travis. Adding it to the 1.5 milestone.

@skriss Yeah, I think that would be good.

Also see #2557, that could probably be addressed as part of finishing up this work too.

Was this page helpful?
0 / 5 - 0 ratings