ci: remove git-crypt, switch to sops
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -127,14 +127,18 @@ test::one(){
|
||||
return "$ret"
|
||||
}
|
||||
|
||||
# Similar to test::one, however tests will be skipped if secrets cannot be decrypted
|
||||
test::secret(){
|
||||
local inputFile="$1"
|
||||
shift
|
||||
|
||||
if sops exec-file "$inputFile" echo > /dev/null 2>&1; then
|
||||
test::one "$@" --input-yaml "$inputFile"
|
||||
else
|
||||
logger::warning "Skip \"$1\": secrets not available"
|
||||
fi
|
||||
}
|
||||
|
||||
disable(){
|
||||
logger::warning "Test \"$2\" has been disabled."
|
||||
}
|
||||
|
||||
secret(){
|
||||
if [ -z "${DAGGER_SECRETS_LOADED+x}" ] || [ "$DAGGER_SECRETS_LOADED" != "1" ]; then
|
||||
logger::warning "Skip \"$2\": secrets not available"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
Binary file not shown.
@@ -6,11 +6,6 @@ readonly d=$(cd "$(dirname "${BASH_SOURCE[0]:-$PWD}")" 2>/dev/null 1>&2 && pwd)
|
||||
# shellcheck source=/dev/null
|
||||
. "$d/test-lib.sh"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
if grep -q "DAGGER_SECRETS" "$d/test.secret"; then
|
||||
source "$d/test.secret"
|
||||
fi
|
||||
|
||||
# Point this to your dagger binary
|
||||
readonly DAGGER_BINARY="${DAGGER_BINARY:-$d/../cmd/dagger/dagger}"
|
||||
# The default arguments are a no-op, but having "anything" is a little cheat necessary for "${DAGGER_BINARY_ARGS[@]}" to not be empty down there
|
||||
|
Reference in New Issue
Block a user