armada icon indicating copy to clipboard operation
armada copied to clipboard

Upload built docker image artifacts to GHA

Open jayofdoom opened this issue 2 years ago • 1 comments

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.
  • (on release), armada-release re-tags these docker images (along with doing other work) and pushes them to dockerhub (#1552)

jayofdoom avatar Sep 08 '22 23:09 jayofdoom

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.

jayofdoom avatar Sep 25 '22 20:09 jayofdoom