Skip to content

Commit 1a48c7d

Browse files
author
LDFOUR\luisd
committed
Merge branch 'staging' into feature/WN-310
# Conflicts: # resources/lang/en.json
2 parents 5022886 + b109f82 commit 1a48c7d

18 files changed

Lines changed: 2458 additions & 2340 deletions

File tree

.github/workflows/development-pipeline.yml renamed to .github/workflows/production-pipeline.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
name: development-pipeline
1+
name: Production Pipeline
22

33
on:
4-
pull_request:
5-
types:
6-
- closed
7-
branches:
8-
- 'develop'
4+
workflow_dispatch: # Allows manual execution
95

106
jobs:
117
build-and-deploy:
@@ -19,10 +15,6 @@ jobs:
1915
with:
2016
creds: ${{ secrets.AZURE_CREDENTIALS }}
2117

22-
- name: 'Copy staging values file'
23-
run: |
24-
cp ./helm-chart-backoffice/values-staging.yaml ./helm-chart-backoffice/values.yaml
25-
2618
- name: 'Set up Kubernetes'
2719
uses: azure/aks-set-context@v2
2820
with:
@@ -37,12 +29,18 @@ jobs:
3729
username: ${{ secrets.REGISTRY_USERNAME }}
3830
password: ${{ secrets.REGISTRY_PASSWORD }}
3931
- run: |
32+
cp swagger.prod .env
4033
docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow:${{ github.sha }} -f ./docker/Dockerfile .
4134
docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow:latest
4235
4336
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow:${{ github.sha }}
4437
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow:latest
4538
39+
- name: 'Copy production values file'
40+
run: |
41+
cp ./helm-chart-backoffice/values-production.yaml ./helm-chart-backoffice/values.yaml
42+
43+
4644
- name: 'Deploy to AKS with Helm'
4745
run: |
4846
helm upgrade --install whatnow-backoffice ./helm-chart-backoffice \

.github/workflows/qa-pipeline.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Staging Pipeline
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- 'staging'
9+
10+
jobs:
11+
build-and-deploy:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: 'Checkout GitHub Action'
16+
uses: actions/checkout@main
17+
18+
- name: 'Login via Azure CLI'
19+
uses: azure/login@v1
20+
with:
21+
creds: ${{ secrets.AZURE_CREDENTIALS }}
22+
23+
- name: 'Set up Kubernetes'
24+
uses: azure/aks-set-context@v2
25+
with:
26+
creds: ${{ secrets.AZURE_CREDENTIALS }}
27+
cluster-name: ${{ secrets.AKS_CLUSTER_NAME }}
28+
resource-group: ${{ secrets.AKS_RESOURCE_GROUP }}
29+
30+
- name: 'Build and push image'
31+
uses: azure/docker-login@v1
32+
with:
33+
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
34+
username: ${{ secrets.REGISTRY_USERNAME }}
35+
password: ${{ secrets.REGISTRY_PASSWORD }}
36+
- run: |
37+
cp swagger.qa .env
38+
docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow-qa:${{ github.sha }} -f ./docker/Dockerfile .
39+
docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow-qa:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow-qa:latest
40+
41+
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow-qa:${{ github.sha }}
42+
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnow-qa:latest
43+
44+
- name: 'Copy staging values file'
45+
run: |
46+
cp ./helm-chart-backoffice/values-staging.yaml ./helm-chart-backoffice/values.yaml
47+
48+
49+
- name: 'Deploy to AKS with Helm'
50+
run: |
51+
helm upgrade --install whatnow-backoffice-qa ./helm-chart-backoffice \
52+
--namespace ${{ secrets.AKS_CLUSTER_NAMESPACE_QA }} \
53+
--create-namespace

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ yarn-error.log
1818
/public/mix-manifest.json
1919
phpunit.dusk.xml
2020
.php_cs.cache
21-
helm-chart-backoffice/secrets.yml
21+
helm-chart-backoffice/fullchain.pem
22+
helm-chart-backoffice/privkey.pem
23+
helm-chart-backoffice/secrets-qa.yml
24+
helm-chart-backoffice/secrets-prod.yml
25+
.DS_Store

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Ensure the following tools are installed on your system:
105105
| `php artisan migrate` | Runs database migrations |
106106
| `php artisan db:seed` | Seeds the database with sample data |
107107
| `php artisan make:model` | Creates a new Eloquent model |
108-
| `php artisan make:controller`| Creates a new controller |
108+
| `php artisan make:controller`| Creates a new controller |
109109

110110
## Documentation
111111

config/app.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
'url' => env('APP_URL', 'http://localhost'),
2020

2121

22+
'api_url' => env('API_URL', 'http://localhost'),
23+
2224

2325
'timezone' => 'UTC',
2426

config/l5-swagger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,6 @@
234234
|--------------------------------------------------------------------------
235235
*/
236236
'constants' => [
237-
'L5_SWAGGER_CONST_HOST' => env('APP_URL', 'https://preparemessages-stage.ifrc.org') . '/api',
237+
'L5_SWAGGER_CONST_HOST' => env('SWAGGER_URL', null),
238238
],
239239
];
Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
apiVersion: v2
2-
name: helm-chart-backoffice
3-
namespace: whatnow-cluster
4-
description: Helm chart to deploy Laravel API - Production Environment
5-
version: 0.1.0
6-
appVersion: "1.0.0"
71
# Azure Container Registry details
82
image:
93
repository: ifrcsmdb.azurecr.io/whatnow
10-
tag: "production"
4+
tag: "latest"
115
pullPolicy: Always
126

137
replicaCount: 2
@@ -24,6 +18,7 @@ env:
2418
APP_DEBUG: false
2519
APP_LOG_LEVEL: info
2620
APP_URL: https://preparemessages.ifrc.org
21+
API_URL: https://api-preparemessages.ifrc.org
2722
GOOGLE_MAPS_KEY:
2823
DB_CONNECTION: mysql
2924
DB_PORT: 3306
@@ -38,39 +33,38 @@ env:
3833
MAIL_HOST: smtp.azurecomm.net
3934
MAIL_PORT: 587
4035
MAIL_ENCRYPTION: tls
41-
MAIL_USER: Whatnow
42-
MAIL_FROM_ADDRESS: DoNotReply@email.whatnow.ifrc.org
4336
PUSHER_APP_ID:
4437
PUSHER_APP_KEY:
4538
PUSHER_APP_SECRET:
46-
RCN_API_VERSION: v1
39+
RCN_API_VERSION: v2
4740
FACEBOOK_APP_ID:
4841
FACEBOOK_APP_SECRET:
4942
GOOGLE_CLIENT_ID:
5043
GOOGLE_CLIENT_SECRET:
5144
GOOGLE_ANALYTICS_TRACKER_ID:
5245
SENTRY_DSN:
53-
TRANSIFEX_API_TOKEN:
54-
TRANSIFEX_PROJECT:
55-
TRANSIFEX_SLUG:
5646
BUCKET_URL: https://smdbstorageaccount.blob.core.windows.net/images
47+
IFRC_TRANSLATION_APP_ID: 12
48+
IFRC_TRANSLATION_API_URL: https://ifrcumicroservicesapim001.azure-api.net/translation/api
49+
5750

5851

