Commit 4af3be7b authored by Ľuboslav Pivarč's avatar Ľuboslav Pivarč
Browse files

added ci to beta & dev

parent 68587e03
Pipeline #22485 failed with stages
in 10 seconds
......@@ -8,27 +8,27 @@ stages:
- 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 login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# cBioApp build:
# stage: build
# <<: *docker-login
# image: docker:latest
# script:
# - docker build --pull -t "${CI_REGISTRY_IMAGE}:app${CI_COMMIT_SHA}" ./builds/cbioapp
# - docker push "$CI_REGISTRY_IMAGE:app${CI_COMMIT_SHA}"
# when: manual
.docker-build-db:
script: &docker-build-db
- docker build --pull -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-db${CI_COMMIT_SHA}" ./builds/cbiodb
- docker push "$CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME}-db${CI_COMMIT_SHA}"
.docker-build-job:
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}"
#PRODUCTION
cBioDb build:
stage: build
<<: *docker-login
image: docker:latest
script:
- docker build --pull -t "${CI_REGISTRY_IMAGE}:db${CI_COMMIT_SHA}" ./builds/cbiodb
- docker push "$CI_REGISTRY_IMAGE:db${CI_COMMIT_SHA}"
*docker-build-db
when: manual
cBioJob build:
......@@ -36,17 +36,78 @@ cBioJob build:
<<: *docker-login
image: docker:latest
script:
- docker build --pull -t "${CI_REGISTRY_IMAGE}:job${CI_COMMIT_SHA}" ./builds/job
- docker push "$CI_REGISTRY_IMAGE:job${CI_COMMIT_SHA}"
*docker-build-job
when: manual
deploy to k8s:
stage: deploy
variables:
NAMESPACE: cbio-on-demand
<<: *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
#BETA
cBioDb build:
stage: build
<<: *docker-login
image: docker:latest
script:
*docker-build-db
when: manual
cBioJob build:
stage: build
<<: *docker-login
image: docker:latest
script:
*docker-build-job
when: manual
deploy to k8s:
stage: deploy
variables:
NAMESPACE: cbio-on-demand-beta
<<: *kube-auth
image: registry.gitlab.ics.muni.cz:443/europdx/k8s/ci:latest
script:
- ./yaml/bash.sh
- kubectl version
- kubectl apply -f ./yaml
#DEV
cBioDb build:
stage: build
<<: *docker-login
image: docker:latest
script:
*docker-build-db
when: manual
cBioJob build:
stage: build
<<: *docker-login
image: docker:latest
script:
*docker-build-job
when: manual
deploy to k8s:
stage: deploy
variables:
NAMESPACE: cbio-on-demand-dev
<<: *kube-auth
image: registry.gitlab.ics.muni.cz:443/europdx/k8s/ci:latest
script:
- ./yaml/bash.sh
- kubectl version
- kubectl apply -f ./yaml
......@@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: cbio-api
namespace: cbio-on-demand
namespace: __NAMESPACE__
roleRef:
kind: ClusterRole
name: cbio-api
......@@ -23,7 +23,7 @@ subjects:
# Reference to upper's `metadata.name`
name: cbio-api
# Reference to upper's `metadata.namespace`
namespace: cbio-on-demand
namespace: __NAMESPACE__
roleRef:
kind: ClusterRole
name: cluster-admin
......
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-cbio-db
namespace: cbio-on-demand
namespace: __NAMESPACE__
data:
mysql.conf: "# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights
reserved.\n#\n# This program is free software; you can redistribute it and/or
......
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-cbio-db
namespace: cbio-on-demand
namespace: __NAMESPACE__
data:
mysql.conf: "# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights
reserved.\n#\n# This program is free software; you can redistribute it and/or
......
......@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: cbio
namespace: cbio-on-demand
namespace: __NAMESPACE__
spec:
rules:
- http:
......
......@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: cbio-proxy
namespace: cbio-on-demand
namespace: __NAMESPACE__
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
......
apiVersion: v1
kind: Namespace
metadata:
name: cbio-on-demand
name: __NAMESPACE__
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: mysql-env
namespace: cbio-on-demand
namespace: __NAMESPACE__
data:
.env: TVlTUUxfUk9PVF9QQVNTV09SRD1QQHNzd29yZDEKTVlTUUxfVVNFUj1jYmlvCk1ZU1FMX1BBU1NXT1JEPVBAc3N3b3JkMQpNWVNRTF9EQVRBQkFTRT1jYmlvcG9ydGFsCgo=
type: Opaque
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: mysql-env
namespace: cbio-on-demand
namespace: __NAMESPACE__
data:
.env: TVlTUUxfUk9PVF9QQVNTV09SRD1QQHNzd29yZDEKTVlTUUxfVVNFUj1jYmlvCk1ZU1FMX1BBU1NXT1JEPVBAc3N3b3JkMQpNWVNRTF9EQVRBQkFTRT1jYmlvcG9ydGFsCgo=
type: Opaque
......@@ -2,4 +2,4 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: cbio-api
namespace: cbio-on-demand
namespace: __NAMESPACE__
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment