pipeline #8
Build, Push and Deploy Florale Emotion Website / feature-branch (push) Has been skipped Details
Build, Push and Deploy Florale Emotion Website / production-branch (push) Failing after 3m4s Details

This commit is contained in:
Julian Vollmer 2026-01-26 17:26:26 +01:00
parent a4df93c326
commit 9b8dd00dd2
1 changed files with 24 additions and 8 deletions

View File

@ -118,18 +118,26 @@ jobs:
kubectl version --client
- name: Configure kubectl
env:
KUBECTLSECRET: ${{ secrets.KUBECTLSECRET }}
run: |
mkdir -p ~/.kube
echo "🔍 Debugging KUBECTLSECRET..."
echo "Secret length: ${#KUBECTLSECRET}"
# Check if secret is empty
if [ "${#KUBECTLSECRET}" -eq 0 ]; then
echo "❌ ERROR: KUBECTLSECRET is empty!"
exit 1
fi
# Try to decode as base64 first, if that fails, use as plain text
if echo "${{ secrets.KUBECTLSECRET }}" | base64 -d > ~/.kube/config 2>/dev/null; then
if echo "$KUBECTLSECRET" | base64 -d > ~/.kube/config 2>/dev/null; then
echo "✅ KUBECTLSECRET decoded as base64"
else
echo "⚠️ KUBECTLSECRET is not base64, using as plain text"
echo "${{ secrets.KUBECTLSECRET }}" > ~/.kube/config
echo "$KUBECTLSECRET" > ~/.kube/config
fi
echo "📁 kubeconfig created at ~/.kube/config"
@ -139,8 +147,8 @@ jobs:
echo "🔧 Fixing TLS verification for self-signed certificates..."
# Get all cluster names and add insecure-skip-tls-verify
kubectl config get-clusters --no-headers | while read cluster; do
if [ "$cluster" != "NAME" ]; then
kubectl config get-clusters | tail -n +2 | while read cluster; do
if [ -n "$cluster" ]; then
echo "Setting insecure-skip-tls-verify for cluster: $cluster"
kubectl config set-cluster "$cluster" --insecure-skip-tls-verify=true
fi
@ -339,18 +347,26 @@ jobs:
kubectl version --client
- name: Configure kubectl
env:
KUBECTLSECRET: ${{ secrets.KUBECTLSECRET }}
run: |
mkdir -p ~/.kube
echo "🔍 Debugging KUBECTLSECRET..."
echo "Secret length: ${#KUBECTLSECRET}"
# Check if secret is empty
if [ "${#KUBECTLSECRET}" -eq 0 ]; then
echo "❌ ERROR: KUBECTLSECRET is empty!"
exit 1
fi
# Try to decode as base64 first, if that fails, use as plain text
if echo "${{ secrets.KUBECTLSECRET }}" | base64 -d > ~/.kube/config 2>/dev/null; then
if echo "$KUBECTLSECRET" | base64 -d > ~/.kube/config 2>/dev/null; then
echo "✅ KUBECTLSECRET decoded as base64"
else
echo "⚠️ KUBECTLSECRET is not base64, using as plain text"
echo "${{ secrets.KUBECTLSECRET }}" > ~/.kube/config
echo "$KUBECTLSECRET" > ~/.kube/config
fi
echo "📁 kubeconfig created at ~/.kube/config"
@ -360,8 +376,8 @@ jobs:
echo "🔧 Fixing TLS verification for self-signed certificates..."
# Get all cluster names and add insecure-skip-tls-verify
kubectl config get-clusters --no-headers | while read cluster; do
if [ "$cluster" != "NAME" ]; then
kubectl config get-clusters | tail -n +2 | while read cluster; do
if [ -n "$cluster" ]; then
echo "Setting insecure-skip-tls-verify for cluster: $cluster"
kubectl config set-cluster "$cluster" --insecure-skip-tls-verify=true
fi