armada
armada copied to clipboard
Upload built docker image artifacts to GHA
This should work, needs testing.
Final flow will be as follows:
- go-integration-tests builds and saves docker images to an artifact (#1473)
- go-integration-tests uses workflow_call to call upload-docker-images@master (change TODO, will be written once this and 1551 merge)
- upload-docker-images downloads those artifacts, and pushes them to docker #1551
- This is a separate workflow, so secrets can be isolated to an environment (
armada-dockerhub
), and then we can configure that environment to only work when called on a protected branch.
- This is a separate workflow, so secrets can be isolated to an environment (
- (on release), armada-release re-tags these docker images (along with doing other work) and pushes them to dockerhub (#1552)
The nature of this PR has to change, due to how the behavior has been restructured. Now, the implementation will be across multiple PRs:
- This one, which now adds code to go-integration-tests to export docker images, then upload a tarball of those exported images into github artifacts.
- One that permits uploading of docker images from previously-built artifacts from the ^^^ above change, using dockerhub secrets (in an environment limited to run on protected branches only). #1551
- Once that change merges, we'll have a small additional change to the go-integration-tests workflow: to call that docker image uploading workflow from master branch (must be run from protected branch) to upload those changes. This change will also need to remove the upload done by circleci it (or add some kind of prefix/suffix to the tag) to prevent them stepping on each other.
- Finally, add an additional workflow, that runs on: release, which re-tags the docker images already uploaded (by the above) to the proper released ones, along with other release items. #1552
I'll upload draft versions of these where possible -- mainly from where I've already written some of this code, but now has to move it around.