-
Notifications
You must be signed in to change notification settings - Fork 219
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 Jenkinsfile 2 GH Actions Workflow #1731
Migrate Jenkinsfile 2 GH Actions Workflow #1731
Conversation
🌐 Coverage report
|
Coverage Report will be handled in a follow-up. See https://github.com/elastic/observability-robots/issues/1546 |
6c6e6e9
to
51758b1
Compare
@@ -0,0 +1,48 @@ | |||
name: release | |||
|
|||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed, will be triggered on every push of a tag
@@ -273,32 +247,6 @@ pipeline { | |||
} | |||
} | |||
} | |||
stage('Opbeans') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed with @v1v, this stage will be moved to the consumer side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report will be handled in a follow-up. |
.github/workflows/test.yml
Outdated
uses: elastic/apm-pipeline-library/.github/actions/version-framework@current | ||
with: | ||
# Use .ci/.jenkins_python_full.yml if it's a scheduled workflow, otherwise use .ci/.jenkins_python.yml | ||
versionsFile: .ci/.jenkins_python${{ github.event_name == 'schedule' && '_full' || '' }}.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This replaces the nightly test.
e852c6e
to
b084342
Compare
4d5d92c
to
9e75a91
Compare
@@ -19,7 +19,7 @@ | |||
repo: apm-agent-python | |||
repo-owner: elastic | |||
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken | |||
head-filter-regex: '^(main|PR-.*|[5-9]\.x|v[0-9].*)$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make the jenkins jobs only run on the tag event and will be omitted on main and pull requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple of minor questions
.github/workflows/packages.yml
Outdated
schedule: | ||
- cron: '0 2 * * *' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Jenkins there was a nightly job that runs the full matrix. Here it's solved with this: #1731 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.. I just noticed it's the wrong file and a copy pasta error. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
jobs: | ||
packages: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way it only runs when the test workflow in main was successul.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with just a minor question regarding workflows, calls and the download step
- uses: actions/download-artifact@v3 | ||
with: | ||
name: packages | ||
path: dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question regarding this step:
- Will this step ensure the package to be downloaded is the one produced in the
.github/workflows/package.yml
?
Just wondering if two parallel workflows run (one for the merge commit in main and another one for the git tag vx.x.x), won't be any overlap between them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question, I had the assumption that if the packages workflow is a sub workflow of release, that the release will the download the artifacts only from the sub workflow. I will try to verify this in a sample repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I did some testing on a private playground repo:
Given a workflow with push
trigger that uploads some artifacts and given a release workflow with a tag
trigger, that tries to download the same artifact name. Then the following error shows:
Downloading the artifact only worked if the workflows are "connected" like we are doing it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for verifying this! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
* Migrate Jenkinsfile to GH Actions * Generic naming * Upload junit test and coverage reports on success or on failure * Better naming * Remove cron from packages workflow * Rename all occurences of WEBFRAMEWORK to FRAMEWORK
* handle case when no span is created in GRPC client interceptor closes #1739 * Migrate Jenkinsfile 2 GH Actions Workflow (#1731) * Migrate Jenkinsfile to GH Actions * Generic naming * Upload junit test and coverage reports on success or on failure * Better naming * Remove cron from packages workflow * Rename all occurences of WEBFRAMEWORK to FRAMEWORK * Add a warning about BaseHTTPMiddleware to Starlette docs (#1735) * Add a warning about BaseHTTPMiddleware to Starlette docs Also switch to using get_client() and make the docs simpler for environment variable configuration. * CHANGELOG * Change `server_url` default to avoid ipv6 ambiguity (#1744) * Change `server_url` default to avoid ipv6 ambiguity * Fix failing test and another minor doc fix * Add service.agent.activation_method to metadata (#1743) * Add activation_method to metadata * Add test * Move activation_method default above start_threads * CHANGELOG * Fix nightly scheduled test (#1747) * Split matrix items into chunks to bypass the 256 limit of matrix items in github actions * cleanup * Add comments * Add update-specs updatcli workflow (#1745) * Add update-specs updatcli workflow * Fix paths * Required Status Check (#1749) * Create single status check that can be set as required * Let windows test runs exit with the correct exit code * Set the exit code * Formatting * fix * More readable jq query * Set status check to success in case it's an only-docs PR (#1753) * Set status check to success in case it's a only-docs PR * Set permissions * fix path patterns * Add comments * Update badge (#1752) * Add dynamic config tag to more supported options (#1750) * Fix sha source (#1754) * update changelog --------- Co-authored-by: Jan Calanog <nejcalanog@gmail.com> Co-authored-by: Colton Myers <colton@basepi.net> Co-authored-by: Jan Calanog <jan.calanog@elastic.co>
What does this pull request do?
Migrate Jenkinsfile to GH Actions Workflow.
Release flow
As agreed, the release will be automatically triggered on every push of a tag with the pattern
v*.*.*
.Follow-ups
Related issues
Closes https://github.com/elastic/observability-robots/issues/1515