Skip to content

Commit

Permalink
Merge pull request #578 from uktrade/chore/dependencies-2024-06-10
Browse files Browse the repository at this point in the history
Dependencies 2024-06-10
  • Loading branch information
oliverjwroberts authored Jun 10, 2024
2 parents 7f232ac + edd9e51 commit 2a13773
Show file tree
Hide file tree
Showing 5 changed files with 604 additions and 566 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gcr.io/sre-docker-registry/omis-dependencies:1.0.0
FROM gcr.io/sre-docker-registry/omis-dependencies:1.0.1

ARG CURRENT_UID
ARG CURRENT_GID
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ COPY --chown=node:node package*.json "$HOME/"
WORKDIR $HOME

# Install specific version of cypress
RUN npm install -g cypress@13.8.1 \
RUN npm install -g cypress@13.11.0 \
&& npx cypress verify \
&& npx cypress cache path \
&& npx cypress cache list \
Expand Down
46 changes: 46 additions & 0 deletions docs/Dependabot.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,49 @@ If you're running against a live environment, replace the environment domain wit
14. Rebase the dependency branch against `master` to remove all the merge commits, then push the changes and open a PR.
15. If you are satisfied that everything is in order and all the tests have passed, request reviews as normal.
16. Ensure that the dev deployment has succeeded. If they haven't, notify the Platform Enhancements team.

## Cypress

When Cypress is updated, the Cypress version used in [`Dockerfile.dependencies`](../Dockerfile.dependencies) needs to be updated as well.

> The process is the same for Data Hub Frontend. To setup Google Cloud CLI, request access to the container registries, or if you are having issues, please read [`Docker.md`](https://github.com/uktrade/data-hub-frontend/blob/main/docs/Docker.md#creating-docker-container-for-circleci) in the Data Hub Frontend repo.
First, in `Dockerfile.dependencies`, bump the Cypress version to match that in `package.json`.

```Dockerfile
RUN npm install -g cypress@{INSERT_CYPRESS_VERSION_HERE} \
...
```

From the terminal, build the new dependencies image.

```bash
docker build -f Dockerfile.dependencies -t omis-dependencies . --platform linux/amd64
```

Tag the dependencies image with the incremented version.

```bash
export VERSION=1.0.1 # Increment this version each time when you edit Dockerfile.
docker tag omis-dependencies:latest gcr.io/sre-docker-registry/omis-dependencies:${VERSION}
docker tag omis-dependencies:latest gcr.io/sre-docker-registry/omis-dependencies:latest
```

Push the new images to the Google Cloud container registry.

```bash
gcloud auth login
docker push gcr.io/sre-docker-registry/omis-dependencies:${VERSION}
docker push gcr.io/sre-docker-registry/omis-dependencies:latest
```

The new image should now be listed in the [OMIS Google Cloud Container Registry](https://console.cloud.google.com/gcr/images/sre-docker-registry/global/omis-dependencies).

Update the version tag in `Dockerfile`.

```Dockerfile
FROM gcr.io/sre-docker-registry/omis-dependencies:{INSERT_VERSION_HERE}
...
```

Commit the new changes to the `chore/dependencies` before raising the main Dependabot PR.
Loading

0 comments on commit 2a13773

Please sign in to comment.