Skip to content

Commit 4cebb7e

Browse files
authored
Merge branch 'master' into dependabot/maven/src/backend/libs/efiling-bom/org.springframework-spring-web-6.0.23
2 parents e0bc44a + d06a721 commit 4cebb7e

10 files changed

+575
-229
lines changed

.github/workflows/dev-efiling-admin-build-4.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build Efiling Admin Docker Image and Push to Openshift Image Registry
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * */3 *"
6+
push:
7+
branches: [master]
8+
paths:
9+
- "src/frontend/efiling-demo/**"
10+
- ".github/workflows/dev-efiling-admin-build.yaml"
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Login to Artifactory
20+
uses: docker/login-action@v1
21+
with:
22+
registry: artifacts.developer.gov.bc.ca
23+
username: ${{ secrets.EFILING_ARTIFACTORY_USERNAME }}
24+
password: ${{ secrets.EFILING_ARTIFACTORY_PASSWORD }}
25+
26+
- name: Build Image
27+
run: |
28+
docker compose build efiling-demo
29+
docker tag jag-file-submission-efiling-demo artifacts.developer.gov.bc.ca/efc7-efiling-admin/efiling-admin:dev
30+
31+
- name: Docker Push to Artifactory
32+
run: |
33+
docker push artifacts.developer.gov.bc.ca/efc7-efiling-admin/efiling-admin:dev
34+
35+
# Get SHORT_SHA for the version
36+
- name: Get short SHA
37+
id: short_sha
38+
run: |
39+
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)"
40+
echo "Short SHA: $SHORT_SHA"
41+
42+
- name: Checkout ArgoCD Repo
43+
id: gitops
44+
uses: actions/checkout@v4
45+
with:
46+
repository: bcgov-c/tenant-gitops-fc726a
47+
ref: develop
48+
token: ${{ secrets.ARGO_PAT }} # `ARGO_PAT` is a secret that contains your PAT
49+
path: gitops
50+
51+
- name: Update Helm Values and Commit
52+
id: helm
53+
if: steps.gitops.outcome == 'success' # Only run if the previous step (publish) was successful
54+
run: |
55+
# Clone the GitOps deployment configuration repository
56+
# Navigate to the directory containing your Helm values file for the environment develop -> DEV, test -> test and
57+
cd gitops/charts
58+
59+
# Update the Helm values file with the new image tag and version
60+
DATETIME=$(date +'%Y-%m-%d %H:%M:%S') # Get current date and time
61+
62+
sed -i "s/admintag: .*/admintag: dev # Image Updated on $DATETIME/" ../deploy/dev_values.yaml
63+
sed -i "s/adminVersion: .*/adminVersion: ${{ steps.short_sha.outputs.SHORT_SHA }} # Version Updated on $DATETIME/" ../deploy/dev_values.yaml
64+
65+
# Commit and push the changes
66+
git config --global user.email "[email protected]"
67+
git config --global user.name "GitHub Actions"
68+
69+
git add .
70+
71+
git add ../deploy/dev_values.yaml
72+
73+
# Repackage Helm Chart
74+
75+
cd efiling-gitops
76+
77+
helm dependency build
78+
79+
cd charts
80+
81+
git add .
82+
83+
git commit -m "Update Dev Admin image tag"
84+
git push origin develop # Update the branch name as needed

.github/workflows/dev-efiling-api-build-4.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build Efiling API Image and Push to Openshift 4 Registry
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * */3 *"
6+
push:
7+
branches: [master]
8+
paths:
9+
- "src/backend/**"
10+
- ".github/workflows/dev-efiling-api-build.yaml"
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Login to Artifactory
21+
uses: docker/login-action@v1
22+
with:
23+
registry: artifacts.developer.gov.bc.ca
24+
username: ${{ secrets.EFILING_ARTIFACTORY_USERNAME }}
25+
password: ${{ secrets.EFILING_ARTIFACTORY_PASSWORD }}
26+
27+
- name: Build Image
28+
env:
29+
MVN_PROFILE: efiling-api,splunk
30+
run: |
31+
docker compose build efiling-api
32+
docker tag jag-file-submission-efiling-api artifacts.developer.gov.bc.ca/efc7-efiling-api/efiling-api:dev
33+
34+
- name: Docker Push to Artifactory
35+
run: |
36+
docker push artifacts.developer.gov.bc.ca/efc7-efiling-api/efiling-api:dev
37+
38+
# Get SHORT_SHA for the version
39+
- name: Get short SHA
40+
id: short_sha
41+
run: |
42+
echo "::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)"
43+
echo "Short SHA: $SHORT_SHA"
44+
45+
- name: Checkout ArgoCD Repo
46+
id: gitops
47+
uses: actions/checkout@v4
48+
with:
49+
repository: bcgov-c/tenant-gitops-fc726a
50+
ref: develop
51+
token: ${{ secrets.ARGO_PAT }} # `ARGO_PAT` is a secret that contains your PAT
52+
path: gitops
53+
54+
- name: Update Helm Values and Commit
55+
id: helm
56+
if: steps.gitops.outcome == 'success' # Only run if the previous step (publish) was successful
57+
run: |
58+
# Clone the GitOps deployment configuration repository
59+
# Navigate to the directory containing your Helm values file for the environment develop -> DEV, test -> test and
60+
cd gitops/charts
61+
62+
# Update the Helm values file with the new image tag and version
63+
DATETIME=$(date +'%Y-%m-%d %H:%M:%S') # Get current date and time
64+
65+
sed -i "s/apitag: .*/apitag: dev # Image Updated on $DATETIME/" ../deploy/dev_values.yaml
66+
sed -i "s/apiVersion: .*/apiVersion: ${{ steps.short_sha.outputs.SHORT_SHA }} # Version Updated on $DATETIME/" ../deploy/dev_values.yaml
67+
68+
# Commit and push the changes
69+
git config --global user.email "[email protected]"
70+
git config --global user.name "GitHub Actions"
71+
72+
git add .
73+
74+
git add ../deploy/dev_values.yaml
75+
76+
# Repackage Helm Chart
77+
78+
cd efiling-gitops
79+
80+
helm dependency build
81+
82+
cd charts
83+
84+
git add .
85+
86+
git commit -m "Update Dev API image tag"
87+
git push origin develop # Update the branch name as needed

.github/workflows/dev-efiling-api-dl-build-4.yaml

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

.github/workflows/dev-efiling-frontend-build-4.yaml

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

0 commit comments

Comments
 (0)