Skip to content

Commit

Permalink
Build feeder in test same way as portal
Browse files Browse the repository at this point in the history
  • Loading branch information
ikethecoder committed Jan 11, 2023
1 parent cb7d69b commit 3b46fd2
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/ci-build-feeders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Data-Feeder

on:
push:
branches: [dev, main, feature/*]
branches: [feature/*, dev, test]

env:
REGISTRY: ghcr.io
Expand All @@ -26,6 +26,9 @@ jobs:
echo '::set-output name=APP_REVISION::${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.revision'] }}'
id: set-deploy-id

- name: Get deploy ID
run: echo "The DEPLOY_ID is ${{ steps.set-deploy-id.outputs.DEPLOY_ID }}"

- uses: actions/checkout@v2

- name: Login to DockerHub
Expand Down Expand Up @@ -80,14 +83,13 @@ jobs:
namespace: ${{ env.OPENSHIFT_NAMESPACE }}

- name: 'Get Helm'
if: github.ref != 'refs/heads/dev'
run: |
curl -L -O https://get.helm.sh/helm-v3.4.2-linux-amd64.tar.gz
tar -xf helm-v3.4.2-linux-amd64.tar.gz
- name: Get deploy ID
run: echo "The DEPLOY_ID is ${{ steps.set-deploy-id.outputs.DEPLOY_ID }}"

- name: 'Deploy Feeder'
if: github.ref != 'refs/heads/dev'
run: |
export PATH=$PATH:`pwd`/linux-amd64
Expand Down Expand Up @@ -140,3 +142,19 @@ jobs:
helm repo add bcgov http://bcgov.github.io/helm-charts
helm upgrade --install proto-asp-${{ steps.set-deploy-id.outputs.DEPLOY_ID }}-feeder -f values.yaml --history-max 3 bcgov/generic-api
- name: Authenticate to Gold and set context
if: github.ref == 'refs/heads/test'
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_GOLD_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_GOLD_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ secrets.OPENSHIFT_GOLD_TEST_NAMESPACE }}

- name: 'Restart Portal Feeder in Gold Test Namespace'
if: github.ref == 'refs/heads/test'
run: |
oc rollout restart deployment/bcgov-aps-portal-feeder-generic-api -n ${{ secrets.OPENSHIFT_GOLD_TEST_NAMESPACE }}

0 comments on commit 3b46fd2

Please sign in to comment.