remove use of ngTemplateOutlet #1895
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build All - PR | |
on: | |
workflow_dispatch: | |
push: | |
# paths: | |
# - "workspace/**" | |
# - "backend/services.plr-intake/**" | |
# - "backend/services.plr-intake.tests/**" | |
# - "backend/webapi/**" | |
# - "backend/webapi.tests/**" | |
branches-ignore: | |
- 'develop' | |
- 'test' | |
- 'main' | |
pull_request: | |
types: [opened] | |
branches-ignore: | |
- 'test' | |
- 'master' | |
permissions: read-all | |
# This will terminate builds that are previously, but continuing to run. Saves GHA hours. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
get-pr-number: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "./workspace" | |
outputs: | |
pr_number: ${{ steps.find-pr.outputs.pr }} | |
steps: | |
- name: "Checkout Code" | |
uses: actions/checkout@master | |
- name: find-pr | |
id: find-pr | |
uses: jwalton/gh-find-current-pr@v1 | |
with: | |
state: open | |
- name: job1 | |
id: job1 | |
run: echo "Your PR is ${PR}" | |
if: success() && steps.find-pr.outputs.number | |
env: | |
PR: ${{ steps.find-pr.outputs.pr }} | |
Yarn-Lint: | |
name: Frontend Yarn Lint | |
runs-on: ubuntu-latest | |
needs: get-pr-number | |
if: ${{ always() && !cancelled() && needs.get-pr-number.outputs.pr_number != '' }} | |
defaults: | |
run: | |
working-directory: "./workspace" | |
steps: | |
- 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 Lint | |
run: yarn lint:all | |
build-and-push-frontend: | |
name: Frontend Build & Push | |
runs-on: ubuntu-latest | |
needs: get-pr-number | |
if: ${{ always() && !cancelled() && needs.get-pr-number.outputs.pr_number != '' }} | |
defaults: | |
run: | |
working-directory: "./workspace" | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- 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: YARN Test | |
run: | | |
yarn test:ci | |
- name: "Docker Build" | |
run: | | |
docker build -t image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-frontend:pr-${{ needs.get-pr-number.outputs.pr_number }} . | |
# Uses the builder service account token | |
- name: "Docker Login to Silver OCP" | |
uses: docker/login-action@v2 | |
with: | |
registry: image-registry.apps.silver.devops.gov.bc.ca | |
username: builder | |
password: ${{ secrets.SILVER_TOOLS_BUILDER_TOKEN }} | |
- name: "Push image" | |
run: | | |
docker push image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-frontend:pr-${{ needs.get-pr-number.outputs.pr_number }} | |
unit-test-backend: | |
needs: get-pr-number | |
if: ${{ always() && !cancelled() && needs.get-pr-number.outputs.pr_number != '' }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "./backend" | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: "Checkout Code" | |
uses: actions/checkout@master | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Build backend | |
run: dotnet build --configuration Release | |
- name: Run Tests | |
run: dotnet test --configuration Release | |
build-and-push-plr-intake: | |
name: PLR Intake Backend Build & Push | |
needs: [get-pr-number, unit-test-backend] | |
if: ${{ !(contains(needs.*.result, 'failure')) && needs.get-pr-number.outputs.pr_number != '' }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "./backend/services.plr-intake" | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: "Checkout Code" | |
uses: actions/checkout@master | |
- name: "Docker Build" | |
run: | | |
docker build -t image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-plr-intake:pr-${{ needs.get-pr-number.outputs.pr_number }} . | |
# Uses the builder service account token | |
- name: "Docker Login to Silver OCP" | |
uses: docker/login-action@v2 | |
with: | |
registry: image-registry.apps.silver.devops.gov.bc.ca | |
username: builder | |
password: ${{ secrets.SILVER_TOOLS_BUILDER_TOKEN }} | |
- name: "Push image" | |
run: | | |
docker push image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-plr-intake:pr-${{ needs.get-pr-number.outputs.pr_number }} | |
build-and-push-webapi: | |
name: WebAPI Backend Build & Push | |
needs: [get-pr-number, unit-test-backend] | |
if: ${{ !(contains(needs.*.result, 'failure')) && needs.get-pr-number.outputs.pr_number != '' }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "./backend/webapi" | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: "Checkout Code" | |
uses: actions/checkout@master | |
- name: "Docker Build" | |
run: | | |
docker build -t image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-webapi:pr-${{ needs.get-pr-number.outputs.pr_number }} . | |
# Uses the builder service account token | |
- name: "Docker Login to Silver OCP" | |
uses: docker/login-action@v2 | |
with: | |
registry: image-registry.apps.silver.devops.gov.bc.ca | |
username: builder | |
password: ${{ secrets.SILVER_TOOLS_BUILDER_TOKEN }} | |
- name: "Push image" | |
run: | | |
docker push image-registry.apps.silver.devops.gov.bc.ca/d8a8f9-tools/pidp-webapi:pr-${{ needs.get-pr-number.outputs.pr_number }} | |
helm-deployment: | |
needs: [build-and-push-webapi, build-and-push-plr-intake, build-and-push-frontend] | |
runs-on: 'ubuntu-latest' | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@master | |
- name: Authenticate and set context | |
uses: redhat-actions/oc-login@v1.2 | |
with: | |
openshift_server_url: ${{secrets.OPENSHIFT_CLUSTER_URL}} | |
openshift_token: ${{secrets.OPENSHIFT_PIPELINE_SERVICE_ACCOUNT_TOKEN}} | |
- name: Get pr number from GH cli command (pushing to pr) | |
if: ${{ github.event.number == ''}} | |
run: echo "pr_number=$(gh pr view --json number -q .number || echo "")" >> "$GITHUB_ENV" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get pr number from github.event.number (opening a pr) | |
if: ${{ github.event.number != ''}} | |
run: echo "pr_number=${{ github.event.number }}" >> "$GITHUB_ENV" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Helm Deploy / install command | |
run: | | |
echo current installed helm releases | |
helm list --namespace d8a8f9-dev | |
echo installing helm chart... | |
helm upgrade --install --wait --values ./deploy/pr_values.yaml --namespace d8a8f9-dev pr-${{ env.pr_number }} charts/pidp --debug --set global.image.tag=pr-${{ env.pr_number }} |