Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rogge, Torben
lab-k8s
Commits
3a48b882
Commit
3a48b882
authored
Nov 11, 2020
by
Nane Kratzke
Browse files
Aktualisieren .gitlab-ci.yml
parent
acb3c4ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
3a48b882
...
...
@@ -2,7 +2,6 @@ variables:
KUBECTL
:
"
quay.io/bitnami/kubectl:1.18"
NAMESPACE
:
"
nane-kratzke"
VERSION
:
"
0.0.1"
BRANCH
:
"
$CI_COMMIT_BRANCH"
URL
:
"
prime-nk.loki.th-luebeck.dev"
stages
:
...
...
@@ -10,7 +9,21 @@ stages:
-
build
-
deploy
prime-container
:
prepare
:
stage
:
prepare
image
:
name
:
$KUBECTL
entrypoint
:
[
"
"
]
script
:
-
kubectl apply -f deploy/storage -n $NAMESPACE
-
kubectl delete secret gitlab-registry-credentials -n $NAMESPACE ||
true
-
"
kubectl
create
secret
docker-registry
gitlab-registry-credentials
\
--docker-server=$CI_REGISTRY
\
--docker-username=image-registry
\
--docker-password=$CI_REGISTRY_TOKEN
\
-n
$NAMESPACE"
build
:
stage
:
build
services
:
-
docker:dind
...
...
@@ -25,28 +38,7 @@ prime-container:
-
docker push $CI_REGISTRY_IMAGE/prime:$VERSION
-
docker push $CI_REGISTRY_IMAGE/prime:latest
prime-storage
:
stage
:
prepare
image
:
name
:
$KUBECTL
entrypoint
:
[
"
"
]
script
:
-
kubectl apply -f deploy/storage -n $NAMESPACE
deploy-credentials
:
stage
:
prepare
image
:
name
:
$KUBECTL
entrypoint
:
[
"
"
]
script
:
-
kubectl delete secret gitlab-registry-credentials -n $NAMESPACE ||
true
-
"
kubectl
create
secret
docker-registry
gitlab-registry-credentials
\
--docker-server=$CI_REGISTRY
\
--docker-username=image-registry
\
--docker-password=$CI_REGISTRY_TOKEN
\
-n
$NAMESPACE"
prime-service
:
deploy
:
stage
:
deploy
image
:
name
:
$KUBECTL
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment