Skip to content

Validate docker image before bumping #40

@joemaller

Description

@joemaller

Check that the image exists before bumping. v5.9.2 currently does not exist on DockerHub, but it's the latest release returned from the WordPress API.

There are some notes here:

# TODO: Check DockerHub for existance of the latest release beffore continuing?
# https://registry.hub.docker.com/v2/repositories/library/wordpress/tags/5.9.1
# unknown tags return a 404:
# https://registry.hub.docker.com/v2/repositories/library/wordpress/tags/7.9.4

Might not be able to catch the 404, but checking for a name might be enough?

Here's the DockerHub error JSON for a non-existent image:

{
  "errinfo": {
    "namespace": "library",
    "repository": "wordpress",
    "tag": "5.9.5"
  },
  "message": "tag '5.9.5' not found"
}

A successful request is much bigger, but includes a top-level name key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions