Skip to content

Commit

Permalink
Docker build images
Browse files Browse the repository at this point in the history
  • Loading branch information
rshourou committed Oct 7, 2024
1 parent bd627a9 commit 0339e4b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 34 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/dev-build-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
- name: "Docker Build"
run: |
docker build -t pidp-frontend:develop .
docker tag pidp-frontend:develop image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-frontend:develop
docker build -t image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-frontend:develop .
# Uses the builder service account token
- name: "Docker Login to Silver OCP"
Expand All @@ -52,6 +51,7 @@ jobs:
- name: "Push image"
run: |
docker push image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-frontend:develop
build-frontend-gold:
name: Frontend Build - Gold
runs-on: ubuntu-latest
Expand All @@ -62,9 +62,22 @@ jobs:
- name: "Checkout Code"
uses: actions/checkout@master

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: YARN Install
run: |
yarn install
- name: YARN Build
run: |
yarn build
- name: "Docker Build GOLD"
run: |
docker tag pidp-frontend:develop image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-frontend:develop
docker build -t image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-frontend:develop .
# Uses the Artifactory service account's username and password
- name: "Docker Login to GOLD OCP"
Expand All @@ -80,7 +93,7 @@ jobs:
- name: "Docker Build GOLDDR"
run: |
docker tag image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-frontend:develop image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-frontend:develop .
docker tag image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-frontend:develop image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-frontend:develop
# Uses the Artifactory service account's username and password
- name: "Docker Login to GOLDDR OCP"
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/dev-build-plr-intake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:

- name: "Docker Build"
run: |
docker build -t pidp-plr-intake:develop .
docker tag pidp-plr-intake:develop image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-plr-intake:develop
docker build -t image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-plr-intake:develop .
# Uses the builder service account token
- name: "Docker Login to Silver OCP"
Expand All @@ -51,25 +50,25 @@ jobs:
- name: "Checkout Code"
uses: actions/checkout@master

- name: "Docker Build Gold"
run: |
docker build -t image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop .
# Uses the builder service account token
- name: "Docker Login to GOLD OCP"
uses: docker/login-action@master
with:
registry: image-registry.apps.gold.devops.gov.bc.ca
username: builder
password: ${{ secrets.GOLD_TOOLS_BUILDER_TOKEN }}

- name: "Push image"
run: |
docker tag pidp-plr-intake:develop image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop
docker push image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop
- name: "Docker Build GOLDDR image"
- name: "Docker Build Golddr"
run: |
docker tag image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop
# Uses the builder service account token
- name: "Docker Login to GOLDDR OCP"
uses: docker/login-action@master
with:
Expand All @@ -79,5 +78,4 @@ jobs:

- name: "Push image"
run: |
docker tag pidp-plr-intake:develop image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop
docker push image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-plr-intake:develop
19 changes: 9 additions & 10 deletions .github/workflows/dev-build-webapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
- name: "Checkout Code"
uses: actions/checkout@master

- name: "Docker Build GOLD image"
run: |
docker build -t image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop .
# Uses the builder service account token
- name: "Docker Login to GOLD OCP"
uses: docker/login-action@master
Expand All @@ -57,26 +61,21 @@ jobs:
username: builder
password: ${{ secrets.GOLD_TOOLS_BUILDER_TOKEN }}

- name: "Docker Build GOLD image"
run: |
docker tag pidp-webapi:develop image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop
- name: "Push Docker image to GOLD OCP"
run: |
docker push image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop
# Uses the builder service account token
- name: "Docker Build GOLDDR image"
run: |
docker tag image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop
- name: "Docker Login to GOLDDR OCP"
uses: docker/login-action@master
with:
registry: image-registry.apps.golddr.devops.gov.bc.ca
username: builder
password: ${{ secrets.GOLDDR_TOOLS_BUILDER_TOKEN }}

- name: "Docker Build GOLDDR image"
run: |
docker tag pidp-webapi:develop image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop

- name: "Push image"
run: |
docker push image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-webapi:develop
12 changes: 2 additions & 10 deletions .github/workflows/pr-build Gold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
- name: "Checkout Code"
uses: actions/checkout@master

- name: "Docker Build"
- name: "Docker Build Gold"
run: |
docker build -t image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:pr-${{ needs.get-pr-number.outputs.pr_number }} .
Expand All @@ -212,16 +212,8 @@ jobs:
- name: "Push image"
run: |
docker push image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:pr-${{ needs.get-pr-number.outputs.pr_number }}
build-and-push-webapi-Golddr:
needs: [get-pr-number, build-and-push-webapi]
if: ${{ !(contains(needs.*.result, 'failure')) && needs.get-pr-number.outputs.pr_number != '' }}
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@master
- name: "Docker Build"
- name: "Docker Build Golddr"
run: |
docker tag image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/pidp-webapi:pr-${{ needs.get-pr-number.outputs.pr_number }} image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/pidp-webapi:pr-${{ needs.get-pr-number.outputs.pr_number }}
Expand Down

0 comments on commit 0339e4b

Please sign in to comment.