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

[CI] Jenkins package pipeline for agentbeat #38951

Merged
merged 25 commits into from
Apr 17, 2024

Conversation

pazone
Copy link
Contributor

@pazone pazone commented Apr 15, 2024

Proposed commit message

Adds agentbeat to Jenkins packaging pipeline to fix the legacy DRA publishing

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

@pazone pazone requested a review from a team as a code owner April 15, 2024 17:07
@pazone pazone requested review from belimawr and rdner April 15, 2024 17:07
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 15, 2024
@pazone pazone requested a review from blakerouse April 15, 2024 17:07
@mergify mergify bot assigned pazone Apr 15, 2024
Copy link
Contributor

mergify bot commented Apr 15, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @pazone? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 15, 2024

💚 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

  • Duration: 136 min 29 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the 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!)

@pazone pazone requested a review from a team as a code owner April 15, 2024 19:12
@botelastic botelastic bot added Team:Automation Label for the Observability productivity team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 15, 2024
.ci/packaging.groovy Outdated Show resolved Hide resolved
@pazone pazone requested a review from a team as a code owner April 15, 2024 19:22
@pazone pazone changed the title [CI] Jenkins package pipeline for auditbeat [CI] Jenkins package pipeline for agentbeat Apr 15, 2024
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good!

@pazone
Copy link
Contributor Author

pazone commented Apr 16, 2024

/package

Copy link
Contributor

mergify bot commented Apr 16, 2024

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 ci_jenkins_packaging_for_agentbeat upstream/ci_jenkins_packaging_for_agentbeat
git merge upstream/main
git push upstream ci_jenkins_packaging_for_agentbeat

.ci/packaging.groovy Outdated Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM provided that CI is green and the corresponding packaging step on Jenkins works as expected.

Regarding the use of a script (under .buildkite/) to install msitools, I also had the same initial thought, but on a second thought, we could simply pre-install it on our base image; this is tracked in https://github.com/elastic/ingest-dev/issues/3194

@pazone
Copy link
Contributor Author

pazone commented Apr 16, 2024

@v1v Moved the install script to .buildkite/scripts

@pazone pazone added backport-v8.13.0 Automated backport with mergify and removed backport-v8.13.0 Automated backport with mergify labels Apr 16, 2024
Copy link
Contributor

mergify bot commented Apr 16, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @pazone? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@pazone
Copy link
Contributor Author

pazone commented Apr 16, 2024

/package

@pazone
Copy link
Contributor Author

pazone commented Apr 16, 2024

/test

@pazone
Copy link
Contributor Author

pazone commented Apr 16, 2024

Now packaging works. The PR is ready to merge

@cmacknz
Copy link
Member

cmacknz commented Apr 17, 2024

Force merging to fix the 8.14 SNAPSHOT build

@cmacknz cmacknz merged commit 3f06575 into main Apr 17, 2024
135 of 139 checks passed
@cmacknz cmacknz deleted the ci_jenkins_packaging_for_agentbeat branch April 17, 2024 01:56
@cmacknz
Copy link
Member

cmacknz commented Apr 17, 2024

I think something is still broken in the DRA packaging logic:

[2024-04-17T01:56:48.997Z] Started by user Craig MacKenzie

[2024-04-17T01:56:49.074Z] Connecting to https://api.github.com/ using Jenkins - beats-ci

[2024-04-17T01:56:49.571Z] Obtained .ci/packaging.groovy from 3f06575996bc91402a5c330c18b0e7451c43785b

[2024-04-17T01:56:49.571Z] Resume disabled by user, switching to high-performance, low-durability mode.

[2024-04-17T01:56:49.587Z] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

[2024-04-17T01:56:49.587Z] WorkflowScript: 208: expecting ']', found 'x-pack/auditbeat' @ line 208, column 5.

[2024-04-17T01:56:49.587Z]        'x-pack/auditbeat',

[2024-04-17T01:56:49.587Z]        ^

[2024-04-17T01:56:49.587Z] 

[2024-04-17T01:56:49.587Z] 1 error

[2024-04-17T01:56:49.587Z] 

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:349)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:225)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:191)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:233)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:189)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:966)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)

[2024-04-17T01:56:49.587Z] 	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)

[2024-04-17T01:56:49.587Z] 	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)

[2024-04-17T01:56:49.587Z] 	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)

[2024-04-17T01:56:49.587Z] 	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:677)

[2024-04-17T01:56:49.587Z] 	at groovy.lang.GroovyShell.parse(GroovyShell.java:689)

[2024-04-17T01:56:49.587Z] 	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)

[2024-04-17T01:56:49.587Z] 	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)

[2024-04-17T01:56:49.587Z] 	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:561)

[2024-04-17T01:56:49.587Z] 	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:513)

[2024-04-17T01:56:49.587Z] 	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:335)

[2024-04-17T01:56:49.587Z] 	at hudson.model.ResourceController.execute(ResourceController.java:101)

[2024-04-17T01:56:49.587Z] 	at hudson.model.Executor.run(Executor.java:442)

[2024-04-17T01:56:49.599Z] Finished: FAILURE

@dliappis
Copy link
Contributor

@pazone see #38951 (comment). This PR will also need to be backported I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants