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

Support Renovate updating of Cypress Docker images #1255

Closed
MikeMcC399 opened this issue Nov 24, 2024 · 5 comments
Closed

Support Renovate updating of Cypress Docker images #1255

MikeMcC399 opened this issue Nov 24, 2024 · 5 comments
Assignees

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Nov 24, 2024

What would you like?

Ensure that all externally used images can take advantage of Renovate support of Docker image updates.

Why is this needed?

Users need an automated way to update and test new releases of Cypress Docker images used in CI in a controlled manner.

Renovate is an automated dependency update system, used internally by Cypress, and by other well-known industry players (see Why use Renovate).

The Renovate Docker documentation states:

Renovate supports upgrading dependencies in various types of Docker definition files:

  • Docker's Dockerfile files
  • Docker Compose docker-compose.yml, compose.yml files
  • Visual Studio Code dev containers and GitHub Codespaces images and features
  • CircleCI config files
  • Kubernetes manifest files
  • Ansible configuration files

Discussion

Docker is able to work with Cypress Docker image tags that "look" like a version (see Docker > How it Works).

Repo name Tag name Renovate-Docker compatible Example
cypress/factory FACTORY_VERSION yes 5.1.0
cypress/base BASE_IMAGE_TAG yes 22.11.0
cypress/browsers BROWSERS_IMAGE_TAG NO node-22.11.0-chrome-131.0.6778.69-1-ff-132.0.2-edge-131.0.2903.51-1
cypress/included INCLUDED_IMAGE_SHORT_TAG yes 13.16.0
cypress/included INCLUDED_IMAGE_TAG NO cypress-13.16.0-node-22.11.0-chrome-131.0.6778.69-1-ff-132.0.2-edge-131.0.2903.51-1

BASE_IMAGE_TAG="${NODE_VERSION}"
BROWSERS_IMAGE_TAG="node-${NODE_VERSION}-chrome-${CHROME_VERSION}-ff-${FIREFOX_VERSION}-edge-${EDGE_VERSION}"
INCLUDED_IMAGE_SHORT_TAG="${CYPRESS_VERSION}"
INCLUDED_IMAGE_TAG="cypress-${CYPRESS_VERSION}-${BROWSERS_IMAGE_TAG}"

Adding a BROWSERS_IMAGE_SHORT_TAG defined as simply NODE_VERSION would add a Renovate-Docker-compatible tag to the cypress/browsers image. This would close the gap and ensure that each image type has one Renovate-Docker-compatible tag.

Like the INCLUDED_IMAGE_SHORT_TAG, the image labeled by the BROWSERS_IMAGE_SHORT_TAG would not be immutable, it would point to the latest published cypress/browsers image for a given NODE_VERSION.

For instance, given the following set of cypress/browser published images, the image name cypress/browsers:22.11.0 would successively move to point to each new image as it is published.

Image Publication
cypress/browsers:node-22.11.0-chrome-130.0.6723.69-1-ff-132.0-edge-130.0.2849.56-1 Oct 30, 2024
cypress/browsers:node-22.11.0-chrome-130.0.6723.116-1-ff-132.0.1-edge-130.0.2849.68-1 Nov 6, 2024
cypress/browsers:node-22.11.0-chrome-131.0.6778.69-1-ff-132.0.2-edge-131.0.2903.51-1 Nov 19, 2024

Users who need an immutable set of browser versions would use the long BROWSERS_IMAGE_TAG such as in cypress/browsers:node-22.11.0-chrome-130.0.6723.69-1-ff-132.0-edge-130.0.2849.56-1. Those who need Renovate compatibility in CircleCI, or other supported definition files, or who simply prefer the shorter notation, would use the BROWSERS_IMAGE_SHORT_TAG, such as cypress/browsers:22.11.0.

@MikeMcC399
Copy link
Collaborator Author

I plan to submit changes to implement this suggestion.

@MikeMcC399

This comment was marked as resolved.

@MikeMcC399
Copy link
Collaborator Author

  • PR docs: update tag descriptions #1258 adds tag documentation. To avoid documentation maintainability issues there is no mention of Renovate in the Cypress Docker images documentation.

@MikeMcC399
Copy link
Collaborator Author

Docker Hub repo cypress/browsers shows the short-form image tag is now published:

docker pull cypress/browsers:22.11.0

@MikeMcC399
Copy link
Collaborator Author

Request is now implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant