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
Conversation
withEnv([ | ||
"DEV=true" | ||
"DEV=${!type.equals('staging')}" |
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.
Which specific builds are staging? Release branches?
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.
the release
function is called when generating the binaries, if a branch then it uses staging
otherwise snapshot
.
See
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') | |
} |
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 |
/package |
(cherry picked from commit 8b858d3) # Conflicts: # .ci/packaging.groovy
(cherry picked from commit 8b858d3)
(cherry picked from commit 8b858d3)
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