Closed Bug 1859776 Opened 1 year ago Closed 1 year ago

Circle CI should not try to push to Docker Hub for PR builds

Categories

(Socorro :: Antenna, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sven, Assigned: sven)

Details

Attachments

(1 file)

When opening a PR from a feature branch directly on the Antenna repo, the Circle CI workflow tries to upload an image to Docker Hub even before the PR is reviewed or merged.

And example build where this happened is https://app.circleci.com/pipelines/github/mozilla-services/antenna/812/workflows/343d89a5-36da-46a8-ab25-fd6389684f7c/jobs/2362

We should probably only upload an image on tagged builds.

It needs to upload an image in two cases:

  1. after a change from a PR has been merged into the main branch -- this triggers a stage deploy
  2. after someone has pushed a tag -- this triggers a prod deploy

In this case, because the PR is based on a branch that's in the main repository, CIRCLE_BRANCH is not "main" so it goes into the tag scenario, but there's no tag so it fails. I think we just need to fix that one case.

OK, makes sense. I hadn't looked at the workflow definition too closely yet. And I'm glad to hear that all changes merged to main immediately go to stage.

We haven't had a chance to talk about server environments, deploy pipelines, etc. That's on me. We'll get there!

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: