|
|
|
@ -43,6 +43,18 @@ spec: |
|
|
|
exit 0 |
|
|
|
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 |
|
|
|
echo "=== Environment ===" |
|
|
|
echo "---> bash" |
|
|
|
@ -57,12 +69,14 @@ spec: |
|
|
|
echo "---> Current user" |
|
|
|
id |
|
|
|
echo |
|
|
|
if [[ "$(workspaces.flightctl-config.bound)" == "true" ]]; then |
|
|
|
echo "---> config file" |
|
|
|
ls -lL $(workspaces.flightctl-config.path)/* |
|
|
|
echo |
|
|
|
fi |
|
|
|
echo "---> flightctl" |
|
|
|
flightctl --config-dir $(workspaces.flightctl-config.path) version |
|
|
|
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 |
|
|
|
flightctl --config-dir $(workspaces.flightctl-config.path) get fleets --limit 0 -l "${FLEET_LABEL_SELECTOR}" -o name | while read -r fleet; do |
|
|
|
|