Skip to content

Commit ca14b49

Browse files
EPortmanshaangill025eve-giteve-gitbolyachevets
authored
Test GCP build on feature branch (#1681)
* 24511 solr documentation (#1628) Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com> * 24849 search endpoint directly queries names db (#1629) * 24849 change request search back to being a search (#1630) * 24849 search works with name as well (#1631) * 24774 Bad Name Notifier (#1633) * create the job * create the job * revert invalid changes * update codkerfile * update according to sonarqube check * update * update dockerfile * update dockerfile * fix sonar errors * bug fix --------- Co-authored-by: eve-git <root@PF524S4L.idir.BCGOV> Co-authored-by: bolyachevets <andriy.bolyachevets@gov.bc.ca> * add logging (#1636) * 24774 Create bad-name-notifier workflow (#1637) * Create bad-name-notifier.yml * Rename bad-name-notifier.yml to bad-name-notifier-cd.yml * Create bad-name-notifier-CI.yml (#1638) * 24849 firm nrs added to names core only (#1632) * feat: firm nrs added to names core only * revert: changes to /search endpoint * 24225 update emails for new ia with magic link (#1634) (#1639) * 24225 update emails for new ia with magic link * fix lint issue * update env, template * fix bug * update the email and output templates * udpate comment * update small template * 24223 update get_instruction_group for CHG and CNV Co-authored-by: Kevin Zhang <54437031+kzdev420@users.noreply.github.com> * cd: update cd name (#1640) * Change cd name (#1641) * cd: update cd name * update clouddeploy name * cd: update clouddeploy (#1642) * fix service account names (#1643) * 24225 debug emaler (#1644) * 24225_update_magic_link_with_debug (#1645) * Update emailer-cd-gcp.yml * 24225_update_version_namex_api (#1646) * 24225_udpate_instruction_group_method (#1647) * 24225 update env variables (#1648) * 24225_update_debug_code (#1649) * 25012_update_email_outputs_debug (#1652) * create bad-designation-notifier (#1651) * create bad-designation-notifier * update config.py according to SonarQube duplication error * update config.py according to SonarQube duplication error * update according to SonarQube duplication error * update according to SonarQube duplication error * update according to sonarQube errors * 25012_emailer_api_debug (#1653) * Create sftp-nuans-report-ci.yml (#1616) * add a linefeed at the end of the files (#1655) * Create sftp-nuans-report-cd.yml (#1615) * update flask-jwt-oidc package (#1656) * Update flask jwt OIDC deps (#1657) * revert updates to api lock dependencies except jwt-oidc * remove broken flask-jwt-oidc package from lock file * emailer uses latest version of namex api (#1658) * 25167 add feature flags service enable won emails (#1659) * 25167 add_feature_flags_service_enable_won_emails * fix line issue * fix the env key * use the update namex api in emailer * Update Makefile - commented out update-env as per P.W. * Update Makefile - comment out update-env as per P.W. * Update Makefile - * Update Makefile - commented out update-env as per P.W. * Update Makefile - undo -> commented out update-env as per P.W. * Update Makefile - commented out update-env as per P.W. * Update Makefile - commented out update-env as per P.W. * Fix emailer issue (#1672) * fix: flags use env from config * chore: emailer uses latest version of namex * fix: allow users modify cancel from legacy side (#1673) * 25167 feature flgas enable won emails (#1674) * 25167_feature_flgas_enable_won_emails * use latest api with reference * 25256_update_email_content (#1675) * 25270_add_env_values (#1676) * Update emailer-cd-gcp.yml Removed API build when emailer changes. * 24739 Affiliating a new NR to specified account id (#1677) * affiliate new nr * update version * 25356 update_outputs_CHG_CNV_NR (#1679) * 25356_update_outputs_CHG_CNV_NR * update emailer poetry to use the latest api * feat: use db in gcp * chore: update version of namex used * fix: permission issue * feat: nr-day-job uses gcp db * feat: namex pay uses gcp db * feat: use namex db in gcp * chore: remove auto-analyze service --------- Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com> Co-authored-by: Shaanjot Gill <shaangill025@users.noreply.github.com> Co-authored-by: eve-git <54647458+eve-git@users.noreply.github.com> Co-authored-by: eve-git <root@PF524S4L.idir.BCGOV> Co-authored-by: bolyachevets <andriy.bolyachevets@gov.bc.ca> Co-authored-by: Omid Zamani <omid.x.zamani@gov.bc.ca> Co-authored-by: Kevin Zhang <54437031+kzdev420@users.noreply.github.com> Co-authored-by: rarmitag <35737789+rarmitag@users.noreply.github.com>
1 parent 663a8dc commit ca14b49

112 files changed

Lines changed: 5363 additions & 1714 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto-analyze-cd.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/auto-analyze-ci.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Bad Name Notifier CI
2+
3+
on:
4+
pull_request:
5+
types: [assigned, synchronize]
6+
paths:
7+
- "jobs/bad-name-notifier/**"
8+
workflow_dispatch:
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
working-directory: ./jobs/bad-name-notifier
14+
15+
jobs:
16+
setup-job:
17+
runs-on: ubuntu-20.04
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- run: "true"
22+
23+
linting:
24+
needs: setup-job
25+
runs-on: ubuntu-20.04
26+
27+
strategy:
28+
matrix:
29+
python-version: ["3.12"]
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v1
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- name: Install dependencies
38+
run: |
39+
make setup
40+
- name: Lint with flake8
41+
id: flake8
42+
run: |
43+
poetry run flake8 src/app.py
44+
45+
# Uncomment and customize this block if testing is required
46+
# testing:
47+
# needs: setup-job
48+
# runs-on: ubuntu-20.04
49+
# steps:
50+
# - uses: actions/checkout@v4
51+
# - name: Set up Python ${{ matrix.python-version }}
52+
# uses: actions/setup-python@v1
53+
# with:
54+
# python-version: ${{ matrix.python-version }}
55+
# - name: Install dependencies
56+
# run: |
57+
# make setup
58+
# - name: Test with pytest
59+
# id: test
60+
# run: |
61+
# make test
62+
63+
build-check:
64+
needs: setup-job
65+
runs-on: ubuntu-20.04
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
- name: Build to check strictness
70+
id: build
71+
run: |
72+
make build-nc
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Bad Name Notifier CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "jobs/bad-name-notifier/**"
9+
workflow_dispatch:
10+
inputs:
11+
environment:
12+
description: "Environment (dev/test/prod)"
13+
required: true
14+
default: "dev"
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
working-directory: ./jobs/bad-name-notifier
20+
21+
env:
22+
APP_NAME: "bad-name-notifier"
23+
TAG_NAME: "dev"
24+
25+
jobs:
26+
bad-name-notifier-cd-by-push:
27+
runs-on: ubuntu-20.04
28+
29+
if: github.event_name == 'push' && github.repository == 'bcgov/namex'
30+
environment:
31+
name: "dev"
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
36+
- name: Login Openshift
37+
shell: bash
38+
run: |
39+
oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}}
40+
41+
- name: CD Flow
42+
shell: bash
43+
env:
44+
OPS_REPOSITORY: ${{ secrets.OPS_REPOSITORY }}
45+
OPENSHIFT_DOCKER_REGISTRY: ${{ secrets.OPENSHIFT4_DOCKER_REGISTRY }}
46+
OPENSHIFT_SA_NAME: ${{ secrets.OPENSHIFT4_SA_NAME }}
47+
OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT4_SA_TOKEN }}
48+
OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT4_REPOSITORY }}
49+
TAG_NAME: ${{ env.TAG_NAME }}
50+
run: |
51+
make cd
52+
53+
bad-name-notifier-cd-by-dispatch:
54+
runs-on: ubuntu-20.04
55+
56+
if: github.event_name == 'workflow_dispatch' && github.repository == 'bcgov/namex'
57+
environment:
58+
name: "${{ github.event.inputs.environment }}"
59+
60+
steps:
61+
- uses: actions/checkout@v3
62+
63+
- name: Set env by input
64+
run: |
65+
echo "TAG_NAME=${{ github.event.inputs.environment }}" >> $GITHUB_ENV
66+
67+
- name: Login Openshift
68+
shell: bash
69+
run: |
70+
oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}}
71+
72+
- name: CD Flow
73+
shell: bash
74+
env:
75+
OPS_REPOSITORY: ${{ secrets.OPS_REPOSITORY }}
76+
OPENSHIFT_DOCKER_REGISTRY: ${{ secrets.OPENSHIFT4_DOCKER_REGISTRY }}
77+
OPENSHIFT_SA_NAME: ${{ secrets.OPENSHIFT4_SA_NAME }}
78+
OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT4_SA_TOKEN }}
79+
OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT4_REPOSITORY }}
80+
TAG_NAME: ${{ env.TAG_NAME }}
81+
run: |
82+
make cd

