Re activate fixture job (#717)
* Re activate fixture job * restore dailycron values * enable fixture * debug fixture cron * Enable postgres container on PR
This commit is contained in:
parent
d13959ee1f
commit
9344e32cd9
6 changed files with 84 additions and 25 deletions
10
.github/workflows/deploy.yml
vendored
10
.github/workflows/deploy.yml
vendored
|
|
@ -3,12 +3,20 @@ name: Deploy
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
secrets:
|
secrets:
|
||||||
|
kubeconfig:
|
||||||
|
description: kubeconfig stored as a base64 encrypted secret
|
||||||
|
required: true
|
||||||
domain:
|
domain:
|
||||||
description: Main project deploy domain used in URLs
|
description: Main project deploy domain used in URLs
|
||||||
required: true
|
required: true
|
||||||
payum-apikey:
|
payum-apikey:
|
||||||
description: Payum API Key
|
description: Payum API Key
|
||||||
required: true
|
required: true
|
||||||
|
sms-dsn:
|
||||||
|
description: SMS DSN
|
||||||
|
required: true
|
||||||
|
mailer-dsn:
|
||||||
|
description: MAILER DSN
|
||||||
storage-key:
|
storage-key:
|
||||||
description: storage key
|
description: storage key
|
||||||
required: true
|
required: true
|
||||||
|
|
@ -117,6 +125,8 @@ jobs:
|
||||||
--set=ingress.tls[0].secretName=${{ needs.meta.outputs.release_name }}-tls \
|
--set=ingress.tls[0].secretName=${{ needs.meta.outputs.release_name }}-tls \
|
||||||
--set=ingress.tls[0].hosts[0]=${{ vars.DOMAIN }} \
|
--set=ingress.tls[0].hosts[0]=${{ vars.DOMAIN }} \
|
||||||
--set=postgresql.url="${{ secrets.database-url }}" \
|
--set=postgresql.url="${{ secrets.database-url }}" \
|
||||||
|
--set=postgresql.enabled='${{ github.event_name == 'pull_request' }}' \
|
||||||
|
--set=sms.dsn="${{ secrets.sms-dsn }}" \
|
||||||
--set=payum.apikey="${{ secrets.payum-apikey }}" \
|
--set=payum.apikey="${{ secrets.payum-apikey }}" \
|
||||||
--set=mailer.dsn="${{ secrets.mailer-dsn }}" \
|
--set=mailer.dsn="${{ secrets.mailer-dsn }}" \
|
||||||
--set=php.storage.bucket="${{ vars.STORAGE_BUCKET }}" \
|
--set=php.storage.bucket="${{ vars.STORAGE_BUCKET }}" \
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if .Values.php.fixtureCron.enabled }}
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: CronJob
|
kind: CronJob
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -22,19 +23,20 @@ spec:
|
||||||
serviceAccountName: {{ include "plateforme-ebs.serviceAccountName" . }}
|
serviceAccountName: {{ include "plateforme-ebs.serviceAccountName" . }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}-cronjob-notify-ms-e-7
|
- name: {{ .Chart.Name }}-cronjob-fixture-reset
|
||||||
image: "{{ .Values.php.image.repository }}:{{ .Values.php.image.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.php.image.repository }}:{{ .Values.php.image.tag | default .Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ .Values.php.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.php.image.pullPolicy }}
|
||||||
command: ['/bin/sh', '-c']
|
command: ['/bin/sh', '-c']
|
||||||
args: ['
|
args: ['
|
||||||
|
set -ex;
|
||||||
bin/console doctrine:database:drop --if-exists --force;
|
bin/console doctrine:database:drop --if-exists --force;
|
||||||
bin/console doctrine:database:create --if-not-exists;
|
bin/console doctrine:database:create --if-not-exists;
|
||||||
bin/console doctrine:schema:create;
|
bin/console doctrine:schema:create;
|
||||||
bin/console doctrine:schema:validate;
|
bin/console doctrine:schema:validate;
|
||||||
bin/console messenger:setup-transports;
|
bin/console messenger:setup-transports;
|
||||||
bin/console hautelook:fixtures:load --no-interaction -vv --no-bundles;
|
bin/console hautelook:fixtures:load --no-interaction -vv --no-bundles;
|
||||||
bin/console app:index-products;
|
bin/console app:index-products;'
|
||||||
']
|
]
|
||||||
env:
|
env:
|
||||||
- name: API_ENTRYPOINT_HOST
|
- name: API_ENTRYPOINT_HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if .Values.php.fixtureJob.enabled -}}
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -32,18 +33,14 @@ spec:
|
||||||
command: ['/bin/sh', '-c']
|
command: ['/bin/sh', '-c']
|
||||||
args: ['
|
args: ['
|
||||||
set -ex;
|
set -ex;
|
||||||
echo no fixtures job at the moment
|
bin/console doctrine:database:drop --if-exists --force;
|
||||||
|
bin/console doctrine:database:create --if-not-exists;
|
||||||
|
bin/console doctrine:schema:create;
|
||||||
|
bin/console doctrine:schema:validate;
|
||||||
|
bin/console messenger:setup-transports;
|
||||||
|
bin/console hautelook:fixtures:load --no-interaction -vv --no-bundles;
|
||||||
|
bin/console app:index-products;
|
||||||
']
|
']
|
||||||
# if [ "$APP_ENV" != "prod" ]; then
|
|
||||||
# composer install --prefer-dist --no-progress --no-suggest --no-interaction;
|
|
||||||
# fi;
|
|
||||||
# bin/console doctrine:database:drop --if-exists --force;
|
|
||||||
# bin/console doctrine:database:create --if-not-exists;
|
|
||||||
# bin/console doctrine:schema:create;
|
|
||||||
# bin/console doctrine:schema:validate;
|
|
||||||
# bin/console messenger:setup-transports;
|
|
||||||
# bin/console hautelook:fixtures:load --no-interaction -vv --no-bundles;
|
|
||||||
# bin/console app:index-products;
|
|
||||||
env:
|
env:
|
||||||
- name: API_ENTRYPOINT_HOST
|
- name: API_ENTRYPOINT_HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
@ -208,3 +205,4 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
38
helm/chart/values-nonprod.yml
Normal file
38
helm/chart/values-nonprod.yml
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
className: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||||
|
hosts:
|
||||||
|
- host: toset
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: toset
|
||||||
|
hosts:
|
||||||
|
- toset
|
||||||
|
|
||||||
|
meilisearch:
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
storageClass: "standard"
|
||||||
|
size: "1Gi"
|
||||||
|
|
||||||
|
redis:
|
||||||
|
master:
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
storageClass: "standard"
|
||||||
|
size: "1Gi"
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
url: change_me
|
||||||
|
|
||||||
|
php:
|
||||||
|
fixtureJob:
|
||||||
|
enabled: true
|
||||||
|
fixtureCron:
|
||||||
|
enabled: true
|
||||||
|
|
@ -29,4 +29,10 @@ redis:
|
||||||
size: "1Gi"
|
size: "1Gi"
|
||||||
|
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
url: change_me
|
||||||
|
|
||||||
|
php:
|
||||||
|
fixtureJob:
|
||||||
|
enabled: true
|
||||||
|
fixtureCron:
|
||||||
|
enabled: true
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,13 @@ php:
|
||||||
usePathStyleEndpoint: true
|
usePathStyleEndpoint: true
|
||||||
publicKey: ""
|
publicKey: ""
|
||||||
secret: ""
|
secret: ""
|
||||||
|
fixtureCron:
|
||||||
|
enabled: false
|
||||||
|
fixtureJob:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
dailyCronjobs:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
maildev:
|
maildev:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
@ -41,9 +48,6 @@ mailer:
|
||||||
sms:
|
sms:
|
||||||
dsn: "null://null"
|
dsn: "null://null"
|
||||||
|
|
||||||
dailyCronjobs:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
consumer:
|
consumer:
|
||||||
# We don't use async for now so consumer isn't needed
|
# We don't use async for now so consumer isn't needed
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
@ -73,6 +77,7 @@ postgresql:
|
||||||
username: "example"
|
username: "example"
|
||||||
password: "!ChangeMe!"
|
password: "!ChangeMe!"
|
||||||
database: "api"
|
database: "api"
|
||||||
|
postgresPassword: "!ChangeMe!"
|
||||||
# Persistent Volume Storage configuration.
|
# Persistent Volume Storage configuration.
|
||||||
# ref: https://kubernetes.io/docs/user-guide/persistent-volumes
|
# ref: https://kubernetes.io/docs/user-guide/persistent-volumes
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue