Skip to content

Commit

Permalink
Merge pull request #8 from NASA-IMPACT/bug/fix_comma
Browse files Browse the repository at this point in the history
fix comma
  • Loading branch information
ranchodeluxe authored May 2, 2023
2 parents bbb0fca + 7c83e0d commit 2bbb5af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docker-base-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
PARENT_DIR=$(echo $DOCKERFILE_PATH | xargs -I{} dirname {})
# check if repo does not exist
existing_repo_uri=$(aws ecr-public describe-repositories | jq '.repositories | map(.repositoryUri)' | grep "$NAME_AND_DESC" | xargs)
existing_repo_uri=$(aws ecr-public describe-repositories | jq '.repositories | map(.repositoryUri)' | grep "$NAME_AND_DESC" | sed 's/,//g' | xargs)
echo "###################################"
echo "FOUND EXISTING REPO: $existing_repo_uri"
echo "###################################"
Expand All @@ -42,6 +42,9 @@ jobs:
--catalog-data=description='veda-base-image',architectures='x86-64',operatingSystems='Linux' \
--tags=Key='org',Value='NASA' \
--tags=Key='project',Value='VEDA'
# now get the URI again so we can use it when we build
existing_repo_uri=$(aws ecr-public describe-repositories | jq '.repositories | map(.repositoryUri)' | grep "$NAME_AND_DESC" | sed 's/,//g' | xargs)
fi
# check if image with correct tags does not exist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-custom-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
PARENT_DIR=$(echo $DOCKERFILE_PATH | xargs -I{} dirname {})
# check if repo does not exist
existing_repo_uri=$(aws ecr-public describe-repositories | jq '.repositories | map(.repositoryUri)' | grep "$NAME_AND_DESC" | xargs)
existing_repo_uri=$(aws ecr-public describe-repositories | jq '.repositories | map(.repositoryUri)' | grep "$NAME_AND_DESC" | sed 's/,//g' | xargs)
echo "###################################"
echo "FOUND EXISTING REPO: $existing_repo_uri"
echo "###################################"
Expand All @@ -54,7 +54,7 @@ jobs:
# check if image with correct tags does not exist
DOCKERFILE_DIGEST=$(sha256sum "$DOCKERFILE_PATH" | cut -d' ' -f1)
image_exists=$(aws ecr-public describe-images --repository-name "$NAME_AND_DESC" --image-ids=imageTag="$VERSION" | jq '.imageDetails | map(.repositoryName)' | grep "$NAME_AND_DESC" | xargs)
image_exists=$(aws ecr-public describe-images --repository-name "$NAME_AND_DESC" --image-ids=imageTag="$VERSION" | jq '.imageDetails | map(.repositoryName)' | grep "$NAME_AND_DESC" | sed 's/,//g' | xargs)
echo "###################################"
echo "FOUND EXISTING IMAGE WITH TAG: $image_exists > $VERSION"
echo "###################################"
Expand Down

0 comments on commit 2bbb5af

Please sign in to comment.