.github/workflows/emailer-cd-gcp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id-token: write
2525
contents: write
2626

27-
uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main
27+
uses: bcgov/bcregistry-sre/.github/workflows/backend-cd.yaml@main
2828
with:
2929
target: ${{ github.event.inputs.target }} # Corrected the input reference
3030
app_name: "namex-emailer"
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: SFTP NUANS Report Job CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "jobs/sftp-nuans-report/**"
9+
workflow_dispatch:
10+
inputs:
11+
environment:
12+
description: "Environment (dev/test/prod)"
13+
required: true
14+
default: "dev"
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
working-directory: ./jobs/sftp-nuans-report
20+
21+
env:
22+
APP_NAME: "sftp-nuans-report"
23+
TAG_NAME: "dev"
24+
25+
jobs:
26+
sftp-nuans-report-cd-by-push:
27+
runs-on: ubuntu-20.04
28+
29+
if: github.event_name == 'push' && github.repository == 'bcgov/namex'
30+
environment:
31+
name: "dev"
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
36+
- name: Login Openshift
37+
shell: bash
38+
run: |
39+
oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}}
40+
41+
- name: CD Flow
42+
shell: bash
43+
env:
44+
OPS_REPOSITORY: ${{ secrets.OPS_REPOSITORY }}
45+
OPENSHIFT_DOCKER_REGISTRY: ${{ secrets.OPENSHIFT4_DOCKER_REGISTRY }}
46+
OPENSHIFT_SA_NAME: ${{ secrets.OPENSHIFT4_SA_NAME }}
47+
OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT4_SA_TOKEN }}
48+
OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT4_REPOSITORY }}
49+
TAG_NAME: ${{ env.TAG_NAME }}
50+
run: |
51+
make cd
52+
53+
- name: Rocket.Chat Notification
54+
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master
55+
if: failure()
56+
with:
57+
type: ${{ job.status }}
58+
job_name: "*SFTP NUANS Report Job Built and Deployed to ${{env.TAG_NAME}}*"
59+
channel: "#registries-bot"
60+
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
61+
commit: true
62+
token: ${{ secrets.GITHUB_TOKEN }}
63+
64+
sftp-nuans-report-cd-by-dispatch:
65+
runs-on: ubuntu-20.04
66+
67+
if: github.event_name == 'workflow_dispatch' && github.repository == 'bcgov/namex'
68+
environment:
69+
name: "${{ github.event.inputs.environment }}"
70+
71+
steps:
72+
- uses: actions/checkout@v3
73+
- name: Set env by input
74+
run: |
75+
echo "TAG_NAME=${{ github.event.inputs.environment }}" >> $GITHUB_ENV
76+
77+
- name: Login Openshift
78+
shell: bash
79+
run: |
80+
oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}}
81+
82+
- name: CD Flow
83+
shell: bash
84+
env:
85+
OPS_REPOSITORY: ${{ secrets.OPS_REPOSITORY }}
86+
OPENSHIFT_DOCKER_REGISTRY: ${{ secrets.OPENSHIFT4_DOCKER_REGISTRY }}
87+
OPENSHIFT_SA_NAME: ${{ secrets.OPENSHIFT4_SA_NAME }}
88+
OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT4_SA_TOKEN }}
89+
OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT4_REPOSITORY }}
90+
TAG_NAME: ${{ env.TAG_NAME }}
91+
run: |
92+
make cd
93+
94+
- name: Rocket.Chat Notification
95+
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master
96+
if: failure()
97+
with:
98+
type: ${{ job.status }}
99+
job_name: "*SFTP NUANS Report Job Built and Deployed to ${{env.TAG_NAME}}*"
100+
channel: "#registries-bot"
101+
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
102+
commit: true
103+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)