Skip to content

chore: build and push "directly" instead of using mozilla-it/deploy-actions#2149

Merged
chenba merged 1 commit intomasterfrom
chore/cp-ghcr-ent-gar-stor-499
Mar 25, 2026
Merged

chore: build and push "directly" instead of using mozilla-it/deploy-actions#2149
chenba merged 1 commit intomasterfrom
chore/cp-ghcr-ent-gar-stor-499

Conversation

@chenba
Copy link
Copy Markdown
Collaborator

@chenba chenba commented Mar 20, 2026

We relied on mozilla-it/deploy-actions's build-and-push to push a couple of Docker images to another GAR in GCP. That duplicate the image builds. With this patch we'll define the build-and-push actions ourselves.

Additionally, we'll push a 'latest' tag to the non-enterprise image registries on a git tag push.

Closes STOR-499, STOR-509

@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch from 4cd77c1 to edd6cd3 Compare March 20, 2026 19:31
@chenba chenba marked this pull request as ready for review March 20, 2026 21:16
@chenba chenba requested review from pjenvey and taddes March 20, 2026 21:17
pjenvey
pjenvey previously approved these changes Mar 21, 2026
Copy link
Copy Markdown
Member

@pjenvey pjenvey left a comment

Choose a reason for hiding this comment

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

I'll just note the obvious that we could go even further, breaking apart our usage of the build action (I noticed remote-settings basically rolls their own https://github.com/mozilla/remote-settings/blob/main/.github/workflows/publish-ent.yaml) or even tweaking the mozcloud actions/workflow to better suite these needs

But this is definitely a good, easy improvement

Comment thread .github/workflows/mozcloud-publish.yaml Outdated
create_credentials_file: false

- name: Configure GAR
run: gcloud auth configure-docker us-docker.pkg.dev --quiet
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I notice the mozcloud docker-push action does a docker/login-action here instead: https://github.com/mozilla-it/deploy-actions/blob/b9d76236c1d1dd89daab4ea15651cbe76574267a/docker-push/action.yml#L39 I'm not sure it matters?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, this would be good to update since I was planning on breaking those out in the broader workflow updates.

@chenba
Copy link
Copy Markdown
Collaborator Author

chenba commented Mar 21, 2026

(I noticed remote-settings basically rolls their own https://github.com/mozilla/remote-settings/blob/main/.github/workflows/publish-ent.yaml)

Thanks, I'll take a look.

@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch 4 times, most recently from 794b672 to 3b1f267 Compare March 23, 2026 17:16
@chenba chenba changed the title chore: copy images from ghcr to enterprise GAR instead of rebuilding chore: build and push "directly" instead of using mozilla-it/deploy-actions Mar 23, 2026
@chenba chenba added the preview Provision a Preview Environment label Mar 23, 2026
@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch 3 times, most recently from c997a6f to 180c2e6 Compare March 23, 2026 18:52
@chenba chenba marked this pull request as draft March 23, 2026 19:52
@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch from 180c2e6 to 1d5aa64 Compare March 24, 2026 01:54
@chenba
Copy link
Copy Markdown
Collaborator Author

chenba commented Mar 24, 2026

The two GAR pushes are on different steps; it appears docker/login-action won't allow two auth sessions to us-docker.pkg.dev simultaneously. Not a big deal since the later step can rely on cache.

@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch from 1d5aa64 to d8c775f Compare March 24, 2026 13:42
@chenba chenba removed the preview Provision a Preview Environment label Mar 24, 2026
@chenba chenba marked this pull request as ready for review March 24, 2026 15:57
@chenba chenba requested a review from pjenvey March 24, 2026 15:58
Comment thread .github/workflows/mozcloud-publish.yaml Outdated
with:
persist-credentials: false

- uses: ./.github/actions/build-and-push
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This evolved into more of a setup-build-and-push action, I think it could use a renaming to something along those lines?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch from d8c775f to 9963461 Compare March 24, 2026 18:41
@chenba chenba added the tokenserver-preview Provision a preview environment for tokenserver label Mar 24, 2026
@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch from 9963461 to 8108278 Compare March 24, 2026 19:38
@chenba chenba requested a review from pjenvey March 24, 2026 19:47
@mozcloud-preview-environments
Copy link
Copy Markdown

Preview environment has been deployed.

Preview URL: https://pr2149-tokenserver.preview.mozilla.cloud

It may take up to 5 minutes for the environment to become available.
If the link doesn't work immediately, please wait a few moments and try again.

You can monitor deployment status in Argo CD.

@chenba chenba added the preview Provision a Preview Environment label Mar 24, 2026
@chenba chenba force-pushed the chore/cp-ghcr-ent-gar-stor-499 branch from 8108278 to 5eabb6d Compare March 24, 2026 21:07
@chenba chenba removed preview Provision a Preview Environment tokenserver-preview Provision a preview environment for tokenserver labels Mar 25, 2026
@chenba chenba merged commit 36e5683 into master Mar 25, 2026
48 of 51 checks passed
@chenba chenba deleted the chore/cp-ghcr-ent-gar-stor-499 branch March 25, 2026 13:40
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