Skip to content

Commit 6641661

Browse files
committed
docs: old version release instructions
1 parent 3ef6027 commit 6641661

File tree

4 files changed

+51
-16
lines changed

4 files changed

+51
-16
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,22 @@ docker compose run test-factory-all-included
4747

4848
#### Automatic
4949

50-
To publish a new image for `factory`, `included`, `browsers`, and `base`, open a PR with the desired version(s) updated in the `factory/.env` file. Once the PR is merged into master, the corresponding images will be pushed to dockerhub via an automated script run in CI. Please check that the CI jobs pass after merge.
50+
##### New versions
5151

52-
In general, `factory/.env` master should contain the latest versions we officially support. If you need to release an older version please modify `circle.yml` to push releases from a feature branch instead of setting the version in master to older versions.
52+
To publish a new image for `factory`, `included`, `browsers`, and `base`, open a PR with the desired version(s) updated in the [factory/.env](./factory/.env) file. Once the PR is merged into the `master` branch, the corresponding images will be pushed to Docker Hub via an automated script run in CI. Please check that the CI jobs pass after merge.
53+
54+
##### Older versions
55+
56+
>Note: Assistance from a member of the Cypress org is required for this process
57+
58+
In general, [factory/.env](./factory/.env) in the `master` branch should contain the latest versions we officially support. If you need to release an older version, do not modify contents in the `master` branch. Instead, carry out the following steps:
59+
60+
1. Create a feature branch in the form `<cypress-version>-node-<node.js version>-publish`, for example `13.11.0-node-18.20.3-publish`, branched from the `master` branch. If you are not a member of the Cypress org, make a request via a new issue to create a feature branch.
61+
2. Modify [factory/.env](./factory/.env) with the desired versions. Do not modify the `FACTORY_VERSION`. No new `cypress/factory` image should be published with this process.
62+
3. Modify [factory/docker-compose.yml](./factory/docker-compose.yml) to comment out the creation of `latest` tags. Comment out the `cypress/included` `INCLUDED_IMAGE_SHORT_TAG` to also prevent this tag from being created. This step is essential to avoid related tags of existing released images being moved back to point to older images.
63+
4. Modify [circle.yml](circle.yml) to push releases from the feature branch.
64+
5. Open a PR which targets the feature branch.
65+
6. After PR merge, check Docker Hub and the associated new image(s).
5366

5467
#### Manual
5568

circle.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# info on building Docker images on Circle
22
# https://circleci.com/docs/2.0/building-docker-images/
3+
4+
## If you wish to release an older Docker image, do not modify this file in the master branch.
5+
## Follow the instructions in the CONTRIBUTING document and work instead in a feature branch.
6+
## Modify the push jobs below to be triggered on the feature branch, not the master branch.
7+
38
version: 2.1
49

510
orbs:
@@ -328,7 +333,11 @@ workflows:
328333
context: test-runner:docker-push
329334
filters:
330335
branches:
331-
only: # only branches matching the below regex filters will run
336+
only:
337+
# Only branches matching the below regex filters will run
338+
# Change to a feature branch such as <cypress-version>-node-<node.js version>-publish
339+
# if publishing an old version
340+
# This job must run because the base, browser and included jobs depend on it
332341
- master
333342
requires:
334343
- factory
@@ -341,7 +350,10 @@ workflows:
341350
context: test-runner:docker-push
342351
filters:
343352
branches:
344-
only: # only branches matching the below regex filters will run
353+
only:
354+
# Only branches matching the below regex filters will run
355+
# Change to a feature branch such as <cypress-version>-node-<node.js version>-publish
356+
# if publishing an old version
345357
- master
346358
requires:
347359
- "Push Factory Image"
@@ -353,7 +365,10 @@ workflows:
353365
context: test-runner:docker-push
354366
filters:
355367
branches:
356-
only: # only branches matching the below regex filters will run
368+
only:
369+
# Only branches matching the below regex filters will run
370+
# Change to a feature branch such as <cypress-version>-node-<node.js version>-publish
371+
# if publishing an old version
357372
- master
358373
requires:
359374
- "Push Factory Image"
@@ -365,7 +380,10 @@ workflows:
365380
context: test-runner:docker-push
366381
filters:
367382
branches:
368-
only: # only branches matching the below regex filters will run
383+
only:
384+
# Only branches matching the below regex filters will run
385+
# Change to a feature branch such as <cypress-version>-node-<node.js version>-publish
386+
# if publishing an old version
369387
- master
370388
requires:
371389
- "Push Factory Image"

