From e5ffffa1e607681a17b005894c851c9435343588 Mon Sep 17 00:00:00 2001 From: niclasthobaben Date: Mon, 28 Nov 2022 13:51:19 +0100 Subject: [PATCH] added tokens --- Jenkinsfile | 6 +++++- charts/templates/deployment.yaml | 5 +++++ charts/values.yaml | 3 +++ docker-compose.yml | 15 --------------- 4 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 docker-compose.yml diff --git a/Jenkinsfile b/Jenkinsfile index 444139a..1959ed4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,7 +40,11 @@ pipeline { branch 'master' } steps { - sh 'helm upgrade --install giteabot ./charts --create-namespace --namespace nclazz' + sh '''helm upgrade --install giteabot ./charts \ + --create-namespace --namespace nclazz \ + --set nclazz_token=${NCLAZZ} \ + --set gitea_token=${GITEA_TOKEN} + ''' } } } diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 941108a..45cf90d 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -37,6 +37,11 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP + env: + - name: GITEA_TOKEN + value: {{ .Values.gitea_token }} + - name: NCLAZZ_TOKEN + value: {{ .Values.nclazz_token }} livenessProbe: httpGet: path: / diff --git a/charts/values.yaml b/charts/values.yaml index 03fe3d7..e3c1d06 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -14,6 +14,9 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +nclazz_token: "" +gitea_token: "" + serviceAccount: # Specifies whether a service account should be created create: true diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 185bca3..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3.8' -services: - service: - image: docker.nclazz.de/nclazz-bots/gitea-bot:$VERSION - environment: - GITEA_TOKEN: "${GITEA_TOKEN}" - NCLAZZ_AUTH_TOKEN: "${AUTH_TOKEN}" - deploy: - replicas: 1 - placement: - max_replicas_per_node: 1 - update_config: - order: start-first - ports: - - "${PORT}:8080" \ No newline at end of file