Skip to content
Snippets Groups Projects
Commit 11334d39 authored by cyril.cros's avatar cyril.cros
Browse files

Let's see how this goes now 6

parent 8f77ee79
No related branches found
No related tags found
Loading
Pipeline #58321 failed
......@@ -2,17 +2,17 @@
variables:
S3_ENDPOINT: "https://s3.embl.de"
S3_BUCKET: "annelids"
JBROWSE_HOSTNAME: "genomes.arendt.embl.de"
stages:
- download_from_s3
- upload_to_s3
- access_test
- build_container
- deploy_to_cluster
- clean_up_on_failure
s3_access_test:
image: minio/mc
stage: download_from_s3
stage: access_test
rules:
- changes: # TODO change where necessary
- image/*
......@@ -22,6 +22,16 @@ s3_access_test:
- mc ls genomes/$S3_BUCKET
- cd image
cluster_access_test:
image: dtzar/helm-kubectl:3.8.2
stage: access_test
before_script:
- cd deployment
- echo $KUBECONFIG | base64 -d > /tmp/kubeconf
- export KUBECONFIG=/tmp/kubeconf
script:
- kubectl config current-context
build_nginx_with_jbrowse_config_file:
image: gcr.io/kaniko-project/executor:debug-v0.21.0
stage: build_container
......@@ -32,28 +42,19 @@ build_nginx_with_jbrowse_config_file:
--dockerfile $CI_PROJECT_DIR/image/Dockerfile
--destination $CI_REGISTRY_IMAGE:jbrowse2-$CI_COMMIT_SHORT_SHA
cluster_access_test:
image: dtzar/helm-kubectl:3.8.2
stage: deploy_to_cluster
before_script:
- cd deployment
- echo $KUBECONFIG | base64 -d > /tmp/kubeconf
- export KUBECONFIG=/tmp/kubeconf
script:
- kubectl config current-context
kustomize_build_apply:
image: dtzar/helm-kubectl:3.8.2
stage: deploy_to_cluster
before_script:
- echo $KUBECONFIG | base64 -d > /tmp/kubeconf
- export KUBECONFIG=/tmp/kubeconf
- kubectl -n $NS create --dry-run=client -o yaml
- kubectl -n $NS create --dry-run=client -o yaml --save-config=true # secret
secret docker-registry gitlab-auth-token
--docker-server=$CI_REGISTRY --docker-username=$CI_REGISTRY_USER
--docker-password=$CI_REGISTRY_PASSWORD |
kubectl apply -f -
script:
- envsubst < deployment/jbrowse2-dep.tmpl > deployment/jbrowse2-dep.yaml
- kubectl apply -k deployment
- kubectl -n $NS wait --for=condition=available --timeout=60s deploy/jbrowse2
dependencies:
......@@ -68,5 +69,6 @@ clean_up_k8s_deployment:
- export KUBECONFIG=/tmp/kubeconf
script:
- echo 'Failed job, deleting resources'
- envsubst < deployment/jbrowse2-dep.tmpl > deployment/jbrowse2-dep.yaml
- kubectl delete -k deployment
- kubectl -n $NS delete secret gitlab-auth-token
\ No newline at end of file
......@@ -3,7 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: jbrowse2
namespace: jbrowse2-platy
namespace: ${NS}
labels:
name: jbrowse2
spec:
......@@ -17,10 +17,10 @@ spec:
app: jbrowse2
spec:
imagePullSecrets:
- gitlab-token-auth
- name: gitlab-token-auth
containers:
- name: jbrowse2
image:
image: ${CI_REGISTRY_IMAGE}:jbrowse2-${CI_COMMIT_SHORT_SHA}
imagePullPolicy: Always
resources:
requests:
......@@ -38,7 +38,7 @@ apiVersion: v1
kind: Service
metadata:
name: jbrowse2
namespace: jbrowse2-platy
namespace: ${NS}
spec:
selector:
app: jbrowse2
......@@ -52,13 +52,13 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jbrowse2
namespace: jbrowse2-platy
namespace: ${NS}
annotations:
traefik.ingress.kubernetes.io/router.tls.certresolver: sectigo
spec:
ingressClassName: external-users
rules:
- host: genomes.arendt.embl.de
- host: ${JBROWSE_HOSTNAME}
http:
paths:
- path: /
......@@ -70,4 +70,4 @@ spec:
name: http
tls:
- hosts:
- genomes.arendt.embl.de
\ No newline at end of file
- ${JBROWSE_HOSTNAME}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment