constellation/e2e/malicious-join/job_template.sh.in
Daniel Weiße 273a6ba853
ci: use structured logging for all parts of the malicious-join test (#2557)
* Use structured logging for all parts of the test
* Fix malicious-join image build action

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2023-11-07 09:02:19 +01:00

27 lines
603 B
Bash

#!/usr/bin/env bash
lib=$(realpath @@BASE_LIB@@) || exit 1
stat "${lib}" >> /dev/null || exit 1
# shellcheck source=../../bazel/sh/lib.bash
if ! source "${lib}"; then
echo "Error: could not find import"
exit 1
fi
yq=$(realpath @@YQ_BIN@@)
template=$(realpath @@TEMPLATE@@)
REPO_TAG=$(realpath @@REPO_TAG@@)
export REPO_TAG
cd "${BUILD_WORKING_DIRECTORY}"
if [[ $# -eq 0 ]]; then
workdir="."
else
workdir="$1"
fi
echo "Stamping job deployment with $(cat "${REPO_TAG}")"
$yq eval ".spec.template.spec.containers[0].image = \"$(cat "${REPO_TAG}")\"" "$template" > "$workdir/stamped_job.yaml"