Skip to content

Commit

Permalink
Fix: Cannot locally test azul-docker-elasticsearch changes (DataBiosp…
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-ucsc authored Mar 26, 2024
2 parents b017715 + d785bfc commit 8c56659
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 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:
- main

env:
# The fully qualified image name of the image to build. The first component is
Expand Down Expand Up @@ -78,7 +78,9 @@ jobs:
env.azul_docker_registry,
env.azul_docker_elasticsearch_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_elasticsearch_image
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,26 @@ docker pull localhost:5000/docker.io/ucscgi/azul-elasticsearch:7.17.15-6
# 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_elasticsearch_version=7.17.15-6 azul_docker_registry=localhost:5000/ make test)
# 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..5970816ac 100644
> --- a/environment.py
> +++ b/environment.py
> @@ -276,7 +276,7 @@ def env() -> Mapping[str, Optional[str]]:
> 'ref': 'docker.io/ucscgi/azul-pycharm:2023.3.4-15'
> },
> 'elasticsearch': {
> - 'ref': 'docker.io/ucscgi/azul-elasticsearch:7.17.18-13'
> + 'ref': 'localhost:5000/docker.io/ucscgi/azul-elasticsearch:7.17.18-13'
> },
> 'bigquery_emulator': {
> 'ref': 'ghcr.io/hannes-ucsc/bigquery-emulator:azul'
make image_manifests.json
azul_docker_registry="" make test
cd -
make stop_registry
```

0 comments on commit 8c56659

Please sign in to comment.