When NodeJs is updated it is worth noting it needs to be updated in a few places.
There are a couple of considerations to consider when selecting a Node version to upgrade to:
- The version must be supported by the latest release of the CloudFoundry Node buildpack.
- The version must have a Cypress docker image associated with it, and appear in the list of Cypress image tags.
If both of these criteria are not met, it will not be possible to build the new dependency image locally and it will not be possible to proceed with the upgrade.
- Update
manifest.yml
to use the latest buildpack release - Install and set your local
nvm
to use the chosen Node version
nvm install VERSION
nvm use VERSION
- Update the engines in
package.json
and install the dependencies withnpm ci
. - Update the version used in
Dockerfile.dependencies
, then create/upload a new version of the dependency image (use the instructions from the Docker readme). Ensure that theDockerfile
is using the image you created or CircleCI will not be able to run most of the tests. - Update the engines in
test/sandbox/package.json
and install the dependencies withnpm ci
. - Update the node versions used in the below files:
test/sandbox/Dockerfile
- Step two of the native readme
- Run the unit tests to check the app
npm run test:unit
, and then start the appnpm run develop
and do some quick smoke tests to ensure the app works - Commit your changes, push the branch and then create a Draft PR to get the tests running
- Deploy the branch to the UAT environment so we can test the buildpack.
- Once the tests pass and the deployment works, mark the PR as ready for review
- Switch back the Node version so you can carry on with other tickets whilst waiting for the PR to be approved and merged ;-)
- Once the PR has been merged, do a release to production to finish the process.