Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into uat-release-is95
Browse files Browse the repository at this point in the history
  • Loading branch information
asanchezr committed Dec 19, 2024
2 parents 063fa1e + e6990dc commit 1e70990
Show file tree
Hide file tree
Showing 460 changed files with 89,296 additions and 2,353 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/api-dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
# JOB to run change detection
check-changes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# Set job outputs to values from filter step
outputs:
backend: ${{ steps.filter.outputs.backend }}
Expand All @@ -24,11 +24,19 @@ jobs:
build-backend:
needs: check-changes
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ needs.check-changes.outputs.backend == 'true' }}
strategy:
matrix:
services: [{directory: ./source/backend/api, solution: 'Pims.sln'}, {directory: ./source/backend/proxy, solution: 'Proxy.sln'}]
services:
[
{ directory: ./source/backend/api, solution: "Pims.sln" },
{ directory: ./source/backend/proxy, solution: "Proxy.sln" },
{
directory: ./source/backend/scheduler,
solution: "Scheduler.sln",
},
]
env:
working-directory: ${{ matrix.services.directory }}
solution-name: ${{ matrix.services.solution }}
Expand Down Expand Up @@ -147,7 +155,7 @@ jobs:
sonarHostname: ${{secrets.SONAR_URL}}
post-build:
needs: build-backend
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
working-directory: ./source/backend
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
87 changes: 42 additions & 45 deletions .github/workflows/app-logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ on:
pull_request:
branches: [master, test, dev]


jobs:

build:

name: build-logging
if: github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/test' || github.event.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
SLEEP_TIME: 60
STORAGE_TYPE: Amazon_S3
Expand All @@ -32,44 +29,44 @@ jobs:
working-directory: ./openshift/4.0/templates/Logging

steps:
- uses: actions/checkout@v4
- name: Set ENV variable
run: |
if [[ ${{github.event.ref}} == 'refs/heads/test' ]]; then
echo "FRONTEND_APP_NAME=pims-app-test" >> $GITHUB_ENV
echo "API_NAME=pims-api-test" >> $GITHUB_ENV
elif [[ ${{github.event.ref}} == 'refs/heads/master' ]]; then
echo "FRONTEND_APP_NAME=pims-app-uat" >> $GITHUB_ENV
echo "API_NAME=pims-api-uat" >> $GITHUB_ENV
echo "PROJECT_NAMESPACE=3cd915-test" >> $GITHUB_ENV
else
echo "FRONTEND_APP_NAME=pims-app" >> $GITHUB_ENV
echo "API_NAME=pims-api" >> $GITHUB_ENV
fi
- name: Build the pims-logging docker-compose stack
run: docker-compose -f docker-compose.yml up -d
working-directory: ${{env.working-directory}}
- name: Sleep for 180 seconds
uses: jakejarvis/wait-action@master
with:
time: '180s'
- name: Check Extracted Logs
run: |
docker cp pims-logging:/logging/. .
exitcode=$(docker inspect pims-logging --format='{{.State.ExitCode}}')
if [[ "$(ls -A pims* 2>/dev/null | wc -l)" != "0" ]]; then
ls -A pims* && rm -f pims*
elif [[ $exitcode == 0 ]]; then
echo "Info: No log captured between sleep time"
else
echo "There's an error capturing pims logs" && exit 1
fi
- name: Check running containers
run: docker ps -a
- name: Check pims-logging logs
if: always()
run: docker logs pims-logging
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
working-directory: ${{env.working-directory}}
- uses: actions/checkout@v4
- name: Set ENV variable
run: |
if [[ ${{github.event.ref}} == 'refs/heads/test' ]]; then
echo "FRONTEND_APP_NAME=pims-app-test" >> $GITHUB_ENV
echo "API_NAME=pims-api-test" >> $GITHUB_ENV
elif [[ ${{github.event.ref}} == 'refs/heads/master' ]]; then
echo "FRONTEND_APP_NAME=pims-app-uat" >> $GITHUB_ENV
echo "API_NAME=pims-api-uat" >> $GITHUB_ENV
echo "PROJECT_NAMESPACE=3cd915-test" >> $GITHUB_ENV
else
echo "FRONTEND_APP_NAME=pims-app" >> $GITHUB_ENV
echo "API_NAME=pims-api" >> $GITHUB_ENV
fi
- name: Build the pims-logging docker-compose stack
run: docker-compose -f docker-compose.yml up -d
working-directory: ${{env.working-directory}}
- name: Sleep for 180 seconds
uses: jakejarvis/wait-action@master
with:
time: "180s"
- name: Check Extracted Logs
run: |
docker cp pims-logging:/logging/. .
exitcode=$(docker inspect pims-logging --format='{{.State.ExitCode}}')
if [[ "$(ls -A pims* 2>/dev/null | wc -l)" != "0" ]]; then
ls -A pims* && rm -f pims*
elif [[ $exitcode == 0 ]]; then
echo "Info: No log captured between sleep time"
else
echo "There's an error capturing pims logs" && exit 1
fi
- name: Check running containers
run: docker ps -a
- name: Check pims-logging logs
if: always()
run: docker logs pims-logging
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
working-directory: ${{env.working-directory}}
4 changes: 2 additions & 2 deletions .github/workflows/app-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
# JOB to run change detection
check-changes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# Set job outputs to values from filter step
outputs:
frontend: ${{ steps.filter.outputs.frontend }}
Expand All @@ -25,7 +25,7 @@ jobs:
build-frontend:
needs: check-changes
if: ${{ needs.check-changes.outputs.frontend == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
CI: true
working-directory: ./source/frontend
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/ci-cd-pims-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ env:
DEPLOYMENT_NAMESPACE: "3cd915-dev"

on:
pull_request_target:
branches: [dev]
types: [closed]
workflow_dispatch:

jobs:
ci-cd-start-notification:
if: github.event.pull_request.merged == true
name: CI-CD Start Notification to Teams Channel
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Start notification to Teams Channel
uses: dragos-cojocari/[email protected]
Expand All @@ -49,7 +46,7 @@ jobs:
build-frontend:
name: Build frontend
needs: ci-cd-start-notification
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -68,7 +65,7 @@ jobs:
build-api:
name: Build api
needs: ci-cd-start-notification
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -83,11 +80,12 @@ jobs:
run: |
./openshift/4.0/player.sh build api -apply
./openshift/4.0/player.sh build proxy -apply
./openshift/4.0/player.sh build scheduler -apply
deploy:
name: Deploy to OpenShift
needs: [build-frontend, build-api]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand Down Expand Up @@ -116,6 +114,12 @@ jobs:
oc tag pims-proxy:latest-$DESTINATION pims-proxy:$DESTINATION
oc -n $DEPLOYMENT_NAMESPACE rollout restart deployment/pims-proxy-$DESTINATION
oc -n $DEPLOYMENT_NAMESPACE rollout status --timeout=600s deployment/pims-proxy-$DESTINATION
- name: Deploy scheduler microservice
shell: bash
run: |
oc tag pims-scheduler:latest-$DESTINATION pims-scheduler:$DESTINATION
oc -n $DEPLOYMENT_NAMESPACE rollout restart deployment/pims-scheduler-$DESTINATION
oc -n $DEPLOYMENT_NAMESPACE rollout status --timeout=600s deployment/pims-scheduler-$DESTINATION
- name: Deploy mayan
shell: bash
run: |
Expand All @@ -128,7 +132,7 @@ jobs:
database-upgrade:
name: Upgrade database
needs: [deploy]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -151,7 +155,7 @@ jobs:
mayan-sync:
name: sync mayan
needs: database-upgrade
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -173,7 +177,7 @@ jobs:
keycloak-sync:
name: sync keycloak
needs: database-upgrade
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -191,9 +195,8 @@ jobs:
ci-cd-end-notification:
name: CI-CD End Notification to Teams Channel
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: keycloak-sync
if: ${{ always() && github.event.pull_request.merged == true }}
steps:
- name: check workflow status
uses: martialonline/workflow-status@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov-comment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
upload:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/credentials-comment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
# this action will leave a comment in response to credential scans performed on pull requests
on-completed:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: github.event.workflow_run.event == 'pull_request'
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/credentials-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
credentials-scan:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/db-schma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
build:
name: db-schema
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
maintenance-page:
name: Hide the maintenance page
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -31,7 +31,7 @@ jobs:
ci-cd-end-notification:
name: CI-CD End Notification to Teams Channel
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: maintenance-page
steps:
- name: check workflow status
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-prod-start-argo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
jobs:
ci-cd-start-notification:
name: CI-CD Start Notification to Teams Channel
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Start notification to Teams Channel
uses: dragos-cojocari/[email protected]
Expand All @@ -48,7 +48,7 @@ jobs:

deploy:
name: Deploy frontend and api to OpenShift
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: ci-cd-start-notification
steps:
- name: Checkout Source Code
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
database-upgrade:
name: Upgrade database
needs: [deploy]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -117,7 +117,7 @@ jobs:
mayan-sync:
name: sync mayan
needs: database-upgrade
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand All @@ -139,7 +139,7 @@ jobs:
keycloak-sync:
name: sync keycloak
needs: database-upgrade
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 1e70990

Please sign in to comment.