Add steps to copy release images to Docker Hub in Buildkite pipeline - #1692
Conversation
- Introduced new steps in `.buildkite/pipeline.yml` to trigger the copying of release images and UBI images to Docker Hub based on version tags. - Updated `.buildkite/release-package-registry-distribution.yml` to include commands for copying release images, UBI images, and lite images to Docker Hub, with appropriate tagging.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| - elastic/vault-docker-login#v0.6.0: | ||
| secret_path: 'kv/ci-shared/platform-ingest/elastic_docker_registry' | ||
|
|
||
| - trigger: unified-release-copy-elastic-images-to-dockerhub |
There was a problem hiding this comment.
Does this pipeline offer a dry run option ? It would be interesting being able to test these pipelines before a new tag is pushed.
There was a problem hiding this comment.
Hey @mrodm unified-release-copy-elastic-images-to-dockerhub does not currently support a dry-run mode. When the job runs, it performs an actual crane copy from docker.elastic.co to Docker Hub ( index.docker.io).
The pipeline is driven by IMAGES_NAMES (comma-separated namespace/name) and IMAGES_TAG.
To test before using a production tag, you can try triggering the pipeline with a non-production tag that already exists upstream and verify the results on Docker Hub.
…opying step - Updated the command syntax in `.buildkite/release-package-registry-distribution.yml` to use a single-line format for improved readability and consistency.
…ution - Updated the notification step to clarify pipeline execution conditions. - Improved error messaging in the tag validation script for better user guidance. - Added concurrency and retry settings to the release distribution steps for improved reliability. - Changed async behavior to false for Docker image copy steps to ensure sequential execution.
|
Added some changes with the feedback from the official buildkite skill to review pipelines |
- Added timeout and retry configurations for lint, build, smoke test, and test steps to improve reliability. - Set cancel_on_build_failing to true for test steps to halt execution on failure. - Updated Docker image publishing step to include concurrency settings and adjusted async behavior to false for sequential execution.
| key: test-linux | ||
| command: | ||
| - ".buildkite/scripts/run-tests.sh" | ||
| cancel_on_build_failing: true |
There was a problem hiding this comment.
I think I will keep this with the default value (false).
If these steps are run, we get more information about all the errors in test even if the first steps fail.
| - exit_status: 143 | ||
| limit: 2 | ||
| - exit_status: 255 | ||
| limit: 2 |
There was a problem hiding this comment.
I think I would keep these steps as before.
Not sure about the exit codes that the scripts will raise to allow retrying.
| depends_on: | ||
| - step: "input" | ||
| allow_failure: false | ||
| allow_dependency_failure: true |
There was a problem hiding this comment.
Adding this allow_dependency_failure setting, would it be the same as the current depends_on field?
There was a problem hiding this comment.
nop, this was a wrong recommendation, as adding this will continue with the release regardless of any dependency failing...
Co-authored-by: Mario Rodriguez Molins <marrodmo@gmail.com>
Co-authored-by: Mario Rodriguez Molins <marrodmo@gmail.com>
💚 Build Succeeded
History
|
mrodm
left a comment
There was a problem hiding this comment.
LGTM
It will require to pay attention to these pipeline when new tags are pushed:
- New tag pushed to package-registry via GitHub releases that triggers the pipeline https://buildkite.com/elastic/package-registry
- New tag pushed to fleet-server that triggers the pipeline https://buildkite.com/elastic/package-registry-release-package-registry-distribution
Summary
Closes #1270
Adds Buildkite pipeline steps to copy released Docker images from
docker.elastic.coto DockerHub (hub.docker.com/u/elastic) as part of the release process.Changes
package-registry/package-registry(empty image)On every semver release tag (
v*.*.*), two new trigger steps copy the standard and UBI images to DockerHub after thepublishstep completes:package-registry/package-registry:<tag>package-registry/package-registry:<tag>-ubipackage-registry/distribution(distribution image)The existing release distribution pipeline now also copies all four image variants to DockerHub after the release steps complete:
package-registry/distribution:<tag>(production)package-registry/distribution:<tag>-ubi(production UBI)package-registry/distribution:lite-<tag>(lite)package-registry/distribution:lite-<tag>-ubi(lite UBI)Notes
The original issue scoped only the empty
package-registry/package-registryimage for DockerHub publishing, due to concerns about the large size of distribution images. This PR also includes the distribution image variants to cover all images released by these pipelines — however, whetherpackage-registry/distribution(and in particular thelitevariants) should be published to DockerHub was not explicitly confirmed. This is flagged for reviewer awareness.