-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (36 loc) · 1.82 KB
/
deploy-alpha-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy Develop to Alpha-Test
on:
workflow_dispatch
env:
TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_LICENSE_PLATE }}-tools
ENVIRONMENT: test
NAMESPACE: ${{ secrets.OPENSHIFT_LICENSE_PLATE }}-test
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Login OpenShift
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_URL }}
openshift_token: ${{ secrets.OPENSHIFT_SERVICE_TOKEN }}
- name: Tag Test images
run: |
oc -n ${{ env.TOOLS_NAMESPACE }} tag admin-develop:latest admin-develop:${{ env.ENVIRONMENT }}
oc -n ${{ env.TOOLS_NAMESPACE }} tag public-builder-develop:latest public-builder-develop:${{ env.ENVIRONMENT }}
oc -n ${{ env.TOOLS_NAMESPACE }} tag strapi-develop:latest strapi-develop:${{ env.ENVIRONMENT }}
oc -n ${{ env.TOOLS_NAMESPACE }} tag maintenance-develop:latest maintenance-develop:${{ env.ENVIRONMENT }}
oc -n ${{ env.TOOLS_NAMESPACE }} tag etl-develop:latest etl-develop:${{ env.ENVIRONMENT }}
oc -n ${{ env.TOOLS_NAMESPACE }} tag elasticmanager-develop:latest elasticmanager-develop:${{ env.ENVIRONMENT }}
- name: Trigger Gatsby static build workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: publish-gatsby
client-payload: '{"env": "${{ env.ENVIRONMENT }}", "branch": "develop"}'
- name: Trigger new rollout
run: |
oc -n ${{ env.NAMESPACE }} rollout restart deployment develop-admin
oc -n ${{ env.NAMESPACE }} rollout restart deployment develop-cms
oc -n ${{ env.NAMESPACE }} rollout restart deployment develop-maintenance
oc -n ${{ env.NAMESPACE }} rollout restart deployment develop-elasticmanager