diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76bf5106f4652986b25103dd11f3f5b5cd23354c..5206657be21898cea56b40b42ca6f20efc09ab69 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ variables: build: stage: build-npm - <<: *commonheader + <<: *tags image: node:12-slim artifacts: paths: @@ -37,6 +37,7 @@ build: expire_in: 2 days when: always script: + - npm ci - npm run build build-container: @@ -57,6 +58,9 @@ build-container: deploy: stage: deploy <<: *commonheader + only: + refs: + - master image: ${REGISTERY_URL}/${DOCKER_REGISTERY_PREFIX}/app/cd-tools:0.1 script: - set -xv diff --git a/charts/theautomatedlife/templates/app.yml b/charts/theautomatedlife/templates/app.yml index 76619dca3c256a6ee9462a6ed0b13ce7f022d03e..9f872958354804b6b7720e050d8c3c968250acbe 100644 --- a/charts/theautomatedlife/templates/app.yml +++ b/charts/theautomatedlife/templates/app.yml @@ -1,16 +1,25 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: dockersecret-future-of-work +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ .Values.dockersecret }} +--- apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: future-of-work + name: future-of-work-2 spec: replicas: 1 template: metadata: labels: - app: future-of-work + app: future-of-work-2 spec: containers: - - image: {{ .Values.registryUrl }}/{{ .Values.dockerRegistryPrefix }}/future-of-work:{{ .Values.imageTag }} + - image: {{ .Values.registryUrl }}/{{ .Values.dockerRegistryPrefix }}/theautomatedlife:{{ .Values.imageTag }} imagePullPolicy: Always name: future-of-work ports: @@ -29,23 +38,25 @@ spec: value: {{ .Values.fowPsqlUri }} - name: FOW_AUTH_KEY value: {{ .Values.fowAuthKey }} + imagePullSecrets: + - name: dockersecret-future-of-work --- apiVersion: v1 kind: Service metadata: - name: future-of-work + name: future-of-work-2 spec: ports: - port: 80 targetPort: 8080 protocol: TCP selector: - app: future-of-work + app: future-of-work-2 --- apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: future-of-work + name: future-of-work-2 annotations: kubernetes.io/tls-acme: "true" kubernetes.io/ingress.class: "nginxtal" @@ -53,12 +64,12 @@ spec: tls: - hosts: - theautomated.life -# secretName: ingress-ca + # secretName: ingress-ca rules: - host: theautomated.life http: paths: - path: / backend: - serviceName: future-of-work + serviceName: future-of-work-2 servicePort: 80