5952
secrets:
60-
dbSecretName: backoffice-production-credentials
53+
dbSecretName: backoffice-credentials
6154
variables:
62-
DB_HOST: BACKOFFICE_DB_HOST_PROD
63-
DB_DATABASE: BACKOFFICE_DB_DATABASE_PROD
64-
DB_USERNAME: BACKOFFICE_DB_USERNAME_PROD
65-
DB_PASSWORD: BACKOFFICE_DB_PASSWORD_PROD
66-
APP_KEY: BACKOFFICE_APP_KEY_PROD
67-
JWT_SECRET: BACKOFFICE_JWT_SECRET_PROD
68-
RCN_API_URL: BACKOFFICE_RCN_API_URL_PROD
69-
RCN_API_USER: BACKOFFICE_RCN_API_USER_PROD
70-
RCN_API_PASSWORD: BACKOFFICE_RCN_API_PASSWORD_PROD
71-
MAIL_ENDPOINT: MAIL_ENDPOINT_PROD
72-
MAIL_FROM: MAIL_FROM_PROD
73-
MAIL_API_KEY: MAIL_API_KEY_PROD
55+
DB_HOST: BACKOFFICE_DB_HOST
56+
DB_DATABASE: BACKOFFICE_DB_DATABASE
57+
DB_USERNAME: BACKOFFICE_DB_USERNAME
58+
DB_PASSWORD: BACKOFFICE_DB_PASSWORD
59+
APP_KEY: BACKOFFICE_APP_KEY
60+
JWT_SECRET: BACKOFFICE_JWT_SECRET
61+
RCN_API_URL: BACKOFFICE_RCN_API_URL
62+
RCN_API_USER: BACKOFFICE_RCN_API_USER
63+
RCN_API_PASSWORD: BACKOFFICE_RCN_API_PASSWORD
64+
MAIL_ENDPOINT: MAIL_ENDPOINT
65+
MAIL_FROM: MAIL_FROM
66+
IFRC_TRANSLATION_API_KEY: IFRC_TRANSLATION_API_KEY
67+
MAIL_API_KEY: MAIL_API_KEY
7468

7569

7670
ingress:
@@ -84,7 +78,14 @@ ingress:
8478
paths:
8579
- path: /
8680
pathType: Prefix
81+
- host: "whatnow.jazusoft.com"
82+
paths:
83+
- path: /
84+
pathType: Prefix
8785
tls:
8886
- hosts:
8987
- "preparemessages.ifrc.org"
9088
secretName: "ifrc.certificates.secret"
89+
- hosts:
90+
- "whatnow.jazusoft.com"
91+
secretName: "jazusoft.certificates.secret"

helm-chart-backoffice/values-staging.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Azure Container Registry details
22
image:
3-
repository: ifrcsmdb.azurecr.io/whatnow
3+
repository: ifrcsmdb.azurecr.io/whatnow-qa
44
tag: "latest"
55
pullPolicy: Always
66

@@ -18,6 +18,7 @@ env:
1818
APP_DEBUG: true
1919
APP_LOG_LEVEL: debug
2020
APP_URL: https://preparemessages-stage.ifrc.org
21+
API_URL: https://api-preparemessages-stage.ifrc.org
2122
GOOGLE_MAPS_KEY:
2223
DB_CONNECTION: mysql
2324
DB_PORT: 3306
@@ -42,14 +43,14 @@ env:
4243
GOOGLE_CLIENT_SECRET:
4344
GOOGLE_ANALYTICS_TRACKER_ID:
4445
SENTRY_DSN:
45-
BUCKET_URL: https://smdbstorageaccount.blob.core.windows.net/images
46+
BUCKET_URL: https://smdbstorageaccount.blob.core.windows.net/images-stage
4647
IFRC_TRANSLATION_APP_ID: 12
4748
IFRC_TRANSLATION_API_URL: https://ifrc-translationapi-staging.azurewebsites.net/api
4849

4950

5051

5152
secrets:
52-
dbSecretName: backoffice-credentials
53+
dbSecretName: backoffice-credentials-qa
5354
variables:
5455
DB_HOST: BACKOFFICE_DB_HOST
5556
DB_DATABASE: BACKOFFICE_DB_DATABASE

resources/assets/js/components/App.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
<h2>
4040
{{ $t('landing.footer.subtitle_3') }}
4141
</h2>
42-
<router-link class="footer-link" :to="{ name: 'legal_terms' }">
43-
{{ $t('landing.footer.terms') }}
44-
</router-link>
4542
<br>
4643
<router-link class="footer-link" :to="{ name: 'terms-service' }">
4744
{{ $t('landing.footer.terms_service') }}

0 commit comments

Comments
 (0)