Skip to content

Commit

Permalink
DAT 16029 liquibase-pro (and possibly liquibase) sonar scans for PRs …
Browse files Browse the repository at this point in the history
…are scanning code from master (#89)

* fix(sonar-test-scan.yml): fix shallow clone issue by disabling shallow clones for better analysis relevancy
fix(sonar-test-scan.yml): set the ref to the pull request head SHA or the commit SHA after the push event to ensure accurate analysis

* chore(create-release.yml): update sonar-push.yml version to v0.4.7 for better compatibility and bug fixes
chore(extension-attach-artifact-release.yml): update get_draft_release.sh, sign_artifact.sh, and upload_asset.sh versions to v0.4.7 for better compatibility and bug fixes
chore(extension-release-prepare.yml): update extension-release-rollback.yml version to v0.4.7 for better compatibility and bug fixes
chore(extension-release-published.yml): update extension-release-prepare.yml version to v0.4.7 for better compatibility and bug fixes
chore(os-extension-test.yml): update sonar-pull-request.yml version to v0.4.7 for better compatibility and bug fixes
chore(package-deb.yml): update package-deb-pom.xml and other script versions to v0.4.7 for better compatibility and bug fixes
chore(pom-release-published.yml): update extension-release-prepare.yml version to v0.4.7 for better compatibility and bug fixes
chore(pro-extension-test.yml): update sonar-pull-request.yml version to v0.4.7 for better compatibility and bug fixes
  • Loading branch information
jandroav authored Oct 5, 2023
1 parent 931afaa commit 6ffff1a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
sonar:
uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.4.5
uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.4.7
secrets: inherit

create-release:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/extension-attach-artifact-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:

- name: Get Reusable Script Files
run: |
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/.github/sign_artifact.sh
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/.github/upload_asset.sh
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/.github/sign_artifact.sh
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/.github/upload_asset.sh
chmod +x $PWD/.github/get_draft_release.sh
chmod +x $PWD/.github/sign_artifact.sh
chmod +x $PWD/.github/upload_asset.sh
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Get upload_zip.sh Script File
if: inputs.zip == 'true'
run: |
curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/.github/upload_zip.sh
curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/.github/upload_zip.sh
chmod +x $PWD/.github/upload_zip.sh
- name: Attach Zip File to Draft Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
release-rollback:
needs: prepare-release
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.4.5
uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.4.7
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ jobs:
maven-release:
needs: release
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.5
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.7
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/os-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ jobs:
sonar-pr:
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.5
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.7
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/package-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
# Under the src folder is where specific packages files live. The GitHub action inputs will modify the universal package-deb-pom.xml to tell the process which assets to use during the packaging step
mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/deb/control
mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/main/archive
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/src/${{ inputs.artifactId }}/deb/control/control
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/src/${{ inputs.artifactId }}/deb/control/postinst
curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh
curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.4.5/.github/package-deb-pom.xml
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/src/${{ inputs.artifactId }}/deb/control/control
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/src/${{ inputs.artifactId }}/deb/control/postinst
curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh
curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.4.7/.github/package-deb-pom.xml
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pom-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ jobs:
maven-release:
needs: release
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.5
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.7
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/pro-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,5 @@ jobs:
sonar-pr:
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.5
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.7
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/sonar-test-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
ref: ${{ github.event.pull_request.head.sha || github.event.after}}

- name: Set up JDK
uses: actions/setup-java@v3
Expand Down

0 comments on commit 6ffff1a

Please sign in to comment.