Skip to content

Commit

Permalink
delete midas probe workflow for silver
Browse files Browse the repository at this point in the history
  • Loading branch information
rshourou committed Oct 7, 2024
1 parent 0be744d commit 7d3298e
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 118 deletions.
94 changes: 0 additions & 94 deletions .github/workflows/build_midas_probe-gold.yaml

This file was deleted.

69 changes: 53 additions & 16 deletions .github/workflows/build_midas_probe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- 'develop'
paths: [midas-probe/openshift]
paths: [infra/midas-probe/openshift]
workflow_dispatch:
inputs:
environment:
Expand All @@ -15,43 +15,80 @@ on:
options:
- dev
- test
- prod

jobs:
build:
name: Build Midas Probe
build-midas-gold:
name: Build Midas Probe-GOLD
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build image with docker-compose
working-directory: midas-probe
working-directory: "./infra/midas-probe"
run: |
docker-compose build midas-probe
- name: Docker Login to ImageStream
uses: docker/login-action@v2
with:
registry: image-registry.apps.silver.devops.gov.bc.ca
registry: image-registry.apps.gold.devops.gov.bc.ca
username: builder
password: ${{ secrets.SILVER_TOOLS_BUILDER_TOKEN }}
password: ${{ secrets.GOLD_TOOLS_BUILDER_TOKEN }}

- name: Tag and Push Docker image
run: |
docker tag midas-probe image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/midas-probe:${{ github.event.inputs.Environment }}
docker push image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/midas-probe --all-tags
docker tag midas-probe image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/midas-probe:latest
docker push image-registry.apps.gold.devops.gov.bc.ca/f088b1-tools/midas-probe:latest
- name: OC Login to Silver OCP
- name: OC Login to Gold OCP
uses: redhat-actions/oc-login@v1.2
with:
openshift_server_url: ${{secrets.OPENSHIFT_CLUSTER_URL}}
openshift_token: ${{secrets.OPENSHIFT_PIPELINE_SERVICE_ACCOUNT_TOKEN}}
openshift_server_url: ${{secrets.GOLD_OPENSHIFT_CLUSTER_URL}}
openshift_token: ${{secrets.GOLD_PIPELINE_SERVICE_ACCOUNT_TOKEN}}

- name: helm deployment
working-directory: midas-probe/openshift/helm
working-directory: "./infra/midas-probe/openshift/helm"
run: |
oc project d8a8f9-${{ github.event.inputs.Environment }}
echo installing midas-common helm chart...
helm upgrade --install --values ./midas-common/values.yaml --set namespace=d8a8f9-${{ github.event.inputs.Environment }} --namespace d8a8f9-${{ github.event.inputs.Environment }} midas-common midas-common
oc project f088b1-${{ github.event.inputs.Environment }}
echo installing midas-probe helm chart...
helm upgrade --install --values ./midas-probe/values.yaml --set imageStreamTag=${{ github.event.inputs.Environment }} --namespace d8a8f9-${{ github.event.inputs.Environment }} midas-probe midas-probe
helm upgrade --install --values ./midas-probe/values.yaml --set environment=${{ github.event.inputs.Environment }} midas-probe midas-probe
build-midas-goldDR:
name: Build Midas Probe-GOLD
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build image with docker-compose
working-directory: "./infra/midas-probe"
run: |
docker-compose build midas-probe
- name: Docker Login to ImageStream
uses: docker/login-action@v2
with:
registry: image-registry.apps.golddr.devops.gov.bc.ca
username: builder
password: ${{ secrets.GOLDDR_TOOLS_BUILDER_TOKEN }}

- name: Tag and Push Docker image
run: |
docker tag midas-probe image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/midas-probe:latest
docker push image-registry.apps.golddr.devops.gov.bc.ca/f088b1-tools/midas-probe --all-tags
- name: OC Login to Gold OCP
uses: redhat-actions/oc-login@v1.2
with:
openshift_server_url: ${{secrets.GOLDDR_OPENSHIFT_CLUSTER_URL}}
openshift_token: ${{secrets.GOLDDR_PIPELINE_SERVICE_ACCOUNT_TOKEN}}

- name: helm deployment
working-directory: "./infra/midas-probe/openshift/helm"
run: |
oc project f088b1-${{ github.event.inputs.Environment }}
echo installing midas-probe helm chart...
helm upgrade --install --values ./midas-probe/values.yaml --set environment=${{ github.event.inputs.Environment }} --namespace f088b1-${{ github.event.inputs.Environment }} midas-probe midas-probe
6 changes: 3 additions & 3 deletions .github/workflows/main-build-plr-intake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:

jobs:
promote-image-to-prod-silver:
name: WebAPI Backend Promote to prod - Silver
name: Plr Intake Backend Promote to prod - Silver
runs-on: ubuntu-latest
steps:
- name: Install oc
Expand All @@ -38,13 +38,13 @@ jobs:
d8a8f9-tools/pidp-plr-intake:${{ env.ORIG_TAG }} \
d8a8f9-tools/pidp-plr-intake:${{ env.PROMOTE_TAG }}
promote-image-to-prod-gold:
name: WebAPI Backend Promote to prod - Gold
name: Plr Intake Backend Promote to prod - Gold
runs-on: ubuntu-latest
steps:
- name: Install oc
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
oc: "4.9"

- name: oc login - Gold
run: |
Expand Down
10 changes: 5 additions & 5 deletions infra/sysdig/sysdig-team.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: ops.gov.bc.ca/v1alpha1
kind: SysdigTeam
metadata:
name: d8a8f9-sysdigteam
namespace: d8a8f9-tools
name: f088b1-sysdigteam
namespace: f088b1-tools
spec:
team:
description: The Sysdig Team for the OpenShift Project Set d8a8f9 (PIDP)
description: The Sysdig Team for the OpenShift Project Set f088b1 (PIDP)
users:
- name: rshourou@sfu.ca
- name: roya.shourouni@gov.bc.ca
role: ROLE_TEAM_EDIT
- name: itchison@gmail.com
role: ROLE_TEAM_EDIT
- name: chris@bashbang.com
- name: james-hollinger@github
role: ROLE_TEAM_EDIT

0 comments on commit 7d3298e

Please sign in to comment.