Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Payslip Downloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Lukas Schreiner
Payslip Downloader
Commits
d03994b9
Commit
d03994b9
authored
3 years ago
by
Lukas Schreiner
Browse files
Options
Downloads
Patches
Plain Diff
Added uninstall step
parent
50bfb2ae
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#111
failed
3 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+21
-5
21 additions, 5 deletions
.gitlab-ci.yml
with
21 additions
and
5 deletions
.gitlab-ci.yml
+
21
−
5
View file @
d03994b9
...
...
@@ -3,6 +3,13 @@
paths
:
-
target/
.kubeauth
:
script
:
-
kubectl config set-cluster k8s-cluster --server=$KUBE_HOST --certificate-authority=$KUBE_API_CERT
-
kubectl config set-credentials k8s-deployer --token=$KUBE_API_TOKEN
-
kubectl config set-context k8s-context --cluster k8s-cluster --user k8s-deployer --namespace=$KUBE_NAMESPACE
-
kubectl config use-context k8s-context
stages
:
-
build_binary
-
build_docker
...
...
@@ -40,15 +47,24 @@ deploy:
-
main
environment
:
name
:
production
url
:
http://payslip-downloader.k3s.mimono.lan
script
:
-
kubectl config set-cluster k8s-cluster --server=$KUBE_HOST --certificate-authority=$KUBE_API_CERT
-
kubectl config set-credentials k8s-deployer --token=$KUBE_API_TOKEN
-
kubectl config set-context k8s-context --cluster k8s-cluster --user k8s-deployer
-
kubectl config use-context k8s-context
-
!reference
[
kubeauth
]
-
mkdir tmp
-
'
echo
-e
"registry_image:
\"$CI_REGISTRY_IMAGE\""
>
tmp/values.yaml'
-
'
echo
-e
"\ncommit_short_sha:
\"$CI_COMMIT_SHORT_SHA\""
>>
tmp/values.yaml'
-
'
echo
-e
"\ndeploy_namespace:
\"$KUBE_NAMESPACE\""
>>
tmp/values.yaml'
-
'
echo
-e
"\nsecret_store:
\"$KUBE_SECRET_STORE\""
>>
tmp/values.yaml'
-
helm upgrade --install --values tmp/values.yaml --kube-context k8s-context $KUBE_NAME payslip-downloader
stop
:
stage
:
deploy
image
:
dtzar/helm-kubectl:3.7.0
only
:
-
main
script
:
-
!reference
[
kubeauth
]
-
helm uninstall --kube-context k8s-context $KUBE_NAME
when
:
manual
environment
:
name
:
production
action
:
stop
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment