Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refac(back): #1351 adapt cosign #1361

Merged
merged 1 commit into from
Jul 27, 2024
Merged
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
21 changes: 9 additions & 12 deletions src/args/deploy-container/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ function deploy {
local credentials_user="${4}"
local tag="${5}"

: \
&& info Syncing container image: "${tag}" \
: && info Syncing container image: "${tag}" \
&& command=(
skopeo
--insecure-policy
Expand Down Expand Up @@ -39,13 +38,14 @@ function sign {
local tag="${5}"

if [ "${sign}" = "1" ]; then
: \
&& info "Signing container image: ${tag}" \
&& cosign login "${registry}" -u "${credentials_user}" -p "${credentials_token}" \
&& cosign sign -y "${tag}"
: && info "Signing container image: ${tag}" \
&& cosign sign \
--yes=true \
--registry-username="${credentials_user}" \
--registry-password="${credentials_token}" \
"${tag}"
else
: \
&& info "Skipping signing container ${tag}"
: && info "Skipping signing container ${tag}"
fi
}

Expand All @@ -58,10 +58,7 @@ function main {
local sign="__argSign__"
local tag="__argTag__"

export COSIGN_EXPERIMENTAL="1"

: \
&& deploy \
: && deploy \
"${attempts}" \
"${container_image}" \
"${credentials_token}" \
Expand Down
Loading