initial commit on ci branch: migrates code from private repo

This commit is contained in:
Ryan Richard
2024-10-29 13:04:30 -07:00
parent a3d64bef62
commit 11bd69cf2d
194 changed files with 16873 additions and 16 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Define some env vars
source "$script_dir/fly-helpers.sh"
# Install the fly cli if needed
if [[ ! -f "$FLY_CLI" ]]; then
curl -fL "$CONCOURSE_URL/api/v1/cli?arch=amd64&platform=darwin" -o "$FLY_CLI"
chmod 755 "$FLY_CLI"
fi
if ! $FLY_CLI targets | tr -s ' ' | cut -f1 -d ' ' | grep -q "$CONCOURSE_TARGET"; then
# Create the target if needed
$FLY_CLI --target "$CONCOURSE_TARGET" login \
--team-name "$CONCOURSE_TEAM" --concourse-url "$CONCOURSE_URL"
else
# Login if needed
if ! $FLY_CLI --target "$CONCOURSE_TARGET" status; then
$FLY_CLI --target "$CONCOURSE_TARGET" login
fi
fi
# Upgrade fly if needed
$FLY_CLI --target "$CONCOURSE_TARGET" sync