Skip to content
Snippets Groups Projects
Commit 6d708f72 authored by Sean Fredrick Cruz's avatar Sean Fredrick Cruz
Browse files

Update .gitlab-ci.yml file

parent 8fe0eb1f
No related branches found
No related tags found
No related merge requests found
Pipeline #67331 passed
...@@ -27,12 +27,14 @@ deploy-dev: ...@@ -27,12 +27,14 @@ deploy-dev:
- curl -LO "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl" - curl -LO "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl"
- chmod +x ./kubectl - chmod +x ./kubectl
- mv ./kubectl /usr/local/bin/kubectl - mv ./kubectl /usr/local/bin/kubectl
# Set up kubeconfig # Set up kubeconfig (for extracting auth details)
- mkdir -p ~/.kube - mkdir -p ~/.kube
- echo $KUBE_CONFIG | base64 -d > ~/.kube/config - echo $KUBE_CONFIG | base64 -d > ~/.kube/config
- chmod 600 ~/.kube/config - chmod 600 ~/.kube/config
# Deploy with explicit server and token - bypass kubeconfig entirely # Extract auth token if available
- kubectl apply -f task-app/ --server=https://8.tcp.ngrok.io:12167 --insecure-skip-tls-verify - export TOKEN=$(kubectl config view --minify -o jsonpath='{.users[0].user.token}')
# Try token-based auth if available
- if [ ! -z "$TOKEN" ]; then kubectl apply -f task-app/ --server=https://8.tcp.ngrok.io:12167 --insecure-skip-tls-verify --token=$TOKEN; else echo "No token found in config"; fi
environment: environment:
name: development name: development
only: only:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment