Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

Commit c215abf

Browse files
committed
refac(back): #1351 adapt cosign
- Adapt cosign command to avoid storing sensitive data in disk
1 parent 33a9564 commit c215abf

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

src/args/deploy-container/entrypoint.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ function deploy {
77
local credentials_user="${4}"
88
local tag="${5}"
99

10-
: \
11-
&& info Syncing container image: "${tag}" \
10+
: && info Syncing container image: "${tag}" \
1211
&& command=(
1312
skopeo
1413
--insecure-policy
@@ -39,13 +38,14 @@ function sign {
3938
local tag="${5}"
4039

4140
if [ "${sign}" = "1" ]; then
42-
: \
43-
&& info "Signing container image: ${tag}" \
44-
&& cosign login "${registry}" -u "${credentials_user}" -p "${credentials_token}" \
45-
&& cosign sign -y "${tag}"
41+
: && info "Signing container image: ${tag}" \
42+
&& cosign sign \
43+
--yes=true \
44+
--registry-username="${credentials_user}" \
45+
--registry-password="${credentials_token}" \
46+
"${tag}"
4647
else
47-
: \
48-
&& info "Skipping signing container ${tag}"
48+
: && info "Skipping signing container ${tag}"
4949
fi
5050
}
5151

@@ -58,10 +58,7 @@ function main {
5858
local sign="__argSign__"
5959
local tag="__argTag__"
6060

61-
export COSIGN_EXPERIMENTAL="1"
62-
63-
: \
64-
&& deploy \
61+
: && deploy \
6562
"${attempts}" \
6663
"${container_image}" \
6764
"${credentials_token}" \

0 commit comments

Comments
 (0)