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

packaging: staging artifacts with DEV=false #33620

Merged
merged 2 commits into from Nov 9, 2022

Conversation

v1v
Copy link
Member

@v1v v1v commented Nov 9, 2022

What does this PR do?

reduce the size of the Beats and Agent release artifacts, possible significantly. It should also lead to a small increase in efficiency.

Why

Setting DEV=true includes debug symbols in the released binary and disabled most build optimizations. Unrequired for releases

@v1v v1v added automation backport-v7.17.0 Automated backport with mergify backport-v8.4.0 Automated backport with mergify backport-v8.5.0 Automated backport with mergify labels Nov 9, 2022
@v1v v1v requested review from cmacknz and a team November 9, 2022 14:13
@v1v v1v self-assigned this Nov 9, 2022
@v1v v1v requested a review from a team as a code owner November 9, 2022 14:13
@v1v v1v requested review from leehinman and removed request for a team November 9, 2022 14:13
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Automation Label for the Observability productivity team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Nov 9, 2022
withEnv([
"DEV=true"
"DEV=${!type.equals('staging')}"
Copy link
Member

Choose a reason for hiding this comment

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

Which specific builds are staging? Release branches?

Copy link
Member Author

Choose a reason for hiding this comment

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

the release function is called when generating the binaries, if a branch then it uses staging otherwise snapshot.

See

beats/.ci/packaging.groovy

Lines 289 to 307 in e8df5e9

release('snapshot')
dir("${BASE_DIR}"){
pushCIDockerImages(arch: 'amd64')
}
}
prepareE2ETestForPackage("${beat}")
// Staging is only needed from branches (main or release branches)
if (isBranch()) {
// As long as we reuse the same worker to package more than
// once, the workspace gets corrupted with some permissions
// therefore let's reset the workspace to a new location
// in order to reuse the worker and successfully run the package
def work = "workspace/${env.JOB_BASE_NAME}-${env.BUILD_NUMBER}-staging"
ws(work) {
withEnv(["HOME=${env.WORKSPACE}"]) {
deleteDir()
release('staging')
}

@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 9, 2022

💚 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: 2022-11-09T14:38:00.716+0000

  • Duration: 12 min 26 sec

Test stats 🧪

Test Results
Failed 0
Passed 3
Skipped 0
Total 3

💚 Flaky test report

Tests succeeded.

🤖 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!)

@cmacknz
Copy link
Member

cmacknz commented Nov 9, 2022

I actually think it is worth adding a changelog entry for this.

Probably adding something like "Re-enable build optimizations to reduce binary size and improve performance" in the bugfix section affecting all Beats: https://github.com/elastic/beats/blob/main/CHANGELOG.next.asciidoc#bugfixes

@v1v
Copy link
Member Author

v1v commented Nov 9, 2022

/package

@v1v v1v merged commit 8b858d3 into elastic:main Nov 9, 2022
mergify bot pushed a commit that referenced this pull request Nov 9, 2022
(cherry picked from commit 8b858d3)

# Conflicts:
#	.ci/packaging.groovy
mergify bot pushed a commit that referenced this pull request Nov 9, 2022
mergify bot pushed a commit that referenced this pull request Nov 9, 2022
v1v added a commit that referenced this pull request Nov 9, 2022
(cherry picked from commit 8b858d3)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
v1v added a commit that referenced this pull request Nov 9, 2022
(cherry picked from commit 8b858d3)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation backport-v7.17.0 Automated backport with mergify backport-v8.4.0 Automated backport with mergify backport-v8.5.0 Automated backport with mergify Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants