Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from CircleCI to GitHub Actions #1351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bryce-souers
Copy link

@bryce-souers bryce-souers commented Jan 5, 2025

This is in response to Issue #1341 "Move from Circle CI to Github Actions".

I took heavy inspiration from the Prometheus implementation here:
https://github.com/prometheus/prometheus/blob/main/.github/workflows/ci.yml

Implementation notes

New secrets are required

You must add the following secrets to be used in the ci.yml GitHub Action:
https://github.com/prometheus/blackbox_exporter/settings/secrets/actions

DOCKER_HUB_LOGIN
DOCKER_HUB_PASSWORD
QUAY_IO_LOGIN
QUAY_IO_PASSWORD
PROMBOT_GITHUB_TOKEN

For my testing, I had to create my own secrets in my forked repository.

Removing skipped tests

In this pull request, I removed all skipped tests that were skipped due to "CI" and validated that they work fine.

Adding skip to TestChooseProtocol

As was called out in #1341, IPv6-related issues were ran into but they appeared to only fail TestChooseProtocol for Windows.
I have adjusted the test to be skipped accordingly under those conditions.
I feel this is fine as we are testing on 2 other OS's.

Testing

In order to test this, I forked the repository and made many commits to my master branch (as that's the branch that I had to apply Actions configurations to for GitHub to pick them up).

Here are the results, laid out by what condition was tested and what the outcome was:

Condition

Create new branch and publish to remote with changes.

Outcome

1 Github Action was triggered and it ran the Test job.


Condition

Create pull request of new branch to master.

Outcome

1 Github Action was triggered and it ran the Test and Build common architectures jobs.


Condition

Push change / merge pull request into master.

Outcome

1 GitHub Action was triggered and it ran the Test, Build all architectures, and Publish master jobs.
DockerHub’s master tag was updated.
Quay’s master tag was updated.


Condition

A release PR is created and merged into master.
A tag for v0.30.0 is created:

~/workspace/repos/blackbox_exporter migrate_github_actions ❯ git tag -a v0.30.0 -m "v0.30.0"
~/workspace/repos/blackbox_exporter test_release_0.30.0 ❯ git push origin tag v0.30.0    
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 161 bytes | 161.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/Bryce-Souers/blackbox_exporter.git
 * [new tag]         v0.30.0 -> v0.30.0

Outcome

1 GitHub Action was triggered, and it ran the Test, Build all architectures, and Publish release jobs.
A release for v0.30.0 was created.
DockerHub’s master tag was updated.
Quay’s master tag was updated.

@bryce-souers bryce-souers marked this pull request as ready for review January 5, 2025 02:33
@bryce-souers bryce-souers force-pushed the migrate_github_actions branch from d809638 to dd02a2a Compare January 5, 2025 03:14
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.

1 participant