-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat(ci): support building docker images for PRs #20323
feat(ci): support building docker images for PRs #20323
Conversation
.ci/packaging.groovy
Outdated
|
||
def imageName = "${name}" | ||
if (env.CHANGE_ID?.trim()) { | ||
imageName = "${name}/pr-${env.CHANGE_ID}" |
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 image will have a mane like docker.elastic.co/observability-ci/filebeat/pr-1000:a2b3a2b3bb12b2b1212b2
for me is weird, I'd like to release docker.elastic.co/observability-ci/filebeat:a2b3a2b3bb12b2b1212b2
and docker.elastic.co/observability-ci/filebeat:pr-1000
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.
Agreed. I sent a commit with this change, as I see it more convenient too
def oldName = "${DOCKER_REGISTRY}/beats/${name}:${libbetaVer}" | ||
def newName = "${DOCKER_REGISTRY}/observability-ci/${name}:${libbetaVer}" | ||
def newName = "${DOCKER_REGISTRY}/observability-ci/${name}:${tagName}" | ||
def commitName = "${DOCKER_REGISTRY}/observability-ci/${name}:${env.GIT_BASE_COMMIT}" |
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.
We are keeping the tag with the commit
…ne-2.0 * upstream/master: (29 commits) Add an explicit system test for processes on unix systems (elastic#20320) [Autodiscovery] Ignore ErrInputNotFinished errors in autodiscover config checks (elastic#20305) [CI] Update README.md with CI references (elastic#20316) Add ECK doc links to Heartbeat docs (elastic#20284) [Filebeat] Add export tests to x-pack/filebeat (elastic#20156) feat(ci): support building docker images for PRs (elastic#20323) Update system tests dependency (elastic#20287) [Libbeat] Log debug message if the Kibana dashboard can not be imported from the archive (elastic#12211) (elastic#20150) [Filebeat][Gsuite] Transform all dates to timestamp with processor (elastic#20308) Infer types in Prometheus remote_write (elastic#19944) Remove unnecessary restarts of metricsets while using Node autodiscover (elastic#19974) docs: update changelog on master branch (elastic#20259) feat(ci): support storing artifacts for PRs in separate dirs (elastic#20282) [CI] Change upstream reference (elastic#20296) [Filebeat] Updates to Suricata module (elastic#20220) [docs] Fix Windows download link for agent (elastic#20258) [docs] Rename release highlights to what's new (elastic#20255) fix: update the display name of the multibranch job (elastic#20265) [Elastic Agent] Add basic protocol to control Elastic Agent. (elastic#20146) Cisco ASA: Fix message 106100 (elastic#20245) ...
* feat(ci): support building docker images for PRs * chore: use PR_ID as tag
* feat(ci): support building docker images for PRs * chore: use PR_ID as tag
…20323) (#20468) * feat(ci): support building docker images for PRs (#20323) * feat(ci): support building docker images for PRs * chore: use PR_ID as tag * chore(ci): use build step for checking if is PR Co-authored-by: Victor Martinez <[email protected]> Co-authored-by: Victor Martinez <[email protected]>
* feat(ci): support building docker images for PRs * chore: use PR_ID as tag
…lastic#20323) (elastic#20467) * feat(ci): support building docker images for PRs (elastic#20323) * feat(ci): support building docker images for PRs * chore: use PR_ID as tag * chore(ci): use build step for checking if is PR
What does this PR do?
It uses the PR ID as the new name for the docker images built by the packaging build. This change will only apply to PRs. For any other type of build (merge, branch), the previous behavior will be kept.
Why is it important?
We want to generate images for the PRs, without overriding the current snapshot for releases. This way we will be able to consume those images for PRs in other projects, such as the e2e tests for Ingest Manager or integrations.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
Use cases