Skip to content

Commit

Permalink
Improve method of deriving repo name from pullspec
Browse files Browse the repository at this point in the history
Theoretically, this works if the IMAGE reference contains a port number.

Co-authored-by: Adam Cmiel <[email protected]>
  • Loading branch information
ralphbean and chmeliik committed Jul 8, 2024
1 parent b750773 commit b70abf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion task/oci-copy-oci-ta/0.1/oci-copy-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ spec:
echo "Extracting artifact_type"
ARTIFACT_TYPE=$(cat "$(pwd)/source/$OCI_COPY_FILE" | yq '.artifact_type')
REPO=$(echo ${IMAGE} | awk -F ':' '{print $1}')
REPO=${IMAGE%:*}
echo "Found that ${REPO} is the repository for ${IMAGE}"
cat >artifact-manifest.json <<EOL
Expand Down
2 changes: 1 addition & 1 deletion task/oci-copy/0.1/oci-copy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
echo "Extracting artifact_type"
ARTIFACT_TYPE=$(cat "$(pwd)/source/$OCI_COPY_FILE" | yq '.artifact_type')
REPO=$(echo ${IMAGE} | awk -F ':' '{print $1}')
REPO=${IMAGE%:*}
echo "Found that ${REPO} is the repository for ${IMAGE}"
cat >artifact-manifest.json <<EOL
Expand Down

1 comment on commit b70abf2

@ralphbean
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/retest

Please sign in to comment.