Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BHBC-2106: Migrate Dev to Test #904

Merged
merged 18 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .github/workflows/addComments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Add Comments

on:
pull_request:
types: [opened]
branches:
- dev
types: [opened, ready_for_review]

jobs:
addOpenshiftURLComment:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/cleanClosedPR.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Clean out the deployment artifacts when a PR is closed, without a merge.
# This clean out gets rid of the PR artifacts in Dev and in Tools.
name: Clean out Dev from closed PR Artifacts

on:
pull_request:
branches: [dev]
branches:
- '*'
- '!test'
- '!prod'
types: [closed]

jobs:
clean:
name: Clean Deployment Artifacts for API and App in Dev and Tools environment
runs-on: ubuntu-latest
# Only do this when the PR was not merged and only for dev
if: ${{ github.event.pull_request.merged != true && github.base_ref == 'dev' && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged != true }}
env:
BUILD_ID: ${{ github.event.number }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: PR-Based Deploy on OpenShift

on:
pull_request:
types: [opened, reopened, synchronize]
types: [opened, reopened, synchronize, ready_for_review]

jobs:
# Print variables for logging and debugging purposes
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/deployStatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Static Deploy on OpenShift

on:
pull_request:
types: [opened, reopened, synchronize, closed]
types: [closed]
branches:
- dev
- test
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
buildDatabase:
name: Build Database Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
buildDatabaseSetup:
name: Build Database Setup Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
buildAPI:
name: Build API Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
buildAPP:
name: Build App Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
deployDatabase:
name: Deploy Database Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
deployDatabaseSetup:
name: Deploy Database Setup Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -343,7 +343,7 @@ jobs:
deployAPI:
name: Deploy API Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -393,7 +393,7 @@ jobs:
deployAPP:
name: Deploy App Image
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
env:
BUILD_ID: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
Expand Down Expand Up @@ -442,7 +442,7 @@ jobs:
clean:
name: Clean Build/Deployment Artifacts
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.merged == true }}
needs:
- deployAPP
- deployAPI
Expand Down Expand Up @@ -608,7 +608,7 @@ jobs:
notify:
name: Discord Notification
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false }} && always()
if: ${{ github.event.pull_request.merged == true }} && always()
needs: # make sure the notification is sent AFTER the jobs you want included have completed
- deployAPP
- deployAPI
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Formating Checks

on:
pull_request:
branches:
- dev
types: [opened, reopened, synchronize, ready_for_review]

jobs:
format:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Linting Checks

on:
pull_request:
branches:
- dev
types: [opened, reopened, synchronize, ready_for_review]

jobs:
lint:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Test Checks

on:
push:
branches:
- dev
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches:
- dev

Expand Down
4 changes: 4 additions & 0 deletions api/.pipeline/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const phases = {
tag: tag,
env: 'build',
elasticsearchURL: 'https://elasticsearch-af2668-dev.apps.silver.devops.gov.bc.ca',
elasticsearchTaxonomyIndex: 'taxonomy_2.0.0',
tz: config.timezone.api,
branch: branch,
logLevel: (isStaticDeployment && 'info') || 'debug'
Expand All @@ -82,6 +83,7 @@ const phases = {
backboneIntakeEnabled: true,
env: 'dev',
elasticsearchURL: 'https://elasticsearch-af2668-dev.apps.silver.devops.gov.bc.ca',
elasticsearchTaxonomyIndex: 'taxonomy_2.0.0',
tz: config.timezone.api,
sso: config.sso.dev,
replicas: 1,
Expand All @@ -105,6 +107,7 @@ const phases = {
backboneIntakeEnabled: false,
env: 'test',
elasticsearchURL: 'http://es01:9200',
elasticsearchTaxonomyIndex: 'taxonomy_2.0.0',
tz: config.timezone.api,
sso: config.sso.test,
replicas: 3,
Expand All @@ -128,6 +131,7 @@ const phases = {
backboneIntakeEnabled: false,
env: 'prod',
elasticsearchURL: 'http://es01:9200',
elasticsearchTaxonomyIndex: 'taxonomy_2.0.0',
tz: config.timezone.api,
sso: config.sso.prod,
replicas: 3,
Expand Down
1 change: 1 addition & 0 deletions api/.pipeline/lib/api.deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const apiDeploy = async (settings) => {
BACKBONE_INTAKE_ENABLED: phases[phase].backboneIntakeEnabled,
NODE_ENV: phases[phase].env || 'dev',
ELASTICSEARCH_URL: phases[phase].elasticsearchURL,
ELASTICSEARCH_TAXONOMY_INDEX: phases[phase].elasticsearchTaxonomyIndex,
TZ: phases[phase].tz,
KEYCLOAK_ADMIN_USERNAME: 'sims-svc',
KEYCLOAK_SECRET: 'keycloak-admin-password',
Expand Down
5 changes: 5 additions & 0 deletions api/openshift/api.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ parameters:
description: Platform Elasticsearch URL
required: true
value: 'https://elasticsearch-af2668-dev.apps.silver.devops.gov.bc.ca'
- name: ELASTICSEARCH_TAXONOMY_INDEX
description: Platform Elasticsearch Taxonomy Index
required: true
- name: TZ
description: Application timezone
required: false
Expand Down Expand Up @@ -215,6 +218,8 @@ objects:
value: ${NODE_ENV}
- name: ELASTICSEARCH_URL
value: ${ELASTICSEARCH_URL}
- name: ELASTICSEARCH_TAXONOMY_INDEX
value: ${ELASTICSEARCH_TAXONOMY_INDEX}
- name: TZ
value: ${TZ}
- name: VERSION
Expand Down
Loading