ci: canonicalize release SSH command
All checks were successful
State Corp Backend CI/CD / Quality gate (push) Successful in 4m5s
State Corp Backend CI/CD / Build linux/amd64 images once (push) Successful in 4m33s
State Corp Backend CI/CD / Refresh and release internal main (push) Has been skipped
State Corp Backend CI/CD / Release customer main (push) Has been skipped
State Corp Backend CI/CD / Release dev (push) Successful in 1m2s

This commit is contained in:
2026-08-27 14:08:54 +03:00
parent e060c36b6d
commit b2a45aef51
2 changed files with 9 additions and 2 deletions

View File

@@ -1,12 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "${0##*/}" == ssh ]]; then
remote_command="${!#}"
[[ "${remote_command}" == /opt/ecos-dev/release-service\ * ]]
[[ "${remote_command}" != *' ' ]]
exit 0
fi
script_dir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
test_dir=$(mktemp -d)
trap 'rm -rf "${test_dir}"' EXIT
true_path=$(type -P true)
cp "${true_path}" "${test_dir}/ssh"
cp "$0" "${test_dir}/ssh"
digest="registry.dev.nii-ecos.ru/avm/state-corp-backend-web@sha256:$(printf '0%.0s' {1..64})"
encoded_fixture=$(printf fixture | base64)