Skip to content

Commit

Permalink
Verify notation AWS Signer plugin installation
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Dec 2, 2023
1 parent 0974f0f commit 6688410
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 10 additions & 8 deletions builder-base/scripts/install_notation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ NOTATION_FILENAME="notation_${NOTATION_VERSION}_linux_${TARGETARCH}.tar.gz"
NOTATION_DOWNLOAD_URL="https://github.com/notaryproject/notation/releases/download/v${NOTATION_VERSION}/${NOTATION_FILENAME}"
NOTATION_CHECKSUM_URL="https://github.com/notaryproject/notation/releases/download/v${NOTATION_VERSION}/notation_${NOTATION_VERSION}_checksums.txt"

AWS_SIGNER_PLUGIN_NAME="notation-aws-signer-plugin.zip"
AWS_SIGNER_PLUGIN_URL="https://d2hvyiie56hcat.cloudfront.net/linux/${TARGETARCH}/plugin/latest/${AWS_SIGNER_PLUGIN_NAME}"
NOTATION_AWS_SIGNER_PLUGIN_ZIP_FILENAME="notation-aws-signer-plugin.zip"
NOTATION_AWS_SIGNER_PLUGIN_URL="https://d2hvyiie56hcat.cloudfront.net/linux/${TARGETARCH}/plugin/latest/${AWS_SIGNER_PLUGIN_NAME}"
NOTATION_AWS_SIGNER_PLUGIN_DIRECTORY="$HOME/.config/notation/plugins/com.amazonaws.signer.notation.plugin"
NOTATION_AWS_SIGNER_PLUGIN_BINARY="notation-com.amazonaws.signer.notation.plugin"

function install_notation() {
wget \
Expand All @@ -45,12 +47,12 @@ function install_notation() {
function install_aws_signer_plugin() {
wget \
--progress dot:giga \
$AWS_SIGNER_PLUGIN_URL
unzip $AWS_SIGNER_PLUGIN_NAME
mkdir -p $HOME/.config/notation/plugins/com.amazonaws.signer.notation.plugin
mv notation-com.amazonaws.signer.notation.plugin $HOME/.config/notation/plugins/com.amazonaws.signer.notation.plugin
chmod +x $HOME/.config/notation/plugins/com.amazonaws.signer.notation.plugin/notation-com.amazonaws.signer.notation.plugin
rm LICENSE THIRD_PARTY_LICENSES $AWS_SIGNER_PLUGIN_NAME
$NOTATION_AWS_SIGNER_PLUGIN_URL
unzip $NOTATION_AWS_SIGNER_PLUGIN_ZIP_FILENAME
mkdir -p $NOTATION_AWS_SIGNER_PLUGIN_DIRECTORY
mv $NOTATION_AWS_SIGNER_PLUGIN_BINARY $NOTATION_AWS_SIGNER_PLUGIN_DIRECTORY
chmod +x $NOTATION_AWS_SIGNER_PLUGIN_DIRECTORY/$NOTATION_AWS_SIGNER_PLUGIN_BINARY
rm LICENSE THIRD_PARTY_LICENSES $NOTATION_AWS_SIGNER_PLUGIN_ZIP_FILENAME
}

[ ${SKIP_INSTALL:-false} != false ] || (install_notation && install_aws_signer_plugin)
2 changes: 2 additions & 0 deletions builder-base/scripts/validate_components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,6 @@ if [ "${FINAL_STAGE_BASE}" = "full-copy-stage" ]; then
/go/go1.21/bin/go-licenses --help

gcc --version

notation plugin list
fi

0 comments on commit 6688410

Please sign in to comment.