Migrate CI/CD from CircleCI to GitHub Actions #9309
Migrate CI/CD from CircleCI to GitHub Actions #9309sylvestre wants to merge 5 commits intomozilla:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9309 +/- ##
========================================
Coverage 82.19% 82.20%
========================================
Files 615 615
Lines 34695 34695
Branches 3229 3295 +66
========================================
+ Hits 28518 28520 +2
+ Misses 6053 5832 -221
- Partials 124 343 +219 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.github/workflows/ci.yml
Outdated
| "$GITHUB_SHA" \ | ||
| "${{ github.ref_name }}" \ | ||
| "$GITHUB_REPOSITORY" \ | ||
| "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > version.json |
There was a problem hiding this comment.
IDK if this must follow a specific format
There was a problem hiding this comment.
If it does, it's a bit different than what we had with CircleCI
| tag_and_push "${{ github.ref_name }}" | ||
| fi | ||
|
|
||
| # Deploy to GCP Artifact Registry |
There was a problem hiding this comment.
We need to find a way to test these steps, there are some minor differences between CircleCI and this one that I don't know if they are required (e.g. "use_oidc")
There was a problem hiding this comment.
Yeah oidc might be required, I see in bugbug we are doing things a bit different than what you're doing here: https://github.com/mozilla/bugbug/blob/11b9dc0ce9fdbbc7c8846dffa1f10d6e8a77bc57/.github/workflows/docker-push.yml#L58
But bugbug is on mozcloud v2 while treeherder is on v1, so I don't know if we can use it fully as an example
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'pnpm' |
There was a problem hiding this comment.
We were locking to a specific version here, probably to avoid unexpected regressions
.github/workflows/ci.yml
Outdated
| name: Run Jest tests | ||
| - uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} |
There was a problem hiding this comment.
Do we need the codecov token? IIRC it was possible to upload without a token from a github action
.github/workflows/ci.yml
Outdated
| - name: Create docker-compose shim | ||
| run: | | ||
| printf '#!/bin/sh\nexec docker compose "$@"\n' | sudo tee /usr/local/bin/docker-compose | ||
| sudo chmod +x /usr/local/bin/docker-compose |
.github/workflows/ci.yml
Outdated
| - name: Create version.json | ||
| run: | | ||
| printf '{"commit":"%s","version":"%s","source":"https://github.com/%s","build":"%s"}\n' \ | ||
| "$GITHUB_SHA" \ | ||
| "${{ github.ref_name }}" \ | ||
| "$GITHUB_REPOSITORY" \ | ||
| "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > version.json | ||
| - name: Build Docker image | ||
| run: DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile -t app:build . |
There was a problem hiding this comment.
These steps are duplicated between "test-docker-build" and "deploy", could we share them somehow like we were doing with circleci?
No description provided.