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

Update .gitlab-ci.yml file

parent f35a7a1d
No related branches found
No related tags found
No related merge requests found
Pipeline #67368 failed with stage
in 57 seconds
...@@ -23,24 +23,25 @@ build-frontend: ...@@ -23,24 +23,25 @@ build-frontend:
deploy-dev: deploy-dev:
stage: deploy stage: deploy
script: script:
# Install kubectl and Helm # Install kubectl and Helm if not already installed on your runner
- curl -LO "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl" - which kubectl || curl -LO "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl"
- chmod +x ./kubectl - which kubectl || chmod +x ./kubectl
- mv ./kubectl /usr/local/bin/kubectl - which kubectl || mv ./kubectl /usr/local/bin/kubectl
- curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash - which helm || curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Set up kubeconfig
- mkdir -p ~/.kube
- echo $KUBE_CONFIG | base64 -d > ~/.kube/config
- chmod 600 ~/.kube/config
# Extract auth token if available # Now you can directly use kubectl/helm with your local cluster
# - export TOKEN=$(kubectl config view --minify -o jsonpath='{.users[0].user.token}') - helm upgrade --install my-release task-app/ --namespace task-app --create-namespace
# Try token-based auth if available # Install kubectl and Helm
# - 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 # - curl -LO "https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl"
# - chmod +x ./kubectl
# - kubectl apply -f task-app/ --server=https://0.tcp.ap.ngrok.io:11295 --insecure-skip-tls-verify # - mv ./kubectl /usr/local/bin/kubectl
# - cd task-app # - curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- helm upgrade --install my-release task-app/ --namespace task-app --create-namespace --kube-apiserver https://0.tcp.ap.ngrok.io:11295 --kube-insecure-skip-tls-verify # # Set up kubeconfig
# - mkdir -p ~/.kube
# - echo $KUBE_CONFIG | base64 -d > ~/.kube/config
# - chmod 600 ~/.kube/config
# # Deploy
# - helm upgrade --install my-release task-app/ --namespace task-app --create-namespace --kube-apiserver https://0.tcp.ap.ngrok.io:11295 --kube-insecure-skip-tls-verify
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