Skip to content

Commit

Permalink
migrate k8s config mode
Browse files Browse the repository at this point in the history
  • Loading branch information
boogheta committed Jan 5, 2023
1 parent 551e79b commit d19e881
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variables:
before_script:
- VERSION=$(echo $CI_COMMIT_TAG | sed -nre 's/^v([0-9.]+)$/\1/p')
- if [ -n "${VERSION}" ]; then IMAGE_TAG=${VERSION}; else IMAGE_TAG=${CI_COMMIT_REF_SLUG}; fi
- export KUBECONFIG=$kubeconfig_file

build_backend_image:
stage: build
Expand Down Expand Up @@ -58,10 +59,6 @@ deploy:
entrypoint: [""]
stage: deploy
script:
- kubectl config set-cluster k8s --server="$KUBE_URL" --certificate-authority="$KUBE_CA_PEM_FILE"
- kubectl config set-credentials gitlab-admin --token="$KUBE_TOKEN"
- kubectl config set-context default --cluster=k8s --user=gitlab-admin
- kubectl config use-context default
- kubectl -n $STACK rollout restart deployment backend
- kubectl -n $STACK rollout restart deployment crawler
- kubectl -n $STACK rollout restart deployment frontend
Expand Down

0 comments on commit d19e881

Please sign in to comment.