Browse Source

minor fixes

main
Nicolas Massé 2 months ago
parent
commit
08efc06003
  1. 20
      tekton/common/task-flightctl-update-digest.yaml

20
tekton/common/task-flightctl-update-digest.yaml

@ -43,6 +43,18 @@ spec:
exit 0 exit 0
fi fi
# Check if the image name has a tag and/or digest and remove them
if [[ "${IMAGE_NAME}" == *"@"* ]]; then
IMAGE_NAME="${IMAGE_NAME%@*}"
fi
if [[ "${IMAGE_NAME}" == *":"* ]]; then
IMAGE_NAME="${IMAGE_NAME%%:*}"
fi
if [ -z "${IMAGE_NAME}" ]; then
echo "IMAGE_NAME is not set. Cannot proceed."
exit 1
fi
# Print versions of the program we use # Print versions of the program we use
echo "=== Environment ===" echo "=== Environment ==="
echo "---> bash" echo "---> bash"
@ -57,12 +69,14 @@ spec:
echo "---> Current user" echo "---> Current user"
id id
echo echo
if [[ "$(workspaces.flightctl-config.bound)" == "true" ]]; then
echo "---> config file"
ls -lL $(workspaces.flightctl-config.path)/*
echo
fi
echo "---> flightctl" echo "---> flightctl"
flightctl --config-dir $(workspaces.flightctl-config.path) version flightctl --config-dir $(workspaces.flightctl-config.path) version
echo echo
echo "---> config file"
ls -lL $(workspaces.flightctl-config.path)
echo
# List fleets matching the label selector and update their image to the new digest # List fleets matching the label selector and update their image to the new digest
flightctl --config-dir $(workspaces.flightctl-config.path) get fleets --limit 0 -l "${FLEET_LABEL_SELECTOR}" -o name | while read -r fleet; do flightctl --config-dir $(workspaces.flightctl-config.path) get fleets --limit 0 -l "${FLEET_LABEL_SELECTOR}" -o name | while read -r fleet; do

Loading…
Cancel
Save