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

Added Github actions workflow to build on MacOS #28906

Closed
wants to merge 23 commits into from

Conversation

nxei
Copy link
Contributor

@nxei nxei commented Nov 10, 2021

What does this PR do?

Add Github actions workflow to build on MacOS on a PR basis and being triggered by the Jenkins pipeline.

It runs as part of the mandatory meta-stage

#29032 is another implementation, which one do we enable?

Why is it important?

Delegate the environmental issues to the SaaS.
Ensure the OS coverage happens on a PR basis to avoid merging any PRs that could cause any regression.
Avoid being blocked from the system owner.

Issues

Superseedes #29032

UI

A Github check with the build status will be created:

image

Further details

GitHub already provides MacOS support:

@nxei nxei requested a review from v1v November 10, 2021 08:48
@nxei nxei self-assigned this Nov 10, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 10, 2021
@mergify
Copy link
Contributor

mergify bot commented Nov 10, 2021

This pull request does not have a backport label. Could you fix it @nxei? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Nov 10, 2021
@v1v v1v added automation backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify Team:Automation Label for the Observability productivity team labels Nov 10, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 10, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Nov 10, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 10, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-12-06T11:01:30.981+0000

  • Duration: 194 min 2 sec

  • Commit: d22c392

Test stats 🧪

Test Results
Failed 0
Passed 50923
Skipped 4485
Total 55408

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Jenkinsfile Outdated Show resolved Hide resolved
auditbeat/Jenkinsfile.yml Outdated Show resolved Hide resolved
Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

You can speed up your testing as commented sometime offline by changing the Jenkinsfile.yml top level file and remove all the projects but the one you are testing at the moment. In this case auditbeat/

Jenkinsfile Outdated Show resolved Hide resolved
auditbeat/Jenkinsfile.yml Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
Added macosActions stage to config for auditbeat.
.github/workflows/build.yml Outdated Show resolved Hide resolved
@nxei
Copy link
Contributor Author

nxei commented Nov 26, 2021

/test

Jenkinsfile Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
Jenkinsfile Outdated
Comment on lines 363 to 364
log(level: 'INFO', text: "Github build link: ${result.html_url}")
log(level: 'INFO', text: "Github build status: ${result.conclusion}")
Copy link
Member

Choose a reason for hiding this comment

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

I saw the build worked, awesome!

image

I think we can now add a conclusion validation if not success then report an error? IIUC, result.conclusion contains success if it successfully ran.

So something like the below snippet could work:

if (!result.conclusion.equals('success') {
  error(''${args.context}: ${result.conclusion}. See ${result.html_url}")
}

What do you think?

OTOH, is the conclusion related to a run or a step?

I see steps.<step id>.conclusion in https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context versus job.status in https://docs.github.com/en/actions/learn-github-actions/contexts#job-context. The conclusion is the status for the whole run? Where can I see all the fields for the result object?

* upstream/master:
  [libbeat] Fix add_labels flattening of arrays values (elastic#29211)
  Change elastic-agent pprof default to false (elastic#29155)
  elastic#28472 fix flaky tests in libbeat fmtstr to use time.UTC instead of time.Local (elastic#28473)
  Adopt `parsers` in Filebeat's journald input (elastic#29070)
  [Elastic Agent] Add process error handling guidelines (elastic#29152)
  winlogbeat/sys/winevent: use reflect IsZero method (elastic#29190)
  Remove Journalbeat (elastic#29131)
  Add note that there is no warranty or support for generator code (elastic#28797)
  packetbeat: preparation for npcap addition (elastic#29017)
  Use the generic helper for opening file to read in filestream (elastic#29180)
  Workflow for macos (elastic#29174)
  Fix `decode_json_fields` processor to always add error key (elastic#29107)
@v1v v1v marked this pull request as ready for review December 1, 2021 18:02
@v1v v1v requested review from a team as code owners December 1, 2021 18:02
@@ -35,6 +35,9 @@ stages:
crosscompile:
make: "make -C metricbeat crosscompile"
stage: mandatory
macosAction:
Copy link
Member

Choose a reason for hiding this comment

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

#29038 most likely will cause an issue

@v1v v1v requested a review from a team December 1, 2021 18:02
metricbeat/Jenkinsfile.yml Outdated Show resolved Hide resolved
@v1v
Copy link
Member

v1v commented Dec 6, 2021

/test

@mergify
Copy link
Contributor

mergify bot commented Jan 4, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b github-actions-build upstream/github-actions-build
git merge upstream/master
git push upstream github-actions-build

@jlind23
Copy link
Collaborator

jlind23 commented Mar 31, 2022

@v1v @cachedout what should we do with this PR? Is this still relevant or should I discard it?

@v1v
Copy link
Member

v1v commented Mar 31, 2022

I'll close this now, we have already put in place the GitHub actions on MacOS though they are not reported in Jenkins nor the github build comment, so we will need to revisit this in the future if needed

@v1v v1v closed this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify enhancement Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants