Hi,
I added my GKE to my GitLab project successfuly. I also installed helm and the gitlab runner via the WebUI.
I thought that I should be able to use kubectl and helm commands now within my .gitlab-ci.yaml because all the necessary stuff like permissions are given while adding the GKE to GitLab.
stages:
- build
- deploy
build:
stage: build
image: docker:git
services:
- docker:18.09.8-dind
variables:
DOCKER_HOST: tcp://docker:2375
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_SHORT_SHA --build-arg GIT_USER=$CI_REGISTRY_USER --build-arg GIT_TOKEN=$CI_JOB_TOKEN -f docker/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY/$CI_PROJECT_PATH
- docker push $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_SHORT_SHA
only:
- master
deploy:
stage: deploy
script:
- helm install chart/
only:
- master
This will output: “command helm not found”.
So do I have to setup a seperate container for the deployment stage and configure helm and kubectl there? Or am I doing something crucial wrong.
Kind regards,
Stephan