factory/.env

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
## This env represents the latest versions cyrpess supports. If you wish to push an older docker image,
2-
## please modify circle ci to release a one off branch instead of merging old versions to this file in master.
3-
## For example, one could modify the filters on the push jobs.
4-
## https://github.com/cypress-io/cypress-docker-images/blob/matth/docker-factory/circle.yml#L271-L274
5-
## to setup a one off branch and create at a PR to it to release resulting images.
1+
## This env file represents the latest versions Cypress supports.
2+
##
3+
## If you wish to release an older Docker image, do not modify this file in the master branch.
4+
## Follow the instructions in the CONTRIBUTING document and work instead in a feature branch.
65

76
# The debian image the factory is based on
87
BASE_IMAGE='debian:12-slim'

factory/docker-compose.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# REPO_PREFIX is used in CI to deploy to other docker registries than dockerhub.
22

3+
## If you wish to release an older Docker image, do not modify this file in the master branch.
4+
## Follow the instructions in the CONTRIBUTING document and work instead in a feature branch.
5+
## Comment out the tags entries for latest tags below so that no latest tag is created.
6+
## Comment out the INCLUDED_IMAGE_SHORT_TAG so that this tag is not reassigned to an older version.
7+
38
services:
49

510
factory:
@@ -12,7 +17,7 @@ services:
1217
BASE_IMAGE: ${BASE_IMAGE}
1318
FACTORY_DEFAULT_NODE_VERSION: ${FACTORY_DEFAULT_NODE_VERSION}
1419
tags:
15-
- ${REPO_PREFIX-}cypress/factory:latest
20+
- ${REPO_PREFIX-}cypress/factory:latest # comment out for release of older version
1621
- ${REPO_PREFIX-}cypress/factory:${FACTORY_VERSION}
1722
command: node -v
1823

@@ -31,8 +36,8 @@ services:
3136
YARN_VERSION: ${YARN_VERSION}
3237
# WEBKIT_VERSION: ${WEBKIT_VERSION}
3338
tags:
34-
- ${REPO_PREFIX-}cypress/included:latest
35-
- ${REPO_PREFIX-}cypress/included:${INCLUDED_IMAGE_SHORT_TAG}
39+
- ${REPO_PREFIX-}cypress/included:latest # comment out for release of older version
40+
- ${REPO_PREFIX-}cypress/included:${INCLUDED_IMAGE_SHORT_TAG} # comment out for release of older version
3641
- ${REPO_PREFIX-}cypress/included:${INCLUDED_IMAGE_TAG}
3742
command: node -v
3843

@@ -49,7 +54,7 @@ services:
4954
FIREFOX_VERSION: ${FIREFOX_VERSION}
5055
EDGE_VERSION: ${EDGE_VERSION}
5156
tags:
52-
- ${REPO_PREFIX-}cypress/browsers:latest
57+
- ${REPO_PREFIX-}cypress/browsers:latest # comment out for release of older version
5358
- ${REPO_PREFIX-}cypress/browsers:${BROWSERS_IMAGE_TAG}
5459
command: node -v
5560

@@ -63,7 +68,7 @@ services:
6368
FACTORY_VERSION: ${FACTORY_VERSION}
6469
YARN_VERSION: ${YARN_VERSION}
6570
tags:
66-
- ${REPO_PREFIX-}cypress/base:latest
71+
- ${REPO_PREFIX-}cypress/base:latest # comment out for release of older version
6772
- ${REPO_PREFIX-}cypress/base:${BASE_IMAGE_TAG}
6873
command: node -v
6974

0 commit comments

Comments
 (0)