Skip to content

Commit 4487c83

Browse files
committed
Merge branch 'feature/#1959-Staging-SIMS-Prod-Environment-Formio-Build-Deploy' into feature/#1959-Staging-SIMS-Prod-Environment-Formio-GithubAction-Build-Deploy
2 parents b688604 + 5b0d5a9 commit 4487c83

File tree

2 files changed

+51
-13
lines changed

2 files changed

+51
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Env Setup - Build Forms Server
2+
run-name: Env Setup - Build forms server from ${{ inputs.gitRef }}(form.io tag ${{ inputs.formioTag }}) to ${{ inputs.environment }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
formioTag:
8+
description: "Formio tag, please refer https://github.com/formio/formio/tags to deploy the appropriate tag."
9+
type: string
10+
required: true
11+
default: "v2.5.3"
12+
gitRef:
13+
description: "Git Ref"
14+
required: true
15+
default: ""
16+
17+
jobs:
18+
build:
19+
name: Build Forms Server
20+
runs-on: ubuntu-latest
21+
env:
22+
FORMIO_SOURCE_REPO_TAG: ${{ inputs.formioTag }}
23+
BUILD_REF: ${{ inputs.formioTag }}
24+
BUILD_NAMESPACE: 0c27fb-tools
25+
steps:
26+
- name: Print env
27+
run: |
28+
echo BUILD NAMESPACE: $BUILD_NAMESPACE
29+
echo BRANCH: $BUILD_REF
30+
# Checkout the PR branch
31+
- name: Checkout Target Branch
32+
uses: actions/checkout@v3
33+
with:
34+
ref: ${{ inputs.gitRef }}
35+
# Log in to OpenShift.
36+
# Note: The secrets needed to log in are NOT available if the PR comes from a FORK.
37+
# PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail.
38+
- name: Log in to OpenShift
39+
run: |
40+
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443
41+
# Build Forms
42+
- name: Build Forms server
43+
working-directory: "./devops/"
44+
run: |
45+
make oc-build-forms

.github/workflows/env-setup-build-deploy-forms-server.yml .github/workflows/env-setup-deploy-forms-server.yml

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Env Setup - Build and Deploy Forms Server
2-
run-name: Env Setup - Build and deploy forms server from ${{ inputs.gitRef }}(form.io tag ${{ inputs.formioTag }}) to ${{ inputs.environment }}
1+
name: Env Setup - Deploy Forms Server
2+
run-name: Env Setup - Deploy forms server from ${{ inputs.gitRef }}(form.io tag ${{ inputs.formioTag }}) to ${{ inputs.environment }}
33

44
on:
55
workflow_dispatch:
@@ -19,22 +19,20 @@ on:
1919
default: ""
2020

2121
jobs:
22-
build_deploy:
23-
name: Build and Deploy Formio Server.
22+
deploy:
23+
name: Deploy Forms Server
2424
runs-on: ubuntu-latest
2525
environment: ${{ inputs.environment }}
2626
env:
27-
FORMIO_SOURCE_REPO_TAG: ${{ inputs.formioTag }}
2827
FORMS_NAME: forms
2928
NAMESPACE: ${{ secrets.OPENSHIFT_ENV_NAMESPACE }}
3029
BUILD_REF: ${{ inputs.formioTag }}
3130
HOST_PREFIX: ${{ secrets.HOST_PREFIX }}
32-
MONGODB_URI: ${{ secrets.MONGODB_URI }}
33-
BUILD_NAMESPACE: 0c27fb-tools
31+
FORMIO_ROOT_EMAIL: ${{ secrets.FORMIO_ROOT_EMAIL }}
32+
FORMS_URL: ${{ secrets.FORMS_URL }}
3433
steps:
3534
- name: Print env
3635
run: |
37-
echo BUILD NAMESPACE: $BUILD_NAMESPACE
3836
echo NAMESPACE: $NAMESPACE
3937
echo BRANCH: $BUILD_REF
4038
echo HOST_PREFIX: $HOST_PREFIX
@@ -49,11 +47,6 @@ jobs:
4947
- name: Log in to OpenShift
5048
run: |
5149
oc login --token=${{ secrets.SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443
52-
# Build Forms
53-
- name: Build Forms server
54-
working-directory: "./devops/"
55-
run: |
56-
make oc-build-forms
5750
# Deploy Forms
5851
- name: Deploy Forms server
5952
working-directory: "./devops/"

0 commit comments

Comments
 (0)