Skip to content

Commit

Permalink
Fix: Cannot locally test azul-docker-pycharm changes (DataBiosphere/a…
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc committed Mar 26, 2024
2 parents 73cf271 + 5b52141 commit 509c3ba
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Docker
on:
pull_request:
push:
branches-ignore:
- "*-PR"
branches:
- master

env:
# The fully qualified image name of the image to build. The first component is
Expand Down Expand Up @@ -85,7 +85,9 @@ jobs:
env.azul_docker_registry,
env.azul_docker_pycharm_image
) }}"
cache-to: "${{ format(
# The value after '&&' in a ternary operator must be truthy, and since
# an empty string is falsy, we use ' ' instead.
cache-to: "${{ github.event_name == 'pull_request' && ' ' || format(
'type=registry,ref={0}{1}_buildcache,mode=max',
env.azul_docker_registry,
env.azul_docker_pycharm_image
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,26 @@ make images
docker pull localhost:5000/docker.io/ucscgi/azul-pycharm:2023.2.3-5
# To examine the image for vulnerabilities, browse the image in Docker Desktop.
# If an unnecessary package is found to have critical or high vulnerabilities,
# add a `RUN` instruction to the Dockerfile to remove the package.
# To test the image in Azul, run:
(cd ../azul && azul_docker_pycharm_version=2023.2.3-5 azul_docker_registry=localhost:5000/ make format)
# To test the image in Azul, you will need to temporarily modify Azul's
# `environment.py` to set the appropriate `azul_docker_images` value using the
# full image name noted above (starting with "localhost").
cd ../azul
git diff
> diff --git a/environment.py b/environment.py
> index f888a1b8e..e41273695 100644
> --- a/environment.py
> +++ b/environment.py
> @@ -273,7 +273,7 @@ def env() -> Mapping[str, Optional[str]]:
> 'ref': 'docker.io/library/python:{azul_python_version}-bullseye'
> },
> 'pycharm': {
> - 'ref': 'docker.io/ucscgi/azul-pycharm:2023.3.4-15'
> + 'ref': 'localhost:5000/docker.io/ucscgi/azul-pycharm:2023.3.4-15'
> },
> 'elasticsearch': {
> 'ref': 'docker.io/ucscgi/azul-elasticsearch:7.17.18-13'
make image_manifests.json
azul_docker_registry="" make format
cd -
make stop_registry
```

0 comments on commit 509c3ba

Please sign in to comment.