Skip to content

BCAT-535, 536 | Enable Workshop Board in approved/denied; Add Back button #15

BCAT-535, 536 | Enable Workshop Board in approved/denied; Add Back button

BCAT-535, 536 | Enable Workshop Board in approved/denied; Add Back button #15

name: BCAT build and deploy to OpenShift (dev, test)
on:
pull_request:
types: [closed]
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./.pipeline
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Build BCAT app
run: |
oc version
oc login --token=${{ secrets.OPENSHIFT_TOKEN}} --server=${{ secrets.OPENSHIFT_SERVER_URL }}
npm ci
DEBUG=* npm run build -- --pr=${{ github.event.pull_request.number }} --git.branch.name=${{github.head_ref}} --git.ref=${{github.head_ref}}
deploy-to-dev:
runs-on: ubuntu-latest
needs: [build]
defaults:
run:
working-directory: ./.pipeline
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Deploy to dev
run: |
oc version
oc login --token=${{ secrets.OPENSHIFT_TOKEN}} --server=${{ secrets.OPENSHIFT_SERVER_URL }}
npm ci
DEBUG=* npm run deploy -- --pr=${{ github.event.pull_request.number }} --env=dev --git.branch.name=${{github.head_ref}} --git.ref=${{github.head_ref}}
deploy-to-test:
needs: [build, deploy-to-dev]
environment:
name: test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./.pipeline
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Deploy to test
run: |
oc version
oc login --token=${{ secrets.OPENSHIFT_TOKEN}} --server=${{ secrets.OPENSHIFT_SERVER_URL }}
npm ci
DEBUG=* npm run deploy -- --pr=${{ github.event.pull_request.number }} --env=test --git.branch.name=${{github.head_ref}} --git.ref=${{github.head_ref}}