diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 01081d50..4040cbac 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -20,7 +20,7 @@ jobs: - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 with: commands: | - mvn -B verify -Pall-tests checkstyle:checkstyle -Dcheckstyle.skip=false + mvn -B verify -P all-tests checkstyle:checkstyle -Dcheckstyle.skip=false dir: . java-cache: maven java-distribution: temurin diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 8b7997f9..c6ec7fa4 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -4,8 +4,6 @@ on: pull_request: env: - REGISTRY: ghcr.io - NAME: ${{ github.event.repository.name }} DOMAIN: apps.silver.devops.gov.bc.ca concurrency: @@ -67,8 +65,6 @@ jobs: pr-greeting: name: PR Greeting - env: - PREFIX: ${{ github.event.repository.name }}-${{ github.event.number }} runs-on: ubuntu-22.04 permissions: pull-requests: write @@ -82,12 +78,12 @@ jobs: Thanks for the PR! Any successful deployments (not always required) will be available below. - [API](https://${{ env.NAME }}-${{ github.event.number }}-backend.${{ env.DOMAIN }}/) available + [API](https://${{ github.event.repository.name }}-${{ github.event.number }}-backend.${{ env.DOMAIN }}/) available Once merged, code will be promoted and handed off to following workflow run. [Main Merge Workflow](https://github.com/${{ github.repository }}/actions/workflows/merge-main.yml) - build-backend: + build: name: Backend Image Build env: COMPONENT: backend @@ -110,26 +106,9 @@ jobs: tag_fallback: test token: ${{ secrets.GITHUB_TOKEN }} - tests-backend: - name: Backend Unit Tests - runs-on: ubuntu-22.04 - permissions: - checks: write - pull-requests: write - needs: [build-backend] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: "temurin" - java-version: "17" - cache: "maven" - - - run: ./mvnw verify -P all-tests checkstyle:checkstyle -Dcheckstyle.skip=false - - deploy-dev: + deploy: name: DEV Deployment - needs: [build-backend, tests-backend] + needs: [build] runs-on: ubuntu-22.04 timeout-minutes: 15 environment: @@ -156,12 +135,7 @@ jobs: postman: name: Smoke Test - env: - COMPONENT: backend - ZONE: ${{ github.event.number }} - DOMAIN: apps.silver.devops.gov.bc.ca - needs: - - deploy-dev + needs: [deploy] environment: name: dev runs-on: ubuntu-latest @@ -171,14 +145,12 @@ jobs: checks: write pull-requests: write steps: - - name: Checkout repository - uses: actions/checkout@v4 - + - uses: actions/checkout@v4 - name: API Health check uses: matt-ball/newman-action@master with: collection: postman/FCA.postman_collection.json - envVar: '[{"key":"URL_FCA","value":"https://${{ env.NAME }}-${{ github.event.number }}-backend.${{ env.DOMAIN }}"}]' + envVar: '[{"key":"URL_FCA","value":"https://${{ github.event.repository.name }}-${{ github.event.number }}-backend.${{ env.DOMAIN }}"}]' reporters: '["cli"]' folder: '["general"]' @@ -186,7 +158,7 @@ jobs: uses: matt-ball/newman-action@master with: collection: postman/FCA.postman_collection.json - envVar: '[{"key":"URL_FCA","value":"https://${{ env.NAME }}-${{ github.event.number }}-backend.${{ env.DOMAIN }}"}]' + envVar: '[{"key":"URL_FCA","value":"https://${{ github.event.repository.name }}-${{ github.event.number }}-backend.${{ env.DOMAIN }}"}]' iterationData: postman/FCA_postman_tests_dev.json reporters: '["cli", "junit"]' reporter: '{ "junit" : { "export" : "./postman/report.xml" } }'