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

chore(publish.sh) fix publication check by switching from raw curl to docker buildx imagetools for stronger manifest retrieving #1564

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Feb 8, 2023

The PR #1558 aimed at fixing the publication process by decreasing the amount of checked platform.

But this was not enough as only the past 3 weekly where checked, so b9e129d fixed it by checking the 2 last LTS and the 2 last weekly in order to unblock the 2.375.3 LTS release.

This new PR aims at fixing the root cause which is the Docker buildx + DockerHub switching to OCI images (including OCI manifest) instead of the former Docker custom manifests.

Found the error message `` which pointed me to jjlin/docker-image-extract#2.

This change, announced in https://www.docker.com/blog/announcing-docker-hub-oci-artifacts-support/, was not seen as breaking but it was in fact.

By switching out from curl requests to the DockerHub API (which is fragile code) to the docker buildx imagetools command line:

  • It's a bit slower (acceptable since we only check 4 tags, not 30 as before)
  • It does not require an anonymous token (reuses the current Docker engine)
  • It's stronger for change as it will always delegate the manifest analysis to docker CLI internals

… docker buildx imagetools for stronger manifest retrieving

Signed-off-by: Damien Duportal <[email protected]>
@dduportal dduportal marked this pull request as ready for review February 8, 2023 17:07
@dduportal dduportal requested a review from a team as a code owner February 8, 2023 17:07
@dduportal dduportal added the chore label Feb 8, 2023
@MarkEWaite MarkEWaite merged commit 69a69eb into jenkinsci:master Feb 8, 2023
@dduportal dduportal deleted the chore/fix-publish-script branch February 8, 2023 17:57
@dduportal
Copy link
Contributor Author

Post merge: the publication step on trusted.ci shows the following output with this change:

# ...
[2023-02-08T17:59:16.496Z] + make publish
[2023-02-08T17:59:16.496Z] ./.ci/publish.sh
[2023-02-08T17:59:16.760Z] Docker repository in Use:
[2023-02-08T17:59:16.760Z] * JENKINS_REPO: jenkins/jenkins
[2023-02-08T17:59:20.987Z] Tag is already published: 2.389
[2023-02-08T17:59:24.295Z] Tag is already published: 2.390
[2023-02-08T17:59:28.506Z] Tag is already published: 2.375.2
[2023-02-08T17:59:43.425Z] Tag is already published: 2.375.3

=> LGTM.

dduportal added a commit to dduportal/docker that referenced this pull request Feb 15, 2023
…nymore but returns 1 instead when unpublished image is found

Signed-off-by: Damien Duportal <[email protected]>
dduportal added a commit that referenced this pull request Feb 15, 2023
chore(publish.sh) fixup #1564 (again) to correct weekly publications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants