Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion packer-scripts/cosign-install
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,21 @@ main() {
#!/usr/bin/env bash

set -o errexit
set -o xtrace

main() {

args="$@"

if [ ! -z "${COSIGN_EXPERIMENTAL}" ] \
&& [ ! -z "${TRAVIS_REPO_PRIVATE}" ] \
&& [ $COSIGN_EXPERIMENTAL == 1 ] \
&& [ $TRAVIS_REPO_PRIVATE == "true" ] \
&& [[ $args != *"--key"* ]]
then
echo "Experimental cosign features are not allowed in builds for private repositories"
exit 1
fi

# call original cosign binary and send arguments
not_cosign $args

Expand Down