pipeline #2
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 2m1s Details

This commit is contained in:
Julian Vollmer 2026-01-26 14:32:04 +01:00
parent f780682b56
commit 036c3d77e3
1 changed files with 42 additions and 2 deletions

View File

@ -118,7 +118,19 @@ jobs:
mkdir -p ~/.kube mkdir -p ~/.kube
echo "🔍 Debugging KUBECTLSECRET..." echo "🔍 Debugging KUBECTLSECRET..."
echo "Secret length: ${#KUBECTLSECRET}" SECRET_LENGTH=${#KUBECTLSECRET}
echo "Secret length: $SECRET_LENGTH"
# Check if secret is empty
if [ "$SECRET_LENGTH" -eq 0 ]; then
echo "❌ ERROR: KUBECTLSECRET is empty!"
echo "Please configure the KUBECTLSECRET in Gitea repository secrets."
echo "Steps:"
echo "1. Run: cat ~/.kube/config | base64 -w 0"
echo "2. Copy the output"
echo "3. Add it as 'KUBECTLSECRET' secret in Gitea"
exit 1
fi
# Try to decode as base64 first, if that fails, use as plain text # 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 "${{ secrets.KUBECTLSECRET }}" | base64 -d > ~/.kube/config 2>/dev/null; then
@ -130,6 +142,14 @@ jobs:
echo "📁 kubeconfig created at ~/.kube/config" echo "📁 kubeconfig created at ~/.kube/config"
chmod 600 ~/.kube/config chmod 600 ~/.kube/config
# Validate kubeconfig
if [ ! -s ~/.kube/config ]; then
echo "❌ ERROR: kubeconfig file is empty!"
exit 1
fi
echo "✅ kubeconfig validation passed"
- name: Test kubectl connection - name: Test kubectl connection
run: | run: |
@ -322,7 +342,19 @@ jobs:
mkdir -p ~/.kube mkdir -p ~/.kube
echo "🔍 Debugging KUBECTLSECRET..." echo "🔍 Debugging KUBECTLSECRET..."
echo "Secret length: ${#KUBECTLSECRET}" SECRET_LENGTH=${#KUBECTLSECRET}
echo "Secret length: $SECRET_LENGTH"
# Check if secret is empty
if [ "$SECRET_LENGTH" -eq 0 ]; then
echo "❌ ERROR: KUBECTLSECRET is empty!"
echo "Please configure the KUBECTLSECRET in Gitea repository secrets."
echo "Steps:"
echo "1. Run: cat ~/.kube/config | base64 -w 0"
echo "2. Copy the output"
echo "3. Add it as 'KUBECTLSECRET' secret in Gitea"
exit 1
fi
# Try to decode as base64 first, if that fails, use as plain text # 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 "${{ secrets.KUBECTLSECRET }}" | base64 -d > ~/.kube/config 2>/dev/null; then
@ -334,6 +366,14 @@ jobs:
echo "📁 kubeconfig created at ~/.kube/config" echo "📁 kubeconfig created at ~/.kube/config"
chmod 600 ~/.kube/config chmod 600 ~/.kube/config
# Validate kubeconfig
if [ ! -s ~/.kube/config ]; then
echo "❌ ERROR: kubeconfig file is empty!"
exit 1
fi
echo "✅ kubeconfig validation passed"
- name: Test kubectl connection - name: Test kubectl connection
run: | run: |