Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
europdx
k8s
cbio-on-demand
Kubernetes-Docker
Commits
65ca6a9d
Commit
65ca6a9d
authored
Sep 03, 2019
by
Ľuboslav Pivarč
Browse files
Templates in Ci
parent
dcad0032
Pipeline
#23550
waiting for manual action with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
65ca6a9d
...
...
@@ -2,15 +2,13 @@ stages:
-
build
-
deploy
.kube-auth
:
&kube-auth
before_script
:
-
mkdir $HOME/.kube
-
touch $HOME/.kube/config
-
echo "$KUBE_CONFIG" >> $HOME/.kube/config
.kube-auth
:
&kube-auth
-
mkdir $HOME/.kube
-
touch $HOME/.kube/config
-
echo "$KUBE_CONFIG" >> $HOME/.kube/config
.docker-login
:
&docker-login
before_script
:
-
echo -n $CI_REGISTRY_PASSWORD | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
.docker-build-db
:
...
...
@@ -22,118 +20,97 @@ stages:
script
:
&docker-build-job
-
docker build --pull -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-job${CI_COMMIT_SHA}" ./builds/job
-
docker push "$CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME}-job${CI_COMMIT_SHA}"
.cbio-db-build-template
:
&cbio-db-build-template
stage
:
build
image
:
docker:latest
before_script
:
*docker-login
script
:
*docker-build-db
when
:
manual
allow_failure
:
false
.cbio-job-build-template
:
&cbio-job-build-template
stage
:
build
image
:
docker:latest
before_script
:
*docker-login
script
:
*docker-build-job
when
:
manual
allow_failure
:
false
.deploy-to-k8s-template
:
&deploy-to-k8s-template
stage
:
deploy
before_script
:
*kube-auth
image
:
registry.gitlab.ics.muni.cz:443/europdx/k8s/ci:latest
script
:
-
./yaml/bash.sh
-
kubectl version
-
kubectl apply -f ./yaml
when
:
manual
allow_failure
:
false
#PRODUCTION
cBioDb build
:
stage
:
build
<<
:
*docker-login
image
:
docker:latest
script
:
*docker-build-db
when
:
manual
<<
:
*cbio-db-build-template
only
:
-
master
cBioJob build
:
stage
:
build
<<
:
*docker-login
image
:
docker:latest
script
:
*docker-build-job
when
:
manual
<<
:
*cbio-job-build-template
only
:
refs
:
-
master
-
master
deploy to k8s
:
stage
:
deploy
variables
:
NAMESPACE
:
cbio-on-demand
DOMAIN
:
cbiood
<<
:
*kube-auth
image
:
registry.gitlab.ics.muni.cz:443/europdx/k8s/ci:latest
script
:
-
./yaml/bash.sh
-
kubectl version
-
kubectl apply -f ./yaml
when
:
manual
DATAHUB
:
datahub
<<
:
*deploy-to-k8s-template
only
:
refs
:
-
master
-
master
#BETA
cBioDb build beta
:
stage
:
build
<<
:
*docker-login
image
:
docker:latest
script
:
*docker-build-db
when
:
manual
<<
:
*cbio-db-build-template
only
:
refs
:
-
beta
-
beta
cBioJob build beta
:
stage
:
build
<<
:
*docker-login
image
:
docker:latest
script
:
*docker-build-job
when
:
manual
<<
:
*cbio-job-build-template
only
:
refs
:
-
beta
-
beta
deploy to k8s beta
:
stage
:
deploy
variables
:
NAMESPACE
:
cbio-on-demand-beta
DOMAIN
:
cbiood-beta
<<
:
*kube-auth
image
:
registry.gitlab.ics.muni.cz:443/europdx/k8s/ci:latest
script
:
-
ls ./yaml -al
-
./yaml/bash.sh
-
kubectl version
-
kubectl apply -f ./yaml
when
:
manual
DATAHUB
:
datahub-beta
<<
:
*deploy-to-k8s-template
only
:
refs
:
-
beta
-
beta
#DEV
cBioDb build dev
:
stage
:
build
<<
:
*docker-login
image
:
docker:latest
script
:
*docker-build-db
when
:
manual
<<
:
*cbio-db-build-template
only
:
refs
:
-
dev
-
dev
cBioJob build dev
:
stage
:
build
<<
:
*docker-login
image
:
docker:latest
script
:
*docker-build-job
when
:
manual
<<
:
*cbio-job-build-template
only
:
refs
:
-
dev
-
dev
deploy to k8s dev
:
stage
:
deploy
variables
:
NAMESPACE
:
cbio-on-demand-dev
DOMAIN
:
cbiood-dev
<<
:
*kube-auth
image
:
registry.gitlab.ics.muni.cz:443/europdx/k8s/ci:latest
script
:
-
./yaml/bash.sh
-
kubectl version
-
kubectl apply -f ./yaml
when
:
manual
DATAHUB
:
datahub-dev
<<
:
*deploy-to-k8s-template
only
:
refs
:
-
dev
-
dev
yaml/app
-master
.yml
→
yaml/app
Config
.yml
View file @
65ca6a9d
File moved
Write
Preview
Markdown
is supported
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