Deploy Alpha to Alpha-Test #168
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |