Skip to content

Commit

Permalink
DAS-1708 - Fix names of images built locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlittlejohns authored Feb 1, 2023
1 parent 5f27d0d commit 7cd1232
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 79 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: install test lint build-image push-image build-test-image test-in-docker run-in-docker
.PHONY: install test lint build-image build-test-image test-in-docker run-in-docker

install:
pip install -r requirements/core.txt -r requirements/dev.txt
Expand All @@ -12,9 +12,6 @@ lint:
build-image:
LOCAL_SVCLIB_DIR=${LOCAL_SVCLIB_DIR} bin/build-image

push-image:
bin/push-image

build-test-image:
bin/build-test-image

Expand Down
2 changes: 1 addition & 1 deletion bin/build-image
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
# source the .env file if it exists
[[ -f .env ]] && source .env

image="harmonyservices/netcdf-to-zarr"
image="ghcr.io/nasa/harmony-netcdf-to-zarr"
tag=${1:-latest}

if [ -d "deps" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/build-test-image
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

test_image="harmonyservices/netcdf-to-zarr-tests"
test_image="ghcr.io/nasa/harmony-netcdf-to-zarr-test"
tag=${1:-latest}

# We use the `host` network mode so we can have access to the
Expand Down
32 changes: 0 additions & 32 deletions bin/install-aws-cli

This file was deleted.

36 changes: 0 additions & 36 deletions bin/push-image

This file was deleted.

4 changes: 2 additions & 2 deletions bin/run-in-docker
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# It is meant to allow development and testing without repeatedly rebuilding the docker image. To
# run a completely clean container using only what is in the image, as will be done in deployed
# environments, run
# `docker run --rm -it --env-file=.env harmonyservices/netcdf-to-zarr`
# `docker run --rm -it --env-file=.env ghcr.io/nasa/harmony-netcdf-to-zarr`

# If the optional environment variable LOCAL_SVCLIB_DIR is set to the directory
# of a local clone of the `harmony-service-lib-py` repo, it will be mounted
Expand Down Expand Up @@ -38,5 +38,5 @@ docker run --rm -it \
-v $(pwd):/opt/harmony-netcdf-to-zarr \
${svclib_volume} \
--entrypoint= \
harmonyservices/netcdf-to-zarr \
ghcr.io/nasa/harmony-netcdf-to-zarr \
bash -c "${cmd}"
25 changes: 25 additions & 0 deletions bin/run-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
###############################################################################
# Execute the nasa/harmony-netcdf-to-zarr-test Docker image as a container.
# This will run the unit test suite and check for Python linting errors.
#
# This script will output test coverage information to a `coverage` directory
# and JUnit test report output to a `test-reports` directory on the host
# machine executing this script.
#
###############################################################################

set -ex

# Make the directory into which XML format test reports will be saved
mkdir -p test-reports

# Make the directory into which coverage reports will be saved
mkdir -p coverage

# Run the tests in a Docker container with mounted volumes for XML report
# output and test coverage reporting
docker run --rm \
-v $(pwd)/test-reports:/home/tests/reports \
-v $(pwd)/coverage:/home/tests/coverage \
ghcr.io/nasa/harmony-netcdf-to-zarr-test
4 changes: 2 additions & 2 deletions bin/test-in-docker
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# suite. It is meant to allow development and testing without repeatedly rebuilding the docker image. To
# run a completely clean container using only what is in the image, as will be done in CI environments,
# run:
# `docker run --rm -it --env-file=.env harmonyservices/netcdf-to-zarr-tests`
# `docker run --rm -it --env-file=.env ghcr.io/nasa/harmony-netcdf-to-zarr-test`

# If the optional environment variable LOCAL_SVCLIB_DIR is set to the directory
# of a local clone of the `harmony-service-lib-py` repo, it will be mounted
Expand All @@ -31,5 +31,5 @@ docker run --rm -it \
-v $(pwd):/opt/harmony-netcdf-to-zarr \
${svclib_volume} \
--entrypoint= \
harmonyservices/netcdf-to-zarr-tests \
ghcr.io/nasa/harmony-netcdf-to-zarr-test \
bash -c "${cmd}"
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG TAG=latest
FROM harmonyservices/netcdf-to-zarr:$TAG
FROM ghcr.io/nasa/harmony-netcdf-to-zarr:$TAG

COPY requirements/core.txt requirements/core.txt

Expand Down

0 comments on commit 7cd1232

Please sign in to comment.