ci: canonicalize release SSH command

This commit is contained in:
2026-08-27 14:08:54 +03:00
parent 5ec7c411a0
commit 341fd6ee3f
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)