diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d23dd9aa..cbd91350 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,6 @@ on: push: branches: - 'edi-foundation-integration' - # - $default-branch paths-ignore: - 'VERSION' - '.bumpversion.cfg' @@ -87,17 +86,8 @@ jobs: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} run: | ./.github/workflows/test.sh - - # Blackduck: - # needs: [Init] - # runs-on: builder_blr - # steps: - # - name: checkout - # uses: actions/checkout@v2 - - # - name: blackduck scan - # run: powershell -ExecutionPolicy RemoteSigned -NoExit -File ${{ github.workspace }}\Build\PS\Invoke-BlackduckDetect.ps1 -SourcePath ${{ github.workspace }} -ApiToken ${{ secrets.BLACKDUCK_TOKEN }} - + + Fortify: needs: [Init] runs-on: builder_blr_2 @@ -158,6 +148,7 @@ jobs: id: branch - name: Set env variables + id: setVariables run: | new_version=${{ needs.Init.outputs.Version }} pr_tag="PR-${{ github.run_id }}" @@ -168,7 +159,8 @@ jobs: echo "PR_IMAGE=${{ env.HSDP_DOCKER_REGISTRY }}/edi-foundation-oauth2-proxy:${pr_tag}" >> "$GITHUB_ENV" echo "prTag=${pr_tag}" >> $GITHUB_OUTPUT echo "betaTag=${beta_tag}" >> $GITHUB_OUTPUT - + echo "${beta_tag}" > /tmp/output.txt + - name: Docker Build run: | make docker @@ -192,12 +184,35 @@ jobs: docker tag ${{ env.PR_IMAGE }} ${{ env.CI_IMAGE }} docker push ${{ env.CI_IMAGE }} + Blackduck: + needs: [Build] + if: github.ref == 'refs/heads/edi-foundation-integration' + runs-on: builder_blr + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Pull CI Docker Image + run: | + docker login docker.na1.hsdp.io --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' + docker pull docker.na1.hsdp.io/edi/edi-foundation-oauth2-proxy:${{ needs.Build.outputs.oauth2proxyCITag }} + + - name: CI Blackduck Image Scan + run: | + cd D:\test-bs + java -jar D:\synopsys-detect-8.3.0.jar --detect.project.name=SA_edifoundation-oauth2proxy --detect.project.version.name=1.0 --blackduck.url=https://blackduck.philips.com/ --detect.go.path="C:\Program Files\Go\bin\go.exe" --blackduck.trust.cert=true --blackduck.api.token=${{ secrets.BLACKDUCK_TOKEN }} --blackduck.proxy.host=apac.zscaler.philips.com --blackduck.proxy.port=10015 --blackduck.proxy.ignored.hosts=blackduck.philips.com --detect.tools.excluded=BINARY_SCAN --detect.docker.image=docker.na1.hsdp.io/edi/edi-foundation-oauth2-proxy:${{ needs.Build.outputs.oauth2proxyCITag }} --detect.blackduck.signature.scanner.local.path="C:\Users\ing07422\blackduck\tools\Black_Duck_Scan_Installation\scan.cli-2022.7.2" + PR_Deploy_Test_HDS_AUTH_GATEWAY: if: github.event_name == 'pull_request' needs: [Build, Fortify, unit-test, CodeAnalysis] uses: ./.github/workflows/deploy-hds-auth-gateway.yaml with: - OAUTH2_PROXY_IMAGE: ${{ needs.Build.outputs.envoyPRTag }} + OAUTH2_PROXY_IMAGE: ${{ needs.Build.outputs.oauth2proxyPRTag }} secrets: VAULT_HOST: ${{ secrets.VAULT_HOST }} VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }} @@ -205,10 +220,10 @@ jobs: CI_Deploy_Test_HDS_AUTH_GATEWAY: if: github.ref == 'refs/heads/edi-foundation-integration' - needs: [Build, Fortify, unit-test, CodeAnalysis] + needs: [Blackduck, Build, Fortify, unit-test, CodeAnalysis] uses: ./.github/workflows/api-gw-integrated-test.yaml with: - OAUTH2_PROXY_IMAGE: ${{ needs.Build.outputs.envoyCITag }} + OAUTH2_PROXY_IMAGE: ${{ needs.Build.outputs.oauth2proxyCITag }} secrets: VAULT_HOST: ${{ secrets.VAULT_HOST }} VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }} diff --git a/build/ps/Invoke-BlackDuckDetect.ps1 b/build/ps/Invoke-BlackDuckDetect.ps1 index 04c541d1..2f6190ee 100644 --- a/build/ps/Invoke-BlackDuckDetect.ps1 +++ b/build/ps/Invoke-BlackDuckDetect.ps1 @@ -1,7 +1,7 @@ param( $ProjectName = "SA_edifoundation-oauth2proxy", $ProjectVersionName = "1.0", - $SourcePath, + $DockerImage, $BlackduckUrl = "https://blackduck.philips.com/", $ApiToken, $ProxyHost = "apac.zscaler.philips.com",