Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #102 from fabnumdef/develop
Browse files Browse the repository at this point in the history
Release 1.4.4
  • Loading branch information
Nainterceptor authored Jan 13, 2020
2 parents 86dc91a + 186ddd0 commit 06e83af
Show file tree
Hide file tree
Showing 49 changed files with 2,217 additions and 2,285 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Checklist

* [] I've added a mention in CHANGELOG.md
- [ ] I've added a mention in CHANGELOG.md
40 changes: 15 additions & 25 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ test:
script:
- npm i
- npm test
- npm run lint

lint:
image: node:latest
Expand All @@ -35,22 +34,17 @@ build:
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- cat package.json | head -10
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA

deploy_review:
stage: deploy
image: dtzar/helm-kubectl
image: dtzar/helm-kubectl:3.0.2
before_script:
- apk upgrade --update-cache --available && apk add openssl && rm -rf /var/cache/apk/*
- curl -L https://git.io/get_helm.sh | bash
- mkdir -p `dirname $KUBECONFIG`
- echo ${STAGING_KUBECONFIG} | base64 -d > $KUBECONFIG
- "helm init --upgrade --service-account tiller --force-upgrade --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -"
script:
- helm upgrade
--install
Expand All @@ -62,7 +56,6 @@ deploy_review:
--set imageCredentials.registry="${CI_REGISTRY}"
--set env.REDIS="${STAGING_REDIS}"
--set env.MONGODB="${STAGING_MONGODB}"
--set env.SATISFACTION_QUESTIONNAIRE_URL="${STAGING_SATISFACTION_QUESTIONNAIRE_URL}"
--set env.TWILIO__SID="${STAGING_TWILIO__SID}"
--set env.TWILIO__TOKEN="${STAGING_TWILIO__TOKEN}"
--set env.TWILIO__MESSAGING_SERVICE_SID="${STAGING_TWILIO__MESSAGING_SERVICE_SID}"
Expand All @@ -74,11 +67,13 @@ deploy_review:
--set env.MAIL__CONTACT_MAIL="${STAGING_MAIL__CONTACT_MAIL}"
--set env.REDIRECT_TARGET="${STAGING_REDIRECT_TARGET}"
--set env.USER_WEBSITE_URL="${STAGING_USER_WEBSITE_URL}"
--set env.VAPID__PUBLIC_KEY="${STAGING_VAPID__PUBLIC_KEY}"
--set env.VAPID__PRIVATE_KEY="${STAGING_VAPID__PRIVATE_KEY}"
--set-string env.WHITELIST_DOMAINS="${STAGING_WHITELIST_DOMAINS}"
--set env.VERSION="Version ${CI_COMMIT_REF_NAME} - ${CI_COMMIT_SHA} (job \#${CI_JOB_ID})"
--set ingress.issuer="letsencrypt-staging"
--set monitoring.alert.enabled="false"
--wait
e-chauffeur-api-${CI_COMMIT_REF_SLUG}
api-${CI_COMMIT_REF_SLUG}
.helm-chart
except:
refs:
Expand All @@ -88,13 +83,10 @@ deploy_review:

deploy_staging:
stage: deploy
image: dtzar/helm-kubectl
image: dtzar/helm-kubectl:3.0.2
before_script:
- apk upgrade --update-cache --available && apk add openssl && rm -rf /var/cache/apk/*
- curl -L https://git.io/get_helm.sh | bash
- mkdir -p `dirname $KUBECONFIG`
- echo ${STAGING_KUBECONFIG} | base64 -d > $KUBECONFIG
- "helm init --upgrade --service-account tiller --force-upgrade --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -"
script:
- helm upgrade
--install
Expand All @@ -107,7 +99,6 @@ deploy_staging:
--set imageCredentials.registry="${CI_REGISTRY}"
--set env.REDIS="${STAGING_REDIS}"
--set env.MONGODB="${STAGING_MONGODB}"
--set env.SATISFACTION_QUESTIONNAIRE_URL="${STAGING_SATISFACTION_QUESTIONNAIRE_URL}"
--set env.TWILIO__SID="${STAGING_TWILIO__SID}"
--set env.TWILIO__TOKEN="${STAGING_TWILIO__TOKEN}"
--set env.TWILIO__MESSAGING_SERVICE_SID="${STAGING_TWILIO__MESSAGING_SERVICE_SID}"
Expand All @@ -119,11 +110,14 @@ deploy_staging:
--set env.MAIL__CONTACT_MAIL="${STAGING_MAIL__CONTACT_MAIL}"
--set env.REDIRECT_TARGET="${STAGING_REDIRECT_TARGET}"
--set env.USER_WEBSITE_URL="${STAGING_USER_WEBSITE_URL}"
--set env.VAPID__PUBLIC_KEY="${STAGING_VAPID__PUBLIC_KEY}"
--set env.VAPID__PRIVATE_KEY="${STAGING_VAPID__PRIVATE_KEY}"
--set-string env.WHITELIST_DOMAINS="${STAGING_WHITELIST_DOMAINS}"
--set env.VERSION="Version ${CI_COMMIT_REF_NAME} - ${CI_COMMIT_SHA} (job \#${CI_JOB_ID})"
--set ingress.issuer="letsencrypt-prod"
--set monitoring.alert.minimumPod=2
--wait
e-chauffeur-api-${CI_COMMIT_REF_SLUG}
api-staging
.helm-chart
only:
refs:
Expand All @@ -134,13 +128,10 @@ deploy_staging:

deploy_prod:
stage: deploy
image: dtzar/helm-kubectl
image: dtzar/helm-kubectl:3.0.2
before_script:
- apk upgrade --update-cache --available && apk add openssl && rm -rf /var/cache/apk/*
- curl -L https://git.io/get_helm.sh | bash
- mkdir -p `dirname $KUBECONFIG`
- echo ${PRODUCTION_KUBECONFIG} | base64 -d > $KUBECONFIG
- helm init --upgrade --service-account tiller --force-upgrade
script:
- helm upgrade
--install
Expand All @@ -153,7 +144,6 @@ deploy_prod:
--set imageCredentials.registry="${CI_REGISTRY}"
--set env.REDIS="${PRODUCTION_REDIS}"
--set env.MONGODB="${PRODUCTION_MONGODB}"
--set env.SATISFACTION_QUESTIONNAIRE_URL="${PRODUCTION_SATISFACTION_QUESTIONNAIRE_URL}"
--set env.TWILIO__SID="${PRODUCTION_TWILIO__SID}"
--set env.TWILIO__TOKEN="${PRODUCTION_TWILIO__TOKEN}"
--set env.TWILIO__MESSAGING_SERVICE_SID="${PRODUCTION_TWILIO__MESSAGING_SERVICE_SID}"
Expand All @@ -165,15 +155,15 @@ deploy_prod:
--set env.MAIL__CONTACT_MAIL="${PRODUCTION_MAIL__CONTACT_MAIL}"
--set env.REDIRECT_TARGET="${PRODUCTION_REDIRECT_TARGET}"
--set env.USER_WEBSITE_URL="${PRODUCTION_USER_WEBSITE_URL}"
--set env.VAPID__PUBLIC_KEY="${PRODUCTION_VAPID__PUBLIC_KEY}"
--set env.VAPID__PRIVATE_KEY="${PRODUCTION_VAPID__PRIVATE_KEY}"
--set-string env.WHITELIST_DOMAINS="${PRODUCTION_WHITELIST_DOMAINS}"
--set env.VERSION="Version ${CI_COMMIT_REF_NAME} - ${CI_COMMIT_SHA} (job \#${CI_JOB_ID})"
--set ingress.issuer="letsencrypt-prod"
--set monitoring.alert.minimumPod=3
--wait
e-chauffeur-api-${CI_COMMIT_REF_SLUG}
api
.helm-chart
only:
refs:
- master
except:
refs:
- tags
9 changes: 0 additions & 9 deletions .helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define ".helm-chart.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Expand Down
6 changes: 4 additions & 2 deletions .helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ spec:
value: "{{ .Values.env.TOKEN__DURATION }}"
- name: TOKEN__SECRET
value: "{{ randAlphaNum 35 }}"
- name: SATISFACTION_QUESTIONNAIRE_URL
value: "{{ .Values.env.SATISFACTION_QUESTIONNAIRE_URL }}"
- name: TWILIO__SID
value: "{{ .Values.env.TWILIO__SID }}"
- name: TWILIO__TOKEN
Expand All @@ -59,6 +57,10 @@ spec:
value: "{{ .Values.env.MAIL__TEXT }}"
- name: MAIL__SUBJECT
value: "{{ .Values.env.MAIL__SUBJECT }}"
- name: VAPID__PUBLIC_KEY
value: "{{ .Values.env.VAPID__PUBLIC_KEY }}"
- name: VAPID__PRIVATE_KEY
value: "{{ .Values.env.VAPID__PRIVATE_KEY }}"
- name: REDIRECT_TARGET
value: "{{ .Values.env.REDIRECT_TARGET }}"
- name: USER_WEBSITE_URL
Expand Down
Loading

0 comments on commit 06e83af

Please sign in to comment.