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:
|
||||
workflow_call:
|
||||
secrets:
|
||||
kubeconfig:
|
||||
description: kubeconfig stored as a base64 encrypted secret
|
||||
required: true
|
||||
domain:
|
||||
description: Main project deploy domain used in URLs
|
||||
required: true
|
||||
payum-apikey:
|
||||
description: Payum API Key
|
||||
required: true
|
||||
sms-dsn:
|
||||
description: SMS DSN
|
||||
required: true
|
||||
mailer-dsn:
|
||||
description: MAILER DSN
|
||||
storage-key:
|
||||
description: storage key
|
||||
required: true
|
||||
|
|
@ -117,6 +125,8 @@ jobs:
|
|||
--set=ingress.tls[0].secretName=${{ needs.meta.outputs.release_name }}-tls \
|
||||
--set=ingress.tls[0].hosts[0]=${{ vars.DOMAIN }} \
|
||||
--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=mailer.dsn="${{ secrets.mailer-dsn }}" \
|
||||
--set=php.storage.bucket="${{ vars.STORAGE_BUCKET }}" \
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{{- if .Values.php.fixtureCron.enabled }}
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
|
|
@ -22,19 +23,20 @@ spec:
|
|||
serviceAccountName: {{ include "plateforme-ebs.serviceAccountName" . }}
|
||||
restartPolicy: Never
|
||||
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 }}"
|
||||
imagePullPolicy: {{ .Values.php.image.pullPolicy }}
|
||||
command: ['/bin/sh', '-c']
|
||||
args: ['
|
||||
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;
|
||||
']
|
||||
args: ['
|
||||
set -ex;
|
||||
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:
|
||||
- name: API_ENTRYPOINT_HOST
|
||||
valueFrom:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{{- if .Values.php.fixtureJob.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
|
|
@ -32,18 +33,14 @@ spec:
|
|||
command: ['/bin/sh', '-c']
|
||||
args: ['
|
||||
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:
|
||||
- name: API_ENTRYPOINT_HOST
|
||||
valueFrom:
|
||||
|
|
@ -208,3 +205,4 @@ spec:
|
|||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- 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"
|
||||
|
||||
postgresql:
|
||||
enabled: false
|
||||
url: change_me
|
||||
|
||||
php:
|
||||
fixtureJob:
|
||||
enabled: true
|
||||
fixtureCron:
|
||||
enabled: true
|
||||
|
|
|
|||
|
|
@ -30,6 +30,13 @@ php:
|
|||
usePathStyleEndpoint: true
|
||||
publicKey: ""
|
||||
secret: ""
|
||||
fixtureCron:
|
||||
enabled: false
|
||||
fixtureJob:
|
||||
enabled: false
|
||||
|
||||
dailyCronjobs:
|
||||
enabled: true
|
||||
|
||||
maildev:
|
||||
enabled: false
|
||||
|
|
@ -41,9 +48,6 @@ mailer:
|
|||
sms:
|
||||
dsn: "null://null"
|
||||
|
||||
dailyCronjobs:
|
||||
enabled: true
|
||||
|
||||
consumer:
|
||||
# We don't use async for now so consumer isn't needed
|
||||
enabled: false
|
||||
|
|
@ -73,6 +77,7 @@ postgresql:
|
|||
username: "example"
|
||||
password: "!ChangeMe!"
|
||||
database: "api"
|
||||
postgresPassword: "!ChangeMe!"
|
||||
# Persistent Volume Storage configuration.
|
||||
# ref: https://kubernetes.io/docs/user-guide/persistent-volumes
|
||||
pullPolicy: IfNotPresent
|
||||
|
|
|
|||
Loading…
Reference in a new issue