ci : asd
This commit is contained in:
@@ -7,6 +7,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
REGISTRY_IMAGE: registry.neko-piranha.ts.net/astral/buzz-sheet
|
REGISTRY_IMAGE: registry.neko-piranha.ts.net/astral/buzz-sheet
|
||||||
DEPLOY_NAMESPACE: buzz-sheet
|
DEPLOY_NAMESPACE: buzz-sheet
|
||||||
|
KUBE_API_SERVER: https://100.75.220.33:6443/
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
verify:
|
verify:
|
||||||
@@ -92,6 +93,10 @@ jobs:
|
|||||||
export KUBECONFIG="$kube_dir/config"
|
export KUBECONFIG="$kube_dir/config"
|
||||||
printf '%s' "$KUBE_CONFIG_B64" | base64 --decode >"$KUBECONFIG"
|
printf '%s' "$KUBE_CONFIG_B64" | base64 --decode >"$KUBECONFIG"
|
||||||
chmod 600 "$KUBECONFIG"
|
chmod 600 "$KUBECONFIG"
|
||||||
|
cluster_name="$(kubectl config view --kubeconfig "$KUBECONFIG" --minify -o jsonpath='{.clusters[0].name}')"
|
||||||
|
kubectl config set-cluster "$cluster_name" \
|
||||||
|
--kubeconfig "$KUBECONFIG" \
|
||||||
|
--server "$KUBE_API_SERVER" >/dev/null
|
||||||
|
|
||||||
env_file="${GITEA_ENV_FILE:-${GITHUB_ENV:-}}"
|
env_file="${GITEA_ENV_FILE:-${GITHUB_ENV:-}}"
|
||||||
if [ -n "$env_file" ]; then
|
if [ -n "$env_file" ]; then
|
||||||
@@ -124,6 +129,14 @@ jobs:
|
|||||||
echo "KUBE_CONFIG_B64 decoded to an empty kubeconfig" >&2
|
echo "KUBE_CONFIG_B64 decoded to an empty kubeconfig" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
cluster_name="$(kubectl config view --kubeconfig "$KUBECONFIG" --minify -o jsonpath='{.clusters[0].name}')"
|
||||||
|
if [ -z "$cluster_name" ]; then
|
||||||
|
echo "Decoded kubeconfig has no active cluster" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
kubectl config set-cluster "$cluster_name" \
|
||||||
|
--kubeconfig "$KUBECONFIG" \
|
||||||
|
--server "$KUBE_API_SERVER" >/dev/null
|
||||||
|
|
||||||
revision_short="${REVISION:0:12}"
|
revision_short="${REVISION:0:12}"
|
||||||
migration_dir="$RUNNER_TEMP/buzz-sheet-migration-$revision_short"
|
migration_dir="$RUNNER_TEMP/buzz-sheet-migration-$revision_short"
|
||||||
|
|||||||
Reference in New Issue
Block a user