Skip to content

Conversation

@scholtzan
Copy link
Contributor

@scholtzan scholtzan commented Jan 6, 2026

https://mozilla-hub.atlassian.net/browse/DENG-8809

Needs to be merged with mozilla/telemetry-airflow#2308

This migrates the CircleCI configs to Github Actions. This change will allow users that create a PR to merge this PR without running into issues with credentials/contexts for pushing the docker images to GAR.

I tested the deploy in 3234854 and it pushed the image to https://console.cloud.google.com/artifacts/docker/moz-fx-data-artifacts-prod/us/docker-etl/bq2sftp/sha256:e9b80133ad7cbfd71057d52d746e3248fcde9a454212f0971d7bb190dde6d155?project=moz-fx-data-artifacts-prod

I'll disable the CircleCI Pipeline once this has been approved and will reconfigure the required build check to the GHA one.

See DENG-8850 for additional discussion.

Checklist for reviewer:

  • Commits should reference a bug or github issue, if relevant (if a bug is
    referenced, the pull request should include the bug number in the title)
  • Scan the PR and verify that no changes (particularly to
    .circleci/config.yml) will cause environment variables (particularly
    credentials) to be exposed in test logs
  • Ensure the container image will be using permissions granted to
    telemetry-airflow
    responsibly.

Note for deployments: In order to push images built by this PR, the user who merges the PR
must be in the telemetry Github team.
This is because deploys depend on the
data-eng-airflow-gcr CircleCI context.
See DENG-8850 for additional discussion.

@scholtzan scholtzan force-pushed the migrate-to-gha branch 3 times, most recently from fc7dd4d to eb1c888 Compare January 6, 2026 18:32
@scholtzan scholtzan changed the title Migrate to gha Migrate CircleCI to Github Action Jan 6, 2026
@scholtzan scholtzan changed the title Migrate CircleCI to Github Action [DENG-8809] Migrate CircleCI to Github Action Jan 6, 2026
@scholtzan scholtzan force-pushed the migrate-to-gha branch 3 times, most recently from 2bb09a3 to 53c9b08 Compare January 6, 2026 19:37
@scholtzan scholtzan marked this pull request as ready for review January 6, 2026 19:38
@scholtzan scholtzan requested a review from a team as a code owner January 6, 2026 19:38
@scholtzan scholtzan marked this pull request as draft January 6, 2026 19:38
@scholtzan scholtzan force-pushed the migrate-to-gha branch 2 times, most recently from a6db4c1 to 92fd8c4 Compare January 6, 2026 19:52
Copy link
Contributor

@BenWu BenWu left a comment

Choose a reason for hiding this comment

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

The pull request template should also be updated to remove the circleci references

uses: actions/checkout@v6
with:
persist-credentials: false
- name: Build the Docker image
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a general question: is there a standard way to use the docker cache across jobs in a workflow? The test job builds the image from scratch. I don't think the circleci version shared the cache either but I'm wondering if there's a GHA has something built for that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point. I changed the config to store the image artifacts so they can be re-used in the deploy jobs.

Comment on lines 4 to 7
push:
branches:
- '**'
pull_request:
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to trigger two builds when a branch with an open PR is updated (1, 2). Is there a way to prevent that? Could we just run it on the push?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we only need to build on push when changes get merged into main, I changed that in the config. Pushing to another branch won't trigger a build, unless a PR gets opened. Which I would expect to be the case in this repo anyway.

run: |
docker build jobs/{{ job_name }} -t us-docker.pkg.dev/moz-fx-data-artifacts-prod/docker-etl/{{ job_name }}:latest
# yamllint enable
- name: Save Docker image
Copy link
Contributor

Choose a reason for hiding this comment

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

Storing the image seems to sometimes take longer than building it so maybe this isn't that useful. Also it would only need to store it on main unless someone adds another job.

Does caching described here work? https://docs.docker.com/build/ci/github-actions/cache/

In any case, I think we can leave this as something to look into in the future and take this out for now

@scholtzan scholtzan enabled auto-merge (squash) January 7, 2026 22:01
@scholtzan scholtzan merged commit 4557d4c into main Jan 7, 2026
25 checks passed
@scholtzan scholtzan deleted the migrate-to-gha branch January 7, 2026 22:01
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.

4 participants