https://github.com/voronenko/cdci-helm-kubectl
Basic cdci deployment container with kubectl and helm
https://github.com/voronenko/cdci-helm-kubectl
Last synced: 5 months ago
JSON representation
Basic cdci deployment container with kubectl and helm
- Host: GitHub
- URL: https://github.com/voronenko/cdci-helm-kubectl
- Owner: Voronenko
- License: other
- Created: 2020-11-02T11:30:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-28T20:38:49.000Z (over 3 years ago)
- Last Synced: 2025-07-14T17:42:48.384Z (6 months ago)
- Language: Shell
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Raw kubectl
```yaml
deploy:
stage: deploy
image: voronenko/cdci-helm-kubectl
script:
- kubectl config set-cluster k8s --server="${SERVER}"
- kubectl config set clusters.k8s.certificate-authority-data ${CERTIFICATE_AUTHORITY_DATA}
- kubectl config set-credentials gitlab --token="${USER_TOKEN}"
- kubectl config set-context default --cluster=k8s --user=gitlab
- kubectl config use-context default
- sed -i "s//${CI_COMMIT_SHORT_SHA}/g" deployment.yaml
- kubectl apply -f deployment.yaml
```
## Helm3
```yaml
deploy:
stage: deploy
image: voronenko/cdci-helm-kubectl
script:
- kubectl config set-cluster k8s --server="${SERVER}"
- kubectl config set clusters.k8s.certificate-authority-data ${CERTIFICATE_AUTHORITY_DATA}
- kubectl config set-credentials gitlab --token="${USER_TOKEN}"
- kubectl config set-context default --cluster=k8s --user=gitlab
- kubectl config use-context default
- helm upgrade your-helm-deployment-name ./your-helm-deployment-path --install --set image.tag=${CI_COMMIT_SHORT_SHA}
```