From b9708efd01d72ba5495dcd36d22a60f8af71a901 Mon Sep 17 00:00:00 2001 From: Jake Newton Date: Wed, 24 Jul 2024 15:22:29 -0500 Subject: [PATCH 01/71] remove custom liquibase checks build. Add ability to build on multiple OS if desired --- .../build-publish-liquibase-checks.yml | 310 ------------------ .github/workflows/pro-extension-test.yml | 15 +- 2 files changed, 12 insertions(+), 313 deletions(-) delete mode 100644 .github/workflows/build-publish-liquibase-checks.yml diff --git a/.github/workflows/build-publish-liquibase-checks.yml b/.github/workflows/build-publish-liquibase-checks.yml deleted file mode 100644 index f4afefa0..00000000 --- a/.github/workflows/build-publish-liquibase-checks.yml +++ /dev/null @@ -1,310 +0,0 @@ -name: Build and Publish -env: - java-version: 17 - # Set liquibase.version to version 0-SNAPSHOT because we are - # building all required dependencies from the branches locally - LIQUIBASE_VERSION: '0-SNAPSHOT' -on: - workflow_call: - inputs: - core-branch: - description: 'The liquibase core branch to checkout.' - required: false - type: string - default: 'DAT-16671' - pro-branch: - description: 'The liquibase commercial branch to checkout.' - required: false - type: string - default: 'DAT-16671' - version: - description: 'The version to mark the generated artifacts' - required: true - type: string - -jobs: - build: - name: Build & Package java 17 - ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - - uses: actions/checkout@v4 - name: Checkout OSS - with: - repository: liquibase/liquibase - ref: ${{ inputs.core-branch }} - path: liquibase - token: ${{ secrets.BOT_TOKEN }} - - - uses: actions/checkout@v4 - name: Checkout liquibase-pro - with: - repository: liquibase/liquibase-pro - ref: ${{ inputs.pro-branch }} - path: liquibase-pro - token: ${{ secrets.BOT_TOKEN }} - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: "temurin" - cache: "maven" - - - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 - with: - maven-version: ${{ env.MAVEN_VERSION }} - - # look for dependencies in maven - - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v22 - with: - repositories: | - [ - { - "id": "liquibase", - "url": "https://maven.pkg.github.com/liquibase/liquibase", - "releases": { - "enabled": "false" - }, - "snapshots": { - "enabled": "true", - "updatePolicy": "always" - } - }, - { - "id": "liquibase-pro", - "url": "https://maven.pkg.github.com/liquibase/liquibase-pro", - "releases": { - "enabled": "false" - }, - "snapshots": { - "enabled": "true", - "updatePolicy": "always" - } - }, - { - "id": "liquibase-checks", - "url": "https://maven.pkg.github.com/liquibase/liquibase-checks", - "releases": { - "enabled": "false" - }, - "snapshots": { - "enabled": "true", - "updatePolicy": "always" - } - } - ] - servers: | - [ - { - "id": "liquibase-pro", - "username": "liquibot", - "password": "${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}" - }, - { - "id": "liquibase", - "username": "liquibot", - "password": "${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}" - }, - { - "id": "liquibase-checks", - "username": "liquibot", - "password": "${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}" - } - ] - - - name: Build Liquibase-pro - # Set liquibase.version to version 0-SNAPSHOT because we are just building all the dependencies from the branches locally - run: mvn -f liquibase-pro/pom-combined.xml clean install -DskipTests -P '!run-proguard' "-Dliquibase.version=${{ env.LIQUIBASE_VERSION }}" - - - uses: actions/checkout@v4 - if: ${{ inputs.version }} - name: Checkout liquibase-checks # We need to checkout the scripting repo when this workflow is called from liquibase/liquibase - with: - repository: liquibase/liquibase-checks - token: ${{ secrets.BOT_TOKEN }} - - - name: Build liquibase-checks version ${{ inputs.version }} jar - run: | - cd scripting - mvn versions:set -DnewVersion='${{ inputs.version }}' -DgenerateBackupPoms=false - cd .. - mvn clean install -DskipTests=true -pl '!liquibase-scripting-integration-tests' "-Dliquibase.version=${{ env.LIQUIBASE_VERSION }}" - mv scripting/target/liquibase-checks-${{ inputs.version }}.jar scripting/target/liquibase-checks-${{ matrix.os }}-${{ inputs.version }}.jar - - - name: get GITHUB_WORKSPACE - if: always() - shell: bash - run: | - echo "artifact_path=${GITHUB_WORKSPACE}/scripting/target/*.jar" >> $GITHUB_ENV - - - name: Save Artifacts - if: always() - uses: actions/upload-artifact@v3 - with: - name: liquibase-checks-${{ matrix.os }}-${{ inputs.version }}-artifacts - path: ${{ env.artifact_path }} - - - name: Save Event File - uses: actions/upload-artifact@v3 - with: - name: Event File - path: ${{ github.event_path }} - - - combine_jars: - needs: [ build ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: "temurin" - cache: "maven" - server-id: liquibase-checks - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 - with: - maven-version: ${{ env.MAVEN_VERSION }} - - # look for dependencies in maven - - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v22 - with: - repositories: | - [ - { - "id": "liquibase", - "url": "https://maven.pkg.github.com/liquibase/liquibase", - "releases": { - "enabled": "false" - }, - "snapshots": { - "enabled": "true", - "updatePolicy": "always" - } - }, - { - "id": "liquibase-pro", - "url": "https://maven.pkg.github.com/liquibase/liquibase-pro", - "releases": { - "enabled": "false" - }, - "snapshots": { - "enabled": "true", - "updatePolicy": "always" - } - }, - { - "id": "liquibase-checks", - "url": "https://maven.pkg.github.com/liquibase/liquibase-checks", - "releases": { - "enabled": "true" - }, - "snapshots": { - "enabled": "true", - "updatePolicy": "always" - } - } - ] - servers: | - [ - { - "id": "liquibase-pro", - "username": "liquibot", - "password": "${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}" - }, - { - "id": "liquibase", - "username": "liquibot", - "password": "${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}" - }, - { - "id": "liquibase-checks", - "username": "liquibot", - "password": "${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}" - } - ] - - - name: Download Artifacts - uses: actions/download-artifact@v2 - with: - name: liquibase-checks-ubuntu-latest-${{ inputs.version }}-artifacts - path: /tmp - - - name: Download Artifacts - uses: actions/download-artifact@v2 - with: - name: liquibase-checks-macos-latest-${{ inputs.version }}-artifacts - path: /tmp - - - name: Download Artifacts - uses: actions/download-artifact@v2 - with: - name: liquibase-checks-windows-latest-${{ inputs.version }}-artifacts - path: /tmp - - - name: Create multiplatform jar - run: | - #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac - rm -r -f /tmp/linux /tmp/windows /tmp/mac - mkdir /tmp/linux /tmp/windows /tmp/mac - unzip -d /tmp/linux /tmp/liquibase-checks-ubuntu-latest-${{ inputs.version }}.jar - unzip -d /tmp/windows /tmp/liquibase-checks-windows-latest-${{ inputs.version }}.jar - unzip -d /tmp/mac /tmp/liquibase-checks-macos-latest-${{ inputs.version }}.jar - rm -r -f /tmp/liquibase-checks - mkdir /tmp/liquibase-checks-${{ inputs.version }} - cp -a /tmp/linux/* /tmp/liquibase-checks-${{ inputs.version }}/ - cp -a /tmp/windows/* /tmp/liquibase-checks-${{ inputs.version }}/ - cp -a /tmp/mac/* /tmp/liquibase-checks-${{ inputs.version }}/ - rm /tmp/liquibase-checks-${{ inputs.version }}/vfs/fileslist.txt - cat /tmp/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /tmp/mac/vfs/fileslist.txt > /tmp/liquibase-checks-${{ inputs.version }}/vfs/fileslist.txt - rm -f /tmp/liquibase-checks-${{ inputs.version }}.jar - cd /tmp/liquibase-checks-${{ inputs.version }}/ - zip -r ../liquibase-checks-${{ inputs.version }}.jar * - - - uses: actions/checkout@v4 - name: Checkout liquibase-checks # We need to checkout the checks repo when this workflow is called from liquibase/liquibase - with: - repository: liquibase/liquibase-checks - token: ${{ secrets.BOT_TOKEN }} - - - name: Publish multiplatform jar to GPM - env: - MAVEN_USERNAME: liquibot - MAVEN_PASSWORD: ${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }} - run: | - ls -ltr /tmp - cd scripting - mvn versions:set -DnewVersion='${{ inputs.version }}' - cd .. - mvn versions:set -DnewVersion='${{ inputs.version }}' - mkdir -p scripting/target - mv /tmp/*.jar scripting/target - ls -ltr scripting/target/ - mvn deploy:deploy-file \ - -Dfile=scripting/target/liquibase-checks-${{ inputs.version }}.jar \ - -Dsources=scripting/target/liquibase-checks-${{ inputs.version }}-sources.jar \ - -Djavadoc=scripting/target/liquibase-checks-${{ inputs.version }}-javadoc.jar \ - -DrepositoryId=liquibase \ - -Durl=https://maven.pkg.github.com/liquibase/liquibase-checks \ - -DpomFile=scripting/pom.xml - - - name: Upload multiplatform artifact - uses: actions/upload-artifact@v3 - with: - name: ${{ inputs.version }}-multiplatform-artifacts - path: | - scripting/target/* \ No newline at end of file diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index ddd41ceb..2af72741 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -9,10 +9,15 @@ on: default: "[11, 17, 21]" type: string os: - description: "Operating system to test" + description: "Operating system to test on" required: false default: '["ubuntu-latest", "windows-latest"]' type: string + build-os: + description: "Operating system to build on" + required: false + default: "ubuntu-latest" + type: string nightly: description: "Specifies nightly builds against liquibase master-SNAPSHOT" required: false @@ -72,7 +77,11 @@ env: jobs: build: - name: Build & Package + strategy: + fail-fast: false + matrix: + build-os: ${{fromJson(inputs.build-os || '["ubuntu-latest"]')}} + name: Build & Package - ${{ matrix.build-os }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -170,7 +179,7 @@ jobs: - name: Save Artifacts uses: actions/upload-artifact@v3 with: - name: ${{ steps.get-artifact-id.outputs.artifact_id }}-artifacts + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.build-os }}-artifacts path: | ${{ inputs.artifactPath }} From fd05a8035058c771e2dcdc4da489136b4bf589e3 Mon Sep 17 00:00:00 2001 From: Jake Newton Date: Wed, 24 Jul 2024 15:25:16 -0500 Subject: [PATCH 02/71] fix formatting --- .github/workflows/pro-extension-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 2af72741..9f1e7a45 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -16,7 +16,7 @@ on: build-os: description: "Operating system to build on" required: false - default: "ubuntu-latest" + default: '["ubuntu-latest"]' type: string nightly: description: "Specifies nightly builds against liquibase master-SNAPSHOT" From cb3382a1221ffcaf3160ba1a82494168921fe60b Mon Sep 17 00:00:00 2001 From: Jake Newton Date: Wed, 24 Jul 2024 15:45:12 -0500 Subject: [PATCH 03/71] use same os input for build and test jobs --- .github/workflows/pro-extension-test.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 9f1e7a45..e91acc40 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -9,15 +9,10 @@ on: default: "[11, 17, 21]" type: string os: - description: "Operating system to test on" + description: "Operating system to build/test on" required: false default: '["ubuntu-latest", "windows-latest"]' type: string - build-os: - description: "Operating system to build on" - required: false - default: '["ubuntu-latest"]' - type: string nightly: description: "Specifies nightly builds against liquibase master-SNAPSHOT" required: false @@ -80,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - build-os: ${{fromJson(inputs.build-os || '["ubuntu-latest"]')}} + os: ${{fromJson(inputs.os || '["ubuntu-latest"]')}} name: Build & Package - ${{ matrix.build-os }} runs-on: ubuntu-latest steps: @@ -179,7 +174,7 @@ jobs: - name: Save Artifacts uses: actions/upload-artifact@v3 with: - name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.build-os }}-artifacts + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-artifacts path: | ${{ inputs.artifactPath }} From a98a7d5bfd2d1ab315bf72ca97e4afe30ab6175f Mon Sep 17 00:00:00 2001 From: Jake Newton Date: Wed, 24 Jul 2024 15:49:25 -0500 Subject: [PATCH 04/71] use same os input for build and test jobs --- .github/workflows/pro-extension-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index e91acc40..9c27e8b3 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -76,7 +76,7 @@ jobs: fail-fast: false matrix: os: ${{fromJson(inputs.os || '["ubuntu-latest"]')}} - name: Build & Package - ${{ matrix.build-os }} + name: Build & Package - ${{ matrix.os }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -256,7 +256,7 @@ jobs: - uses: actions/download-artifact@v3 with: - name: ${{needs.build.outputs.artifact_id}}-artifacts + name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}artifacts path: ./target - name: Run extra command From 1f969b86a9e6ff07571115a8d9c8b74eed4d0468 Mon Sep 17 00:00:00 2001 From: Jake Newton Date: Wed, 24 Jul 2024 15:57:15 -0500 Subject: [PATCH 05/71] fix typo --- .github/workflows/pro-extension-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 9c27e8b3..7e256265 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -256,7 +256,7 @@ jobs: - uses: actions/download-artifact@v3 with: - name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}artifacts + name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}-artifacts path: ./target - name: Run extra command From 9f48be77aed225f193bca4b6d39da811fafc04f2 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 06:56:32 +0200 Subject: [PATCH 06/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20Add=20Docker=20installation=20step=20for=20?= =?UTF-8?q?macOS=20runners=20to=20support=20Docker=20setup=20=E2=99=BB?= =?UTF-8?q?=EF=B8=8F=20(.github/workflows/pro-extension-test.yml):=20Refac?= =?UTF-8?q?tor=20the=20way=20extraMavenArgs=20are=20passed=20to=20the=20Ma?= =?UTF-8?q?ven=20command=20to=20ensure=20proper=20handling=20of=20spaces?= =?UTF-8?q?=20and=20special=20characters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 7e256265..d621eb5d 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -199,6 +199,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Docker for macOS + if: runner.os == 'macOS' + run: | + brew install docker + colima start + - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v4 with: @@ -276,7 +282,9 @@ jobs: - name: Run Tests if: ${{ !inputs.nightly }} - run: mvn -B test -P '${{ inputs.mavenProfiles }}' ${{ inputs.extraMavenArgs }} + run: | + extraMavenArgs="${{ inputs.extraMavenArgs }}" + mvn -B test -P '${{ inputs.mavenProfiles }}' "$extraMavenArgs" - name: Run Tests if: ${{ inputs.nightly }} From 99df72fa8a2be129cab4275350ed61b305ae0d39 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 07:26:44 +0200 Subject: [PATCH 07/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20add=20support=20for=20'combineJars'=20boolean=20input=20to?= =?UTF-8?q?=20specify=20if=20built=20jars=20should=20be=20combined=20into?= =?UTF-8?q?=20a=20single=20jar=20=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20create=20a=20new=20job=20'Combine=20Jars'=20to=20download=20?= =?UTF-8?q?artifacts=20from=20different=20platforms=20and=20create=20a=20m?= =?UTF-8?q?ultiplatform=20jar=20if=20'combineJars'=20input=20is=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 59 +++++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index d621eb5d..1e1ecadc 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -48,6 +48,11 @@ on: required: false default: "target/*" type: string + combineJars: + description: "Specify it if you want to combine the built jars into a single jar" + required: false + default: false + type: boolean secrets: SONAR_TOKEN: description: "SONAR_TOKEN from the caller workflow" @@ -283,8 +288,7 @@ jobs: - name: Run Tests if: ${{ !inputs.nightly }} run: | - extraMavenArgs="${{ inputs.extraMavenArgs }}" - mvn -B test -P '${{ inputs.mavenProfiles }}' "$extraMavenArgs" + mvn -B test -P '${{ inputs.mavenProfiles }}' "'${{ inputs.extraMavenArgs }}" - name: Run Tests if: ${{ inputs.nightly }} @@ -312,6 +316,57 @@ jobs: **/target/surefire-reports **/target/site/jacoco/jacoco.xml + combineJars: + needs: build + if: ${{ inputs.combineJars }} + name: Combine Jars + runs-on: ubuntu-latest + steps: + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-artifacts + path: /tmp + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: ${{needs.build.outputs.artifact_id}}-macos-latest-artifacts + path: /tmp + + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: ${{needs.build.outputs.artifact_id}}-windows-latest-artifacts + path: /tmp + + - name: Create multiplatform jar + run: | + #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac + rm -r -f /tmp/linux /tmp/windows /tmp/mac + mkdir /tmp/linux /tmp/windows /tmp/mac + unzip -d /tmp/linux /tmp/${{needs.build.outputs.artifact_id}}-ubuntu-latest.jar + unzip -d /tmp/windows /tmp/${{needs.build.outputs.artifact_id}}-windows-latest.jar + unzip -d /tmp/mac /tmp/${{needs.build.outputs.artifact_id}}-macos-latest.jar + rm -r -f /tmp/${{needs.build.outputs.artifact_id}} + mkdir /tmp/${{needs.build.outputs.artifact_id}} + cp -a /tmp/linux/* /tmp/${{needs.build.outputs.artifact_id}}/ + cp -a /tmp/windows/* /tmp/${{needs.build.outputs.artifact_id}}/ + cp -a /tmp/mac/* /tmp/${{needs.build.outputs.artifact_id}}/ + rm /tmp/${{needs.build.outputs.artifact_id}}/vfs/fileslist.txt + cat /tmp/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /tmp/mac/vfs/fileslist.txt > /tmp/${{needs.build.outputs.artifact_id}}/vfs/fileslist.txt + rm -f /tmp/${{needs.build.outputs.artifact_id}}.jar + cd /tmp/${{needs.build.outputs.artifact_id}}/ + zip -r ../${{needs.build.outputs.artifact_id}}.jar * + + - name: Upload multiplatform artifact + uses: actions/upload-artifact@v3 + with: + name: multiplatform-artifacts + path: | + scripting/target/* + sonar-pr: if: ${{ !inputs.nightly }} needs: [unit-test] From f7c50a970408be5993c10901e1188e648f0673e8 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 07:32:34 +0200 Subject: [PATCH 08/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20remove=20unnecessary=20Docker=20installation=20steps=20for?= =?UTF-8?q?=20macOS=20=F0=9F=94=A7=20(pro-extension-test.yml):=20update=20?= =?UTF-8?q?conditional=20logic=20for=20running=20tests=20based=20on=20nigh?= =?UTF-8?q?tly=20flag=20and=20OS=20type=20to=20improve=20workflow=20effici?= =?UTF-8?q?ency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 1e1ecadc..dcdc14f6 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -204,12 +204,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Docker for macOS - if: runner.os == 'macOS' - run: | - brew install docker - colima start - - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v4 with: @@ -286,12 +280,12 @@ jobs: ${{ inputs.extraWindowsCommand }} - name: Run Tests - if: ${{ !inputs.nightly }} + if: ${{ !inputs.nightly }} || ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) run: | mvn -B test -P '${{ inputs.mavenProfiles }}' "'${{ inputs.extraMavenArgs }}" - name: Run Tests - if: ${{ inputs.nightly }} + if: ${{ inputs.nightly }} || ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) run: mvn -B test -P '${{ inputs.mavenProfiles }}' ${{ inputs.extraMavenArgs }} "-Dliquibase.version=master-SNAPSHOT" - name: Notify Slack on Build Failure From 257e2c264110d544f19f636e9d7bc4234b4965fc Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 07:46:02 +0200 Subject: [PATCH 09/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20Fix=20conditional=20statements=20for=20runn?= =?UTF-8?q?ing=20tests=20to=20ensure=20correct=20logic=20=F0=9F=94=A7=20(.?= =?UTF-8?q?github/workflows/pro-extension-test.yml):=20Add=20ls=20command?= =?UTF-8?q?=20to=20list=20files=20in=20/tmp=20directory=20for=20debugging?= =?UTF-8?q?=20purposes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index dcdc14f6..a9af9951 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -280,12 +280,12 @@ jobs: ${{ inputs.extraWindowsCommand }} - name: Run Tests - if: ${{ !inputs.nightly }} || ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) + if: ${{ !inputs.nightly }} && ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) run: | - mvn -B test -P '${{ inputs.mavenProfiles }}' "'${{ inputs.extraMavenArgs }}" + mvn -B test -P '${{ inputs.mavenProfiles }}' "'${{ inputs.extraMavenArgs }}'" - name: Run Tests - if: ${{ inputs.nightly }} || ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) + if: ${{ inputs.nightly }} && ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) run: mvn -B test -P '${{ inputs.mavenProfiles }}' ${{ inputs.extraMavenArgs }} "-Dliquibase.version=master-SNAPSHOT" - name: Notify Slack on Build Failure @@ -340,6 +340,7 @@ jobs: #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac rm -r -f /tmp/linux /tmp/windows /tmp/mac mkdir /tmp/linux /tmp/windows /tmp/mac + ls -ltr /tmp unzip -d /tmp/linux /tmp/${{needs.build.outputs.artifact_id}}-ubuntu-latest.jar unzip -d /tmp/windows /tmp/${{needs.build.outputs.artifact_id}}-windows-latest.jar unzip -d /tmp/mac /tmp/${{needs.build.outputs.artifact_id}}-macos-latest.jar From f52a65316f79d9178e2c71545903ae1c44a5f6b5 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 08:16:26 +0200 Subject: [PATCH 10/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20Add=20new=20input=20'modulePath'=20to=20spe?= =?UTF-8?q?cify=20the=20path=20to=20the=20module=20that=20should=20be=20bu?= =?UTF-8?q?ilt.=20This=20is=20useful=20for=20multi-module=20extensions.=20?= =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-extension-test.yml):=20Up?= =?UTF-8?q?date=20working=20directory=20for=20various=20steps=20to=20use?= =?UTF-8?q?=20the=20'modulePath'=20input=20value.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 38 ++++++++++++++++++------ 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index a9af9951..d0798693 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -13,6 +13,11 @@ on: required: false default: '["ubuntu-latest", "windows-latest"]' type: string + os-test: + description: "Operating system to test on" + required: false + default: '["ubuntu-latest", "windows-latest"]' + type: string nightly: description: "Specifies nightly builds against liquibase master-SNAPSHOT" required: false @@ -48,6 +53,11 @@ on: required: false default: "target/*" type: string + modulePath: + description: "Specify the path to the module that should be built. Useful for multi-module extensions." + required: false + default: "." + type: string combineJars: description: "Specify it if you want to combine the built jars into a single jar" required: false @@ -142,16 +152,19 @@ jobs: ] - name: Run extra command + working-directory: ${{ inputs.modulePath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} - name: Run extra Linux command + working-directory: ${{ inputs.modulePath }} if: inputs.extraLinuxCommand != '' run: | ${{ inputs.extraLinuxCommand }} - name: Build and Package latest liquibase version + working-directory: ${{ inputs.modulePath }} if: ${{ inputs.nightly }} run: mvn -B dependency:go-offline clean package -DskipTests=true "-Dliquibase.version=master-SNAPSHOT" @@ -169,10 +182,12 @@ jobs: SLACK_LINK_NAMES: true - name: Build and Package + working-directory: ${{ inputs.modulePath }} if: ${{ !inputs.nightly }} run: mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} - name: Get Artifact ID + working-directory: ${{ inputs.modulePath }} id: get-artifact-id run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" @@ -197,7 +212,7 @@ jobs: fail-fast: false matrix: java: ${{fromJson(inputs.java || '[8, 11, 17, 18]')}} - os: ${{fromJson(inputs.os || '["ubuntu-latest", "windows-latest"]')}} + os: ${{fromJson(inputs.os-test || '["ubuntu-latest", "windows-latest"]')}} name: Test Java ${{ matrix.java }} - ${{ matrix.os }} runs-on: ${{ matrix.os }} needs: build @@ -265,27 +280,32 @@ jobs: path: ./target - name: Run extra command + working-directory: ${{ inputs.modulePath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} - name: Run extra Linux command + working-directory: ${{ inputs.modulePath }} if: inputs.extraLinuxCommand != '' && runner.os == 'Linux' run: | ${{ inputs.extraLinuxCommand }} - name: Run extra Windows command + working-directory: ${{ inputs.modulePath }} if: inputs.extraWindowsCommand != '' && runner.os == 'Windows' run: | ${{ inputs.extraWindowsCommand }} - name: Run Tests - if: ${{ !inputs.nightly }} && ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) + working-directory: ${{ inputs.modulePath }} + if: ${{ !inputs.nightly }} run: | mvn -B test -P '${{ inputs.mavenProfiles }}' "'${{ inputs.extraMavenArgs }}'" - name: Run Tests - if: ${{ inputs.nightly }} && ( ${{ matrix.os != 'macos-latest' }} && !contains(inputs.artifactPath, 'scripting') ) + working-directory: ${{ inputs.modulePath }} + if: ${{ inputs.nightly }} run: mvn -B test -P '${{ inputs.mavenProfiles }}' ${{ inputs.extraMavenArgs }} "-Dliquibase.version=master-SNAPSHOT" - name: Notify Slack on Build Failure @@ -311,7 +331,7 @@ jobs: **/target/site/jacoco/jacoco.xml combineJars: - needs: build + needs: [ build, unit-test ] if: ${{ inputs.combineJars }} name: Combine Jars runs-on: ubuntu-latest @@ -341,9 +361,9 @@ jobs: rm -r -f /tmp/linux /tmp/windows /tmp/mac mkdir /tmp/linux /tmp/windows /tmp/mac ls -ltr /tmp - unzip -d /tmp/linux /tmp/${{needs.build.outputs.artifact_id}}-ubuntu-latest.jar - unzip -d /tmp/windows /tmp/${{needs.build.outputs.artifact_id}}-windows-latest.jar - unzip -d /tmp/mac /tmp/${{needs.build.outputs.artifact_id}}-macos-latest.jar + unzip -d /tmp/linux /tmp/${{needs.build.outputs.artifact_id}}-ubuntu-latest-*.jar + unzip -d /tmp/windows /tmp/${{needs.build.outputs.artifact_id}}-windows-latest-*.jar + unzip -d /tmp/mac /tmp/${{needs.build.outputs.artifact_id}}-macos-latest-*.jar rm -r -f /tmp/${{needs.build.outputs.artifact_id}} mkdir /tmp/${{needs.build.outputs.artifact_id}} cp -a /tmp/linux/* /tmp/${{needs.build.outputs.artifact_id}}/ @@ -351,7 +371,7 @@ jobs: cp -a /tmp/mac/* /tmp/${{needs.build.outputs.artifact_id}}/ rm /tmp/${{needs.build.outputs.artifact_id}}/vfs/fileslist.txt cat /tmp/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /tmp/mac/vfs/fileslist.txt > /tmp/${{needs.build.outputs.artifact_id}}/vfs/fileslist.txt - rm -f /tmp/${{needs.build.outputs.artifact_id}}.jar + rm -f /tmp/${{needs.build.outputs.artifact_id}}-*.jar cd /tmp/${{needs.build.outputs.artifact_id}}/ zip -r ../${{needs.build.outputs.artifact_id}}.jar * @@ -360,7 +380,7 @@ jobs: with: name: multiplatform-artifacts path: | - scripting/target/* + ${{ inputs.artifactPath }} sonar-pr: if: ${{ !inputs.nightly }} From 40ef28a6ef1ce16c7f381a52bfd374ca4ca2d971 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 08:25:52 +0200 Subject: [PATCH 11/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20fix=20quotes=20around=20inputs.extraMavenAr?= =?UTF-8?q?gs=20to=20prevent=20shell=20expansion=20and=20ensure=20correct?= =?UTF-8?q?=20arguments=20are=20passed=20to=20Maven=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index d0798693..32a2083a 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -301,12 +301,12 @@ jobs: working-directory: ${{ inputs.modulePath }} if: ${{ !inputs.nightly }} run: | - mvn -B test -P '${{ inputs.mavenProfiles }}' "'${{ inputs.extraMavenArgs }}'" + mvn -B test -P '${{ inputs.mavenProfiles }}' "${{ inputs.extraMavenArgs }}" - name: Run Tests working-directory: ${{ inputs.modulePath }} if: ${{ inputs.nightly }} - run: mvn -B test -P '${{ inputs.mavenProfiles }}' ${{ inputs.extraMavenArgs }} "-Dliquibase.version=master-SNAPSHOT" + run: mvn -B test -P '${{ inputs.mavenProfiles }}' "${{ inputs.extraMavenArgs }}" "-Dliquibase.version=master-SNAPSHOT" - name: Notify Slack on Build Failure if: ${{ failure() && inputs.nightly }} From 0a4c8dddde0fd4e62c853b5d31ecf843d97111dc Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 08:26:29 +0200 Subject: [PATCH 12/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20remove=20unnecessary=20'unit-test'=20job=20dependency=20from?= =?UTF-8?q?=20'combineJars'=20job=20to=20improve=20workflow=20efficiency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 32a2083a..f6667903 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -331,7 +331,7 @@ jobs: **/target/site/jacoco/jacoco.xml combineJars: - needs: [ build, unit-test ] + needs: [ build ] if: ${{ inputs.combineJars }} name: Combine Jars runs-on: ubuntu-latest From 4ae6c9878cdfbcb4892207f6e4442f1481fe559c Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 08:50:48 +0200 Subject: [PATCH 13/71] =?UTF-8?q?=E2=9C=A8=20(pro-extension-test.yml):=20r?= =?UTF-8?q?efactor=20workflow=20to=20dynamically=20get=20and=20use=20proje?= =?UTF-8?q?ct=20version=20for=20artifact=20naming=20and=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 57 ++++++++++++++++-------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index f6667903..5b820918 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -191,10 +191,16 @@ jobs: id: get-artifact-id run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" + - name: Get artifacts version + id: get-version + run: | + version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "VERSION=$version" >> $GITHUB_ENV + - name: Save Artifacts uses: actions/upload-artifact@v3 with: - name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-artifacts + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ env.VERSION }}-artifacts path: | ${{ inputs.artifactPath }} @@ -274,9 +280,15 @@ jobs: } ] + - name: Get artifacts version + id: get-version + run: | + version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "VERSION=$version" >> $GITHUB_ENV + - uses: actions/download-artifact@v3 with: - name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}-artifacts + name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}-${{ env.VERSION }}-artifacts path: ./target - name: Run extra command @@ -337,22 +349,30 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + + - name: Get artifacts version + id: get-version + run: | + version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "VERSION=$version" >> $GITHUB_ENV + - name: Download Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-artifacts + name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-${{ env.VERSION }}-artifacts path: /tmp - name: Download Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-macos-latest-artifacts + name: ${{needs.build.outputs.artifact_id}}-macos-latest-${{ env.VERSION }}-artifacts path: /tmp - name: Download Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-windows-latest-artifacts + name: ${{needs.build.outputs.artifact_id}}-windows-latest-${{ env.VERSION }}-artifacts path: /tmp - name: Create multiplatform jar @@ -360,20 +380,19 @@ jobs: #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac rm -r -f /tmp/linux /tmp/windows /tmp/mac mkdir /tmp/linux /tmp/windows /tmp/mac - ls -ltr /tmp - unzip -d /tmp/linux /tmp/${{needs.build.outputs.artifact_id}}-ubuntu-latest-*.jar - unzip -d /tmp/windows /tmp/${{needs.build.outputs.artifact_id}}-windows-latest-*.jar - unzip -d /tmp/mac /tmp/${{needs.build.outputs.artifact_id}}-macos-latest-*.jar - rm -r -f /tmp/${{needs.build.outputs.artifact_id}} - mkdir /tmp/${{needs.build.outputs.artifact_id}} - cp -a /tmp/linux/* /tmp/${{needs.build.outputs.artifact_id}}/ - cp -a /tmp/windows/* /tmp/${{needs.build.outputs.artifact_id}}/ - cp -a /tmp/mac/* /tmp/${{needs.build.outputs.artifact_id}}/ - rm /tmp/${{needs.build.outputs.artifact_id}}/vfs/fileslist.txt - cat /tmp/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /tmp/mac/vfs/fileslist.txt > /tmp/${{needs.build.outputs.artifact_id}}/vfs/fileslist.txt - rm -f /tmp/${{needs.build.outputs.artifact_id}}-*.jar - cd /tmp/${{needs.build.outputs.artifact_id}}/ - zip -r ../${{needs.build.outputs.artifact_id}}.jar * + unzip -d /tmp/linux /tmp/liquibase-checks-ubuntu-latest-${{ env.VERSION }}.jar + unzip -d /tmp/windows /tmp/liquibase-checks-windows-latest-${{ env.VERSION }}.jar + unzip -d /tmp/mac /tmp/liquibase-checks-macos-latest-${{ env.VERSION }}.jar + rm -r -f /tmp/liquibase-checks + mkdir /tmp/liquibase-checks-${{ env.VERSION }} + cp -a /tmp/linux/* /tmp/liquibase-checks-${{ env.VERSION }}/ + cp -a /tmp/windows/* /tmp/liquibase-checks-${{ env.VERSION }}/ + cp -a /tmp/mac/* /tmp/liquibase-checks-${{ env.VERSION }}/ + rm /tmp/liquibase-checks-${{ env.VERSION }}/vfs/fileslist.txt + cat /tmp/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /tmp/mac/vfs/fileslist.txt > /tmp/liquibase-checks-${{ env.VERSION }}/vfs/fileslist.txt + rm -f /tmp/liquibase-checks-${{ env.VERSION }}.jar + cd /tmp/liquibase-checks-${{ env.VERSION }}/ + zip -r ../liquibase-checks-${{ env.VERSION }}.jar * - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 From 064b627b4d7c8cb5e35c115d0d787ad62b9e8c1f Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 09:01:27 +0200 Subject: [PATCH 14/71] =?UTF-8?q?=F0=9F=93=9D=20(pro-extension-test.yml):?= =?UTF-8?q?=20capitalize=20the=20first=20letter=20of=20the=20job=20names?= =?UTF-8?q?=20for=20consistency=20and=20readability=20=F0=9F=94=A7=20(pro-?= =?UTF-8?q?extension-test.yml):=20add=20quotes=20around=20the=20expression?= =?UTF-8?q?=20in=20the=20maven=20command=20to=20handle=20cases=20where=20t?= =?UTF-8?q?he=20expression=20contains=20special=20characters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 5b820918..481b6698 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -191,10 +191,10 @@ jobs: id: get-artifact-id run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" - - name: Get artifacts version + - name: Get Artifacts Version id: get-version run: | - version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) echo "VERSION=$version" >> $GITHUB_ENV - name: Save Artifacts @@ -280,10 +280,10 @@ jobs: } ] - - name: Get artifacts version + - name: Get Artifacts Version id: get-version run: | - version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) echo "VERSION=$version" >> $GITHUB_ENV - uses: actions/download-artifact@v3 @@ -351,7 +351,7 @@ jobs: - uses: actions/checkout@v4 - - name: Get artifacts version + - name: Get Artifacts Version id: get-version run: | version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) @@ -377,6 +377,7 @@ jobs: - name: Create multiplatform jar run: | + ls -ltr #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac rm -r -f /tmp/linux /tmp/windows /tmp/mac mkdir /tmp/linux /tmp/windows /tmp/mac From 17525bd3bace9f5396788f7362c7b118574c5aa2 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 09:09:23 +0200 Subject: [PATCH 15/71] =?UTF-8?q?=F0=9F=90=9B=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20fix=20syntax=20error=20in=20maven=20command?= =?UTF-8?q?=20by=20adding=20missing=20closing=20parenthesis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 481b6698..60fd503a 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -283,7 +283,7 @@ jobs: - name: Get Artifacts Version id: get-version run: | - version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) + version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)) echo "VERSION=$version" >> $GITHUB_ENV - uses: actions/download-artifact@v3 @@ -354,7 +354,7 @@ jobs: - name: Get Artifacts Version id: get-version run: | - version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) echo "VERSION=$version" >> $GITHUB_ENV - name: Download Artifacts From b6d794da358e103c5aade296ce064bfe33bb0f44 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 09:12:27 +0200 Subject: [PATCH 16/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20update=20ls=20command=20to=20list=20files?= =?UTF-8?q?=20in=20/tmp=20directory=20for=20debugging=20purposes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 60fd503a..4ef4816f 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -377,7 +377,7 @@ jobs: - name: Create multiplatform jar run: | - ls -ltr + ls -ltr /tmp #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac rm -r -f /tmp/linux /tmp/windows /tmp/mac mkdir /tmp/linux /tmp/windows /tmp/mac From 2f2139e11e2678713ff308ecd5b5b22909af37ac Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 09:36:56 +0200 Subject: [PATCH 17/71] =?UTF-8?q?=F0=9F=93=9D=20(pro-extension-test.yml):?= =?UTF-8?q?=20rename=20step=20to=20get=20artifact=20version=20and=20update?= =?UTF-8?q?=20references=20to=20use=20the=20correct=20output=20variable=20?= =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):=20update=20artifact=20?= =?UTF-8?q?naming=20to=20include=20the=20correct=20artifact=20version=20fo?= =?UTF-8?q?r=20consistency=20and=20clarity=20=F0=9F=94=A7=20(pro-extension?= =?UTF-8?q?-test.yml):=20update=20download=20paths=20to=20use=20the=20corr?= =?UTF-8?q?ect=20artifact=20version=20for=20each=20platform=20=F0=9F=94=A7?= =?UTF-8?q?=20(pro-extension-test.yml):=20refactor=20creating=20multiplatf?= =?UTF-8?q?orm=20jar=20to=20use=20a=20more=20concise=20and=20efficient=20m?= =?UTF-8?q?ethod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 51 ++++++++++-------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 4ef4816f..107002fa 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -191,16 +191,15 @@ jobs: id: get-artifact-id run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" - - name: Get Artifacts Version - id: get-version - run: | - version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "VERSION=$version" >> $GITHUB_ENV + - name: Get Artifact Version + working-directory: ${{ inputs.modulePath }} + id: get-artifact-version + run: echo "::set-output name=artifact_version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" - name: Save Artifacts uses: actions/upload-artifact@v3 with: - name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ env.VERSION }}-artifacts + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ steps.get-artifact-id.outputs.artifact_version }}-artifacts path: | ${{ inputs.artifactPath }} @@ -212,6 +211,7 @@ jobs: outputs: artifact_id: ${{ steps.get-artifact-id.outputs.artifact_id }} + artifact_version: ${{ steps.get-artifact-id.outputs.artifact_version }} unit-test: strategy: @@ -283,12 +283,12 @@ jobs: - name: Get Artifacts Version id: get-version run: | - version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)) + version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) echo "VERSION=$version" >> $GITHUB_ENV - uses: actions/download-artifact@v3 with: - name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}-${{ env.VERSION }}-artifacts + name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}-${{needs.build.outputs.artifact_version}}-artifacts path: ./target - name: Run extra command @@ -360,40 +360,29 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-${{ env.VERSION }}-artifacts - path: /tmp + name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-${{needs.build.outputs.artifact_version}}-artifacts + path: /tmp/ubuntu - name: Download Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-macos-latest-${{ env.VERSION }}-artifacts - path: /tmp + name: ${{needs.build.outputs.artifact_id}}-macos-latest-${{needs.build.outputs.artifact_version}}-artifacts + path: /tmp/macos - name: Download Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-windows-latest-${{ env.VERSION }}-artifacts - path: /tmp + name: ${{needs.build.outputs.artifact_id}}-windows-latest-${{needs.build.outputs.artifact_version}}-artifacts + path: /tmp/windows - name: Create multiplatform jar run: | - ls -ltr /tmp - #Copy the .jar files from Linux, Windows, and Mac builds to /tmp/linux, /tmp/windows, and /tmp/mac - rm -r -f /tmp/linux /tmp/windows /tmp/mac - mkdir /tmp/linux /tmp/windows /tmp/mac - unzip -d /tmp/linux /tmp/liquibase-checks-ubuntu-latest-${{ env.VERSION }}.jar - unzip -d /tmp/windows /tmp/liquibase-checks-windows-latest-${{ env.VERSION }}.jar - unzip -d /tmp/mac /tmp/liquibase-checks-macos-latest-${{ env.VERSION }}.jar - rm -r -f /tmp/liquibase-checks - mkdir /tmp/liquibase-checks-${{ env.VERSION }} - cp -a /tmp/linux/* /tmp/liquibase-checks-${{ env.VERSION }}/ - cp -a /tmp/windows/* /tmp/liquibase-checks-${{ env.VERSION }}/ - cp -a /tmp/mac/* /tmp/liquibase-checks-${{ env.VERSION }}/ - rm /tmp/liquibase-checks-${{ env.VERSION }}/vfs/fileslist.txt - cat /tmp/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /tmp/mac/vfs/fileslist.txt > /tmp/liquibase-checks-${{ env.VERSION }}/vfs/fileslist.txt - rm -f /tmp/liquibase-checks-${{ env.VERSION }}.jar - cd /tmp/liquibase-checks-${{ env.VERSION }}/ - zip -r ../liquibase-checks-${{ env.VERSION }}.jar * + mkdir -p combined + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar ./combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-ubuntu.jar + cp /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar ./combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-macos.jar + cp /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar ./combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-windows.jar + cd combined + jar -cfm ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar MANIFEST.MF ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-ubuntu.jar ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-macos.jar ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-windows.jar - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 From 3d9ad398aaf352cfead1c15b66ccd2228b72a9cd Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 09:39:16 +0200 Subject: [PATCH 18/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20remove=20duplicate=20step=20to=20get=20artifacts=20version?= =?UTF-8?q?=20to=20avoid=20redundancy=20and=20improve=20workflow=20efficie?= =?UTF-8?q?ncy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 107002fa..10d6510c 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -280,12 +280,6 @@ jobs: } ] - - name: Get Artifacts Version - id: get-version - run: | - version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "VERSION=$version" >> $GITHUB_ENV - - uses: actions/download-artifact@v3 with: name: ${{needs.build.outputs.artifact_id}}-${{ matrix.os }}-${{needs.build.outputs.artifact_version}}-artifacts @@ -351,12 +345,6 @@ jobs: - uses: actions/checkout@v4 - - name: Get Artifacts Version - id: get-version - run: | - version=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "VERSION=$version" >> $GITHUB_ENV - - name: Download Artifacts uses: actions/download-artifact@v2 with: From cc3680ed1bc7849f86ab0f0f46126ce00b36b5bc Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 09:45:18 +0200 Subject: [PATCH 19/71] =?UTF-8?q?=F0=9F=90=9B=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20fix=20typo=20in=20output=20variable=20name?= =?UTF-8?q?=20to=20correctly=20reference=20artifact=20version=20in=20workf?= =?UTF-8?q?low=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 10d6510c..e77403f1 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -199,7 +199,7 @@ jobs: - name: Save Artifacts uses: actions/upload-artifact@v3 with: - name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ steps.get-artifact-id.outputs.artifact_version }}-artifacts + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ steps.get-artifact-version.outputs.artifact_version }}-artifacts path: | ${{ inputs.artifactPath }} @@ -211,7 +211,7 @@ jobs: outputs: artifact_id: ${{ steps.get-artifact-id.outputs.artifact_id }} - artifact_version: ${{ steps.get-artifact-id.outputs.artifact_version }} + artifact_version: ${{ steps.get-artifact-version.outputs.artifact_version }} unit-test: strategy: From 06708353ad9cfc3261fcbfdf456c34a1bbc440f3 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:05:06 +0200 Subject: [PATCH 20/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20remove=20redundant=20working-directory=20declarations=20to?= =?UTF-8?q?=20simplify=20workflow=20steps=20=F0=9F=94=A7=20(pro-extension-?= =?UTF-8?q?test.yml):=20separate=20download=20artifacts=20steps=20for=20Ub?= =?UTF-8?q?untu,=20macOS,=20and=20Windows=20to=20improve=20clarity=20and?= =?UTF-8?q?=20organization=20=F0=9F=94=A7=20(pro-extension-test.yml):=20re?= =?UTF-8?q?factor=20artifact=20handling=20to=20create=20separate=20directo?= =?UTF-8?q?ries=20for=20Linux,=20Windows,=20and=20macOS=20artifacts=20and?= =?UTF-8?q?=20generate=20a=20combined=20artifact=20for=20liquibase=20check?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 27 +++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index e77403f1..7286aa73 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -286,31 +286,26 @@ jobs: path: ./target - name: Run extra command - working-directory: ${{ inputs.modulePath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} - name: Run extra Linux command - working-directory: ${{ inputs.modulePath }} if: inputs.extraLinuxCommand != '' && runner.os == 'Linux' run: | ${{ inputs.extraLinuxCommand }} - name: Run extra Windows command - working-directory: ${{ inputs.modulePath }} if: inputs.extraWindowsCommand != '' && runner.os == 'Windows' run: | ${{ inputs.extraWindowsCommand }} - name: Run Tests - working-directory: ${{ inputs.modulePath }} if: ${{ !inputs.nightly }} run: | mvn -B test -P '${{ inputs.mavenProfiles }}' "${{ inputs.extraMavenArgs }}" - name: Run Tests - working-directory: ${{ inputs.modulePath }} if: ${{ inputs.nightly }} run: mvn -B test -P '${{ inputs.mavenProfiles }}' "${{ inputs.extraMavenArgs }}" "-Dliquibase.version=master-SNAPSHOT" @@ -345,19 +340,19 @@ jobs: - uses: actions/checkout@v4 - - name: Download Artifacts + - name: Download Ubuntu Artifacts uses: actions/download-artifact@v2 with: name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-${{needs.build.outputs.artifact_version}}-artifacts path: /tmp/ubuntu - - name: Download Artifacts + - name: Download macOS Artifacts uses: actions/download-artifact@v2 with: name: ${{needs.build.outputs.artifact_id}}-macos-latest-${{needs.build.outputs.artifact_version}}-artifacts path: /tmp/macos - - name: Download Artifacts + - name: Download Windows Artifacts uses: actions/download-artifact@v2 with: name: ${{needs.build.outputs.artifact_id}}-windows-latest-${{needs.build.outputs.artifact_version}}-artifacts @@ -372,6 +367,22 @@ jobs: cd combined jar -cfm ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar MANIFEST.MF ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-ubuntu.jar ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-macos.jar ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-windows.jar + rm -r -f /combined/linux /combined/windows /combined/mac + mkdir -p /combined/linux /combined/windows /combined/mac + unzip -d /combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + unzip -d /combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + unzip -d /combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + rm -r -f /tmp/liquibase-checks + mkdir /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}} + cp -a /combined/linux/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /combined/windows/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /combined/mac/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + rm /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /combined/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /combined/mac/vfs/fileslist.txt > /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + rm -f /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar + cd /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * + - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: From 5e718124b0a00bad3fa258e0370b0a2efabd50d6 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:05:53 +0200 Subject: [PATCH 21/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20remove=20unnecessary=20jar=20creation=20and=20copying=20step?= =?UTF-8?q?s=20and=20update=20directory=20creation=20and=20extraction=20st?= =?UTF-8?q?eps=20to=20improve=20workflow=20efficiency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 7286aa73..a6be20f2 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -360,13 +360,6 @@ jobs: - name: Create multiplatform jar run: | - mkdir -p combined - cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar ./combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-ubuntu.jar - cp /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar ./combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-macos.jar - cp /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar ./combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-windows.jar - cd combined - jar -cfm ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar MANIFEST.MF ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-ubuntu.jar ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-macos.jar ${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-windows.jar - rm -r -f /combined/linux /combined/windows /combined/mac mkdir -p /combined/linux /combined/windows /combined/mac unzip -d /combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar From 0adb67c28c52d3b3df67782f3639051830cdefc0 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:07:54 +0200 Subject: [PATCH 22/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20fix=20incorrect=20flag=20usage=20in=20'rm'=20command=20to=20?= =?UTF-8?q?remove=20directories=20=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20fix=20incorrect=20directory=20name=20in=20'rm'=20command=20t?= =?UTF-8?q?o=20remove=20liquibase-checks=20=F0=9F=94=A7=20(pro-extension-t?= =?UTF-8?q?est.yml):=20fix=20incorrect=20file=20path=20in=20'cat'=20comman?= =?UTF-8?q?d=20to=20combine=20fileslist.txt=20=F0=9F=94=A7=20(pro-extensio?= =?UTF-8?q?n-test.yml):=20fix=20incorrect=20directory=20name=20in=20'zip'?= =?UTF-8?q?=20command=20to=20create=20liquibase-checks=20jar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index a6be20f2..1754c06a 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -360,18 +360,18 @@ jobs: - name: Create multiplatform jar run: | - rm -r -f /combined/linux /combined/windows /combined/mac + rm -rf /combined/linux /combined/windows /combined/mac mkdir -p /combined/linux /combined/windows /combined/mac unzip -d /combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - rm -r -f /tmp/liquibase-checks + rm -r -f /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}} mkdir /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}} cp -a /combined/linux/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ cp -a /combined/windows/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ cp -a /combined/mac/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ rm /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /combined/linux/vfs/fileslist.txt /tmp/windows/vfs/fileslist.txt /combined/mac/vfs/fileslist.txt > /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /combined/linux/vfs/fileslist.txt /combined/windows/vfs/fileslist.txt /combined/mac/vfs/fileslist.txt > /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt rm -f /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar cd /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * From df7fc4b04ec03de60099dcfb6b4e5ec04c0d6408 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:11:12 +0200 Subject: [PATCH 23/71] =?UTF-8?q?=F0=9F=90=9B=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20fix=20incorrect=20paths=20for=20liquibase-c?= =?UTF-8?q?hecks=20directory=20and=20files=20to=20ensure=20proper=20file?= =?UTF-8?q?=20operations=20and=20artifact=20creation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 1754c06a..584e65e1 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -365,15 +365,15 @@ jobs: unzip -d /combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - rm -r -f /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}} - mkdir /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}} - cp -a /combined/linux/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /combined/windows/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /combined/mac/* /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - rm /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + rm -r -f /combined/liquibase-checks-${{needs.build.outputs.artifact_version}} + mkdir /combined/liquibase-checks-${{needs.build.outputs.artifact_version}} + cp -a /combined/linux/* /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /combined/windows/* /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /combined/mac/* /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + rm /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt cat /combined/linux/vfs/fileslist.txt /combined/windows/vfs/fileslist.txt /combined/mac/vfs/fileslist.txt > /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar - cd /tmp/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + rm -f /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar + cd /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact From 04c744d0f28fb48d673bd011bc9d1e031d577fe8 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:15:43 +0200 Subject: [PATCH 24/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20Change=20directory=20paths=20to=20use=20/tm?= =?UTF-8?q?p=20folder=20for=20creating=20multiplatform=20jar=20to=20avoid?= =?UTF-8?q?=20conflicts=20with=20existing=20files=20and=20improve=20organi?= =?UTF-8?q?zation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 584e65e1..c47536f7 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -360,20 +360,20 @@ jobs: - name: Create multiplatform jar run: | - rm -rf /combined/linux /combined/windows /combined/mac - mkdir -p /combined/linux /combined/windows /combined/mac - unzip -d /combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - unzip -d /combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - unzip -d /combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - rm -r -f /combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - mkdir /combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - cp -a /combined/linux/* /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /combined/windows/* /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /combined/mac/* /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - rm /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /combined/linux/vfs/fileslist.txt /combined/windows/vfs/fileslist.txt /combined/mac/vfs/fileslist.txt > /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar - cd /combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + rm -rf /tmp/combined/linux /tmp/combined/windows /tmp/combined/mac + mkdir -p /tmp/combined/linux /tmp/combined/windows /tmp/combined/mac + unzip -d /tmp/combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + rm -r -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} + mkdir /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} + cp -a /tmp/combined/linux/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/windows/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/mac/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/linux/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar + cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact From 0072b28352133400195478cc4a44ffad3598e30e Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:28:23 +0200 Subject: [PATCH 25/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20add=20debug=20commands=20to=20list=20conten?= =?UTF-8?q?ts=20of=20/tmp=20directory=20for=20troubleshooting=20purposes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index c47536f7..35d0e1c7 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -360,6 +360,10 @@ jobs: - name: Create multiplatform jar run: | + ls -ltr /tmp + ls -ltr /tmp/ubuntu + ls -ltr /tmp/macos + ls -ltr /tmp/windows rm -rf /tmp/combined/linux /tmp/combined/windows /tmp/combined/mac mkdir -p /tmp/combined/linux /tmp/combined/windows /tmp/combined/mac unzip -d /tmp/combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar From 183b431e67b93a079396545fac02548c1e2eb19c Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:43:35 +0200 Subject: [PATCH 26/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/extensi?= =?UTF-8?q?on-attach-artifact-release.yml):=20add=20combineJars=20option?= =?UTF-8?q?=20to=20specify=20combining=20jars=20into=20one=20for=20artifac?= =?UTF-8?q?t=20release=20workflow=20=F0=9F=94=A7=20(.github/workflows/pro-?= =?UTF-8?q?extension-test.yml):=20remove=20redundant=20working-directory?= =?UTF-8?q?=20settings=20in=20job=20steps=20to=20improve=20workflow=20read?= =?UTF-8?q?ability=20=F0=9F=94=A7=20(.github/workflows/pro-extension-test.?= =?UTF-8?q?yml):=20update=20paths=20to=20combine=20artifacts=20based=20on?= =?UTF-8?q?=20the=20operating=20system=20for=20better=20organization=20and?= =?UTF-8?q?=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 5 +++++ .github/workflows/pro-extension-test.yml | 14 +++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 633e806a..860eb768 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -18,6 +18,11 @@ on: required: false default: "" type: string + combineJars: + description: 'Specify it if you want to combine jars into one' + required: false + default: false + type: boolean secrets: BOT_TOKEN: description: 'BOT_TOKEN from the caller workflow' diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 35d0e1c7..f7cf0e25 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -152,19 +152,16 @@ jobs: ] - name: Run extra command - working-directory: ${{ inputs.modulePath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} - name: Run extra Linux command - working-directory: ${{ inputs.modulePath }} if: inputs.extraLinuxCommand != '' run: | ${{ inputs.extraLinuxCommand }} - name: Build and Package latest liquibase version - working-directory: ${{ inputs.modulePath }} if: ${{ inputs.nightly }} run: mvn -B dependency:go-offline clean package -DskipTests=true "-Dliquibase.version=master-SNAPSHOT" @@ -182,7 +179,6 @@ jobs: SLACK_LINK_NAMES: true - name: Build and Package - working-directory: ${{ inputs.modulePath }} if: ${{ !inputs.nightly }} run: mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} @@ -364,18 +360,18 @@ jobs: ls -ltr /tmp/ubuntu ls -ltr /tmp/macos ls -ltr /tmp/windows - rm -rf /tmp/combined/linux /tmp/combined/windows /tmp/combined/mac - mkdir -p /tmp/combined/linux /tmp/combined/windows /tmp/combined/mac - unzip -d /tmp/combined/linux /tmp/linux/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar rm -r -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} mkdir /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - cp -a /tmp/combined/linux/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/ubuntu/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ cp -a /tmp/combined/windows/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ cp -a /tmp/combined/mac/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/linux/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * From 2e141fc3c5836461660d4d34fd6be3f664bdc48c Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:55:12 +0200 Subject: [PATCH 27/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20remove=20unused=20modulePath=20input=20and?= =?UTF-8?q?=20update=20artifactPath=20to=20include=20target=20directory=20?= =?UTF-8?q?for=20artifacts=20gathering.=20Update=20working-directory=20for?= =?UTF-8?q?=20Get=20Artifact=20ID=20and=20Get=20Artifact=20Version=20steps?= =?UTF-8?q?=20to=20use=20artifactPath=20instead=20of=20modulePath.=20Updat?= =?UTF-8?q?e=20path=20for=20Save=20Artifacts=20step=20to=20include=20targe?= =?UTF-8?q?t=20directory.=20Update=20path=20for=20Save=20Event=20File=20an?= =?UTF-8?q?d=20Save=20Multiplatform=20Artifacts=20steps=20to=20include=20a?= =?UTF-8?q?ll=20files=20in=20the=20specified=20artifactPath.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index f7cf0e25..f924ac07 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -51,11 +51,6 @@ on: artifactPath: description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." required: false - default: "target/*" - type: string - modulePath: - description: "Specify the path to the module that should be built. Useful for multi-module extensions." - required: false default: "." type: string combineJars: @@ -183,12 +178,12 @@ jobs: run: mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} - name: Get Artifact ID - working-directory: ${{ inputs.modulePath }} + working-directory: ${{ inputs.artifactPath }} id: get-artifact-id run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" - name: Get Artifact Version - working-directory: ${{ inputs.modulePath }} + working-directory: ${{ inputs.artifactPath }} id: get-artifact-version run: echo "::set-output name=artifact_version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" @@ -197,7 +192,7 @@ jobs: with: name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ steps.get-artifact-version.outputs.artifact_version }}-artifacts path: | - ${{ inputs.artifactPath }} + ${{ inputs.artifactPath }}/target/* - name: Save Event File uses: actions/upload-artifact@v3 @@ -381,7 +376,7 @@ jobs: with: name: multiplatform-artifacts path: | - ${{ inputs.artifactPath }} + ${{ inputs.artifactPath }}/* sonar-pr: if: ${{ !inputs.nightly }} From 821c1e9c27a4505c532c5dd5840206b6e0546ce6 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 10:59:01 +0200 Subject: [PATCH 28/71] =?UTF-8?q?=F0=9F=93=9D=20(.github/workflows/extensi?= =?UTF-8?q?on-attach-artifact-release.yml):=20add=20new=20input=20fields?= =?UTF-8?q?=20for=20os,=20extraMavenArgs,=20and=20artifactPath=20to=20prov?= =?UTF-8?q?ide=20more=20flexibility=20and=20customization=20options=20for?= =?UTF-8?q?=20the=20workflow.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 860eb768..397495d1 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -18,6 +18,21 @@ on: required: false default: "" type: string + os: + description: "Operating system to build/test on" + required: false + default: '["ubuntu-latest", "windows-latest"]' + type: string + extraMavenArgs: + description: "Specify it if you want to run an extra maven argument" + required: false + default: "" + type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string combineJars: description: 'Specify it if you want to combine jars into one' required: false From 2bae1835ada5814ffcdfe5b31cbe137f9b7e78f9 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:05:00 +0200 Subject: [PATCH 29/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Update=20file=20to=20use=20'macos'=20instead?= =?UTF-8?q?=20of=20'mac'=20for=20consistency=20=F0=9F=94=A7=20(pro-extensi?= =?UTF-8?q?on-test.yml):=20Update=20file=20to=20use=20'macos'=20instead=20?= =?UTF-8?q?of=20'mac'=20for=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 180 ++++++++++++++++++ .github/workflows/pro-extension-test.yml | 8 +- 2 files changed, 184 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 397495d1..736b16e5 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -50,6 +50,186 @@ on: required: true jobs: + + build-multi-architecture: + strategy: + fail-fast: false + matrix: + os: ${{fromJson(inputs.os || '["ubuntu-latest"]')}} + name: Build & Package - ${{ matrix.os }} + if: ${{ inputs.combineJars }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: "temurin" + cache: "maven" + + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: ${{ env.MAVEN_VERSION }} + + # look for dependencies in maven + - name: maven-settings-xml-action + uses: whelk-io/maven-settings-xml-action@v21 + with: + repositories: | + [ + { + "id": "liquibase", + "url": "https://maven.pkg.github.com/liquibase/liquibase", + "releases": { + "enabled": "true" + }, + "snapshots": { + "enabled": "true", + "updatePolicy": "always" + } + }, + { + "id": "liquibase-pro", + "url": "https://maven.pkg.github.com/liquibase/liquibase-pro", + "releases": { + "enabled": "true" + }, + "snapshots": { + "enabled": "true", + "updatePolicy": "always" + } + } + ] + servers: | + [ + { + "id": "liquibase-pro", + "username": "liquibot", + "password": "${{ secrets.LIQUIBOT_PAT }}" + }, + { + "id": "liquibase", + "username": "liquibot", + "password": "${{ secrets.LIQUIBOT_PAT }}" + } + ] + + - name: Run extra command + if: inputs.extraCommand != '' + run: | + ${{ inputs.extraCommand }} + + - name: Run extra Linux command + if: inputs.extraLinuxCommand != '' + run: | + ${{ inputs.extraLinuxCommand }} + + - name: Build and Package latest liquibase version + if: ${{ inputs.nightly }} + run: mvn -B dependency:go-offline clean package -DskipTests=true "-Dliquibase.version=master-SNAPSHOT" + + - name: Notify Slack on Build Failure + if: ${{ failure() && inputs.nightly }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: ${{ job.status }} + SLACK_MESSAGE: "View details on GitHub Actions: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} <@U042HRTL4DT>" + SLACK_TITLE: "❌ ${{ github.repository }} ❌ Build failed on branch ${{ github.ref }} for commit ${{ github.sha }} in repository ${{github.repository}}" + SLACK_USERNAME: liquibot + SLACK_WEBHOOK: ${{ secrets.NIGHTLY_BUILDS_SLACK_WEBHOOK }} + SLACK_ICON_EMOJI: ":robot_face:" + SLACK_FOOTER: "${{ github.repository }}" + SLACK_LINK_NAMES: true + + - name: Build and Package + if: ${{ !inputs.nightly }} + run: mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} + + - name: Get Artifact ID + working-directory: ${{ inputs.artifactPath }} + id: get-artifact-id + run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" + + - name: Get Artifact Version + working-directory: ${{ inputs.artifactPath }} + id: get-artifact-version + run: echo "::set-output name=artifact_version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" + + - name: Save Artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-${{ matrix.os }}-${{ steps.get-artifact-version.outputs.artifact_version }}-artifacts + path: | + ${{ inputs.artifactPath }}/target/* + + - name: Save Event File + uses: actions/upload-artifact@v3 + with: + name: Event File + path: ${{ github.event_path }} + outputs: + artifact_id: ${{ steps.get-artifact-id.outputs.artifact_id }} + artifact_version: ${{ steps.get-artifact-version.outputs.artifact_version }} + + combineJars: + needs: [ build-multi-architecture ] + if: ${{ inputs.combineJars }} + name: Combine Jars + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v4 + + - name: Download Ubuntu Artifacts + uses: actions/download-artifact@v2 + with: + name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-${{needs.build.outputs.artifact_version}}-artifacts + path: /tmp/ubuntu + + - name: Download macOS Artifacts + uses: actions/download-artifact@v2 + with: + name: ${{needs.build.outputs.artifact_id}}-macos-latest-${{needs.build.outputs.artifact_version}}-artifacts + path: /tmp/macos + + - name: Download Windows Artifacts + uses: actions/download-artifact@v2 + with: + name: ${{needs.build.outputs.artifact_id}}-windows-latest-${{needs.build.outputs.artifact_version}}-artifacts + path: /tmp/windows + + - name: Create multiplatform jar + run: | + ls -ltr /tmp + ls -ltr /tmp/ubuntu + ls -ltr /tmp/macos + ls -ltr /tmp/windows + rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + rm -r -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} + mkdir /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} + cp -a /tmp/combined/ubuntu/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/windows/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/mac/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar + cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * + + - name: Upload multiplatform artifact + uses: actions/upload-artifact@v3 + with: + name: multiplatform-artifacts + path: | + ${{ inputs.artifactPath }}/* + attach-to-release: name: Attach Artifact to Release runs-on: ubuntu-latest diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index f924ac07..c6413cad 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -355,8 +355,8 @@ jobs: ls -ltr /tmp/ubuntu ls -ltr /tmp/macos ls -ltr /tmp/windows - rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac - mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos + mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar @@ -364,9 +364,9 @@ jobs: mkdir /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} cp -a /tmp/combined/ubuntu/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ cp -a /tmp/combined/windows/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/mac/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/macos/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/macos/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * From 2196199ac49e152296540cd7108e2a31de693a86 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:24:15 +0200 Subject: [PATCH 30/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/extensi?= =?UTF-8?q?on-attach-artifact-release.yml):=20configure=20Git=20user=20nam?= =?UTF-8?q?e=20and=20email=20for=20actions=20to=20be=20performed=20by=20'l?= =?UTF-8?q?iquibot'=20=E2=99=BB=EF=B8=8F=20(.github/workflows/extension-at?= =?UTF-8?q?tach-artifact-release.yml):=20refactor=20the=20build=20and=20pa?= =?UTF-8?q?ckage=20step=20to=20include=20release=20preparation=20and=20cle?= =?UTF-8?q?an=20up=20=E2=9C=A8=20(.github/workflows/extension-attach-artif?= =?UTF-8?q?act-release.yml):=20add=20support=20for=20downloading=20multiar?= =?UTF-8?q?chitecture=20release=20artifacts=20if=20combining=20jars=20?= =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/pro-extension-test.yml):=20up?= =?UTF-8?q?date=20path=20for=20multiplatform=20artifacts=20to=20be=20consi?= =?UTF-8?q?stent=20with=20changes=20in=20extension-attach-artifact-release?= =?UTF-8?q?.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 39 +++++++++---------- .github/workflows/pro-extension-test.yml | 2 +- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 736b16e5..e6e8d110 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -117,6 +117,11 @@ jobs: } ] + - name: Configure Git + run: | + git config user.name "liquibot" + git config user.email "liquibot@liquibase.org" + - name: Run extra command if: inputs.extraCommand != '' run: | @@ -127,26 +132,11 @@ jobs: run: | ${{ inputs.extraLinuxCommand }} - - name: Build and Package latest liquibase version - if: ${{ inputs.nightly }} - run: mvn -B dependency:go-offline clean package -DskipTests=true "-Dliquibase.version=master-SNAPSHOT" - - - name: Notify Slack on Build Failure - if: ${{ failure() && inputs.nightly }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_COLOR: ${{ job.status }} - SLACK_MESSAGE: "View details on GitHub Actions: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} <@U042HRTL4DT>" - SLACK_TITLE: "❌ ${{ github.repository }} ❌ Build failed on branch ${{ github.ref }} for commit ${{ github.sha }} in repository ${{github.repository}}" - SLACK_USERNAME: liquibot - SLACK_WEBHOOK: ${{ secrets.NIGHTLY_BUILDS_SLACK_WEBHOOK }} - SLACK_ICON_EMOJI: ":robot_face:" - SLACK_FOOTER: "${{ github.repository }}" - SLACK_LINK_NAMES: true - - name: Build and Package - if: ${{ !inputs.nightly }} - run: mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} + run: | + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' + git reset HEAD~ --hard + mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} - name: Get Artifact ID working-directory: ${{ inputs.artifactPath }} @@ -228,7 +218,7 @@ jobs: with: name: multiplatform-artifacts path: | - ${{ inputs.artifactPath }}/* + /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/* attach-to-release: name: Attach Artifact to Release @@ -334,13 +324,20 @@ jobs: fi - name: Build release artifacts - if: env.ARTIFACT_FOUND == '0' + if: env.ARTIFACT_FOUND == '0' && !inputs.combineJars id: build-release-artifacts run: | mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' git reset HEAD~ --hard mvn clean install -DskipTests -P '${{ inputs.mavenProfiles }}' + - name: Download multiarchitecture release artifacts + if: inputs.combineJars + uses: actions/download-artifact@v2 + with: + name: multiplatform-artifacts + path: ./target + - name: Get latest draft release ID id: get-release run: | diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index c6413cad..29836c1c 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -376,7 +376,7 @@ jobs: with: name: multiplatform-artifacts path: | - ${{ inputs.artifactPath }}/* + /tmp/combined/* sonar-pr: if: ${{ !inputs.nightly }} From 323daaeccaa28095c0f27e4b641a52e278ccef9a Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:27:01 +0200 Subject: [PATCH 31/71] =?UTF-8?q?=F0=9F=90=9B=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20update=20artifact=20path=20to=20include=20all?= =?UTF-8?q?=20files=20in=20/tmp/combined=20directory=20instead=20of=20spec?= =?UTF-8?q?ific=20versioned=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index e6e8d110..70797b7a 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -218,7 +218,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/* + /tmp/combined/* attach-to-release: name: Attach Artifact to Release From 4f71177db210bcee3f235ebb3285826d0b1318a6 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:49:59 +0200 Subject: [PATCH 32/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Fix=20artifact=20naming=20issue=20in=20zip=20c?= =?UTF-8?q?ommand=20to=20include=20correct=20version=20number=20?= =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact-release.yml):=20Updat?= =?UTF-8?q?e=20artifact=20path=20to=20only=20include=20the=20specific=20ja?= =?UTF-8?q?r=20file=20=F0=9F=94=A7=20(pro-extension-test.yml):=20Fix=20art?= =?UTF-8?q?ifact=20naming=20issue=20in=20zip=20command=20to=20include=20co?= =?UTF-8?q?rrect=20version=20number=20=F0=9F=94=A7=20(pro-extension-test.y?= =?UTF-8?q?ml):=20Update=20artifact=20path=20to=20only=20include=20the=20s?= =?UTF-8?q?pecific=20jar=20file=20=F0=9F=94=A7=20(sonar-pull-request.yml):?= =?UTF-8?q?=20Add=20ability=20to=20specify=20the=20path=20to=20the=20artif?= =?UTF-8?q?acts=20to=20be=20attached=20to=20the=20build=20for=20multi-modu?= =?UTF-8?q?le=20extensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 6 +++--- .github/workflows/pro-extension-test.yml | 8 +++++--- .github/workflows/sonar-pull-request.yml | 7 +++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 70797b7a..65b9daf0 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -209,16 +209,16 @@ jobs: cp -a /tmp/combined/mac/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar + rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * + zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: name: multiplatform-artifacts path: | - /tmp/combined/* + /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar attach-to-release: name: Attach Artifact to Release diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 29836c1c..2cc30c78 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -367,16 +367,16 @@ jobs: cp -a /tmp/combined/macos/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/macos/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}.jar + rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}.jar * + zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: name: multiplatform-artifacts path: | - /tmp/combined/* + /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar sonar-pr: if: ${{ !inputs.nightly }} @@ -385,3 +385,5 @@ jobs: secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} + artifactPath: ${{ inputs.artifactPath }} + diff --git a/.github/workflows/sonar-pull-request.yml b/.github/workflows/sonar-pull-request.yml index 862a6acf..a5dc4972 100644 --- a/.github/workflows/sonar-pull-request.yml +++ b/.github/workflows/sonar-pull-request.yml @@ -8,6 +8,11 @@ on: required: false default: '' type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string secrets: SONAR_TOKEN: description: 'SONAR_TOKEN from the caller workflow' @@ -86,6 +91,7 @@ jobs: restore-keys: ${{ runner.os }}-sonar - name: Run extra command + working-directory: ${{ inputs.artifactPath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} @@ -100,6 +106,7 @@ jobs: name: test-reports-jdk-17-ubuntu-latest - name: Sonar Scan + working-directory: ${{ inputs.artifactPath }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From cd543faa276687ffcde441ec2176132ebb40f62a Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:51:48 +0200 Subject: [PATCH 33/71] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(pro-extension-test.?= =?UTF-8?q?yml):=20upgrade=20sonar-pull-request.yml=20workflow=20to=20vers?= =?UTF-8?q?ion=20DAT-18141=20to=20include=20specific=20changes=20and=20imp?= =?UTF-8?q?rovements=20for=20SonarQube=20integration.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 2cc30c78..621c3840 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -381,7 +381,7 @@ jobs: sonar-pr: if: ${{ !inputs.nightly }} needs: [unit-test] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.7.8 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@DAT-18141 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} From e8b693d8e220593747589ab4c0427be570bdeb2f Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:55:33 +0200 Subject: [PATCH 34/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Refactor=20artifact=20creation=20and=20upload?= =?UTF-8?q?=20process=20to=20use=20a=20more=20consistent=20naming=20conven?= =?UTF-8?q?tion=20and=20improve=20file=20organization=20=F0=9F=94=A7=20(pr?= =?UTF-8?q?o-extension-test.yml):=20Refactor=20artifact=20creation=20and?= =?UTF-8?q?=20upload=20process=20to=20use=20a=20more=20consistent=20naming?= =?UTF-8?q?=20convention=20and=20improve=20file=20organization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 26 +++++++--------- .github/workflows/pro-extension-test.yml | 30 ++++++++----------- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 65b9daf0..f2721e36 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -193,32 +193,28 @@ jobs: - name: Create multiplatform jar run: | - ls -ltr /tmp - ls -ltr /tmp/ubuntu - ls -ltr /tmp/macos - ls -ltr /tmp/windows rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - rm -r -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - mkdir /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - cp -a /tmp/combined/ubuntu/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/windows/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/mac/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar - cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar * + rm -r -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} + mkdir /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} + cp -a /tmp/combined/ubuntu/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/windows/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/mac/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + rm /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + rm -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + cd /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + zip -r ../${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: name: multiplatform-artifacts path: | - /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar attach-to-release: name: Attach Artifact to Release diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 621c3840..c0eda4e9 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -351,32 +351,28 @@ jobs: - name: Create multiplatform jar run: | - ls -ltr /tmp - ls -ltr /tmp/ubuntu - ls -ltr /tmp/macos - ls -ltr /tmp/windows - rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos - mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos + rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - rm -r -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - mkdir /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}} - cp -a /tmp/combined/ubuntu/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/windows/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/macos/* /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - rm /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/macos/vfs/fileslist.txt > /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar - cd /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}/ - zip -r ../liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar * + rm -r -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} + mkdir /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} + cp -a /tmp/combined/ubuntu/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/windows/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/mac/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + rm /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + rm -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + cd /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + zip -r ../${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: name: multiplatform-artifacts path: | - /tmp/combined/liquibase-checks-${{needs.build.outputs.artifact_version}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar sonar-pr: if: ${{ !inputs.nightly }} From 741f34efd01280c548300de7f9e1bd81a26fe797 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 11:57:19 +0200 Subject: [PATCH 35/71] =?UTF-8?q?=E2=9C=A8=20(extension-attach-artifact-re?= =?UTF-8?q?lease.yml):=20add=20dependency=20on=20combineJars=20job=20to=20?= =?UTF-8?q?ensure=20it=20runs=20before=20attaching=20artifact=20to=20relea?= =?UTF-8?q?se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index f2721e36..df47d0d4 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -218,6 +218,7 @@ jobs: attach-to-release: name: Attach Artifact to Release + needs: [ combineJars ] runs-on: ubuntu-latest steps: - run: sleep 30 From b0ba15af8b2d4aa67dd24c5e6ee5d8e53e346728 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 12:02:28 +0200 Subject: [PATCH 36/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20change=20working=20directory=20to=20the=20spec?= =?UTF-8?q?ified=20artifact=20path=20before=20running=20the=20build=20and?= =?UTF-8?q?=20package=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index df47d0d4..81203974 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -133,6 +133,7 @@ jobs: ${{ inputs.extraLinuxCommand }} - name: Build and Package + working-directory: ${{ inputs.artifactPath }} run: | mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' git reset HEAD~ --hard From e0290df7216548555586ab16e155d8382e31243a Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 12:06:44 +0200 Subject: [PATCH 37/71] =?UTF-8?q?=F0=9F=90=9B=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20fix=20issue=20with=20release=20build=20command?= =?UTF-8?q?=20by=20adding=20checkModificationExcludeList=20parameter=20to?= =?UTF-8?q?=20prevent=20unnecessary=20changes=20during=20release=20prepara?= =?UTF-8?q?tion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 81203974..7896114f 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -135,7 +135,7 @@ jobs: - name: Build and Package working-directory: ${{ inputs.artifactPath }} run: | - mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DcheckModificationExcludeList=** -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' git reset HEAD~ --hard mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} From 608a59b1225523aaa4138f2999721155c8d13dd4 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 12:16:58 +0200 Subject: [PATCH 38/71] =?UTF-8?q?=F0=9F=90=9B=20(.github/workflows/pro-ext?= =?UTF-8?q?ension-test.yml):=20fix=20file=20paths=20for=20macOS=20director?= =?UTF-8?q?y=20to=20match=20the=20correct=20naming=20convention?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index c0eda4e9..b5005924 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -351,8 +351,8 @@ jobs: - name: Create multiplatform jar run: | - rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac - mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos + mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar @@ -360,9 +360,9 @@ jobs: mkdir /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} cp -a /tmp/combined/ubuntu/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ cp -a /tmp/combined/windows/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/mac/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp -a /tmp/combined/macos/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ rm /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/macos/vfs/fileslist.txt > /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt rm -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar cd /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ zip -r ../${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar * From 49bc040e41f1cb7778efe3c2b8f1dd87e0772c36 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 12:31:01 +0200 Subject: [PATCH 39/71] =?UTF-8?q?=F0=9F=90=9B=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20fix=20issue=20with=20Maven=20command=20by=20ad?= =?UTF-8?q?ding=20ignoreSnapshots=3Dtrue=20flag=20to=20prevent=20snapshot?= =?UTF-8?q?=20dependencies=20from=20being=20released?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 7896114f..11faec30 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -135,7 +135,7 @@ jobs: - name: Build and Package working-directory: ${{ inputs.artifactPath }} run: | - mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DcheckModificationExcludeList=** -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DcheckModificationExcludeList=** -DignoreSnapshots=true -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' git reset HEAD~ --hard mvn -B dependency:go-offline clean package -DskipTests=true ${{ inputs.extraMavenArgs }} From 326978b811662a1f42a70b0b4c36d2dbf38f0689 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 13:10:50 +0200 Subject: [PATCH 40/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/extensi?= =?UTF-8?q?on-attach-artifact-release.yml):=20update=20artifact=20referenc?= =?UTF-8?q?es=20to=20use=20needs.build-multi-architecture=20outputs=20for?= =?UTF-8?q?=20multi-architecture=20support=20and=20improve=20artifact=20na?= =?UTF-8?q?ming=20consistency.=20Add=20additional=20artifact=20files=20to?= =?UTF-8?q?=20be=20uploaded=20for=20the=20multiplatform=20artifact.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 11faec30..355a3a57 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -177,45 +177,52 @@ jobs: - name: Download Ubuntu Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-ubuntu-latest-${{needs.build.outputs.artifact_version}}-artifacts + name: ${{needs.build-multi-architecture.outputs.artifact_id}}-ubuntu-latest-${{needs.build-multi-architecture.outputs.artifact_version}}-artifacts path: /tmp/ubuntu - name: Download macOS Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-macos-latest-${{needs.build.outputs.artifact_version}}-artifacts + name: ${{needs.build-multi-architecture.outputs.artifact_id}}-macos-latest-${{needs.build-multi-architecture.outputs.artifact_version}}-artifacts path: /tmp/macos - name: Download Windows Artifacts uses: actions/download-artifact@v2 with: - name: ${{needs.build.outputs.artifact_id}}-windows-latest-${{needs.build.outputs.artifact_version}}-artifacts + name: ${{needs.build-multi-architecture.outputs.artifact_id}}-windows-latest-${{needs.build-multi-architecture.outputs.artifact_version}}-artifacts path: /tmp/windows - name: Create multiplatform jar run: | rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac - unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - unzip -d /tmp/combined/windows /tmp/windows/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - unzip -d /tmp/combined/macos /tmp/macos/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - rm -r -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} - mkdir /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}} - cp -a /tmp/combined/ubuntu/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/windows/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - cp -a /tmp/combined/mac/* /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - rm /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/vfs/fileslist.txt - rm -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - cd /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - zip -r ../${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar * + unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + unzip -d /tmp/combined/windows /tmp/windows/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + unzip -d /tmp/combined/macos /tmp/macos/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + rm -r -f /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}} + mkdir /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}} + cp -a /tmp/combined/ubuntu/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cp -a /tmp/combined/windows/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cp -a /tmp/combined/mac/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + rm /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt + rm -f /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cd /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + zip -r ../${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar * + - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom attach-to-release: name: Attach Artifact to Release From 87d3af0bc0adcf72799e8dd6c6d5f58bd7058a8e Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 13:30:21 +0200 Subject: [PATCH 41/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20change=20'mac'=20directory=20to=20'macos'=20fo?= =?UTF-8?q?r=20consistency=20with=20other=20platforms.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 355a3a57..e25406cf 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -194,8 +194,8 @@ jobs: - name: Create multiplatform jar run: | - rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac - mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/mac + rm -rf /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos + mkdir -p /tmp/combined/ubuntu /tmp/combined/windows /tmp/combined/macos unzip -d /tmp/combined/ubuntu /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar unzip -d /tmp/combined/windows /tmp/windows/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar unzip -d /tmp/combined/macos /tmp/macos/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar @@ -203,9 +203,9 @@ jobs: mkdir /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}} cp -a /tmp/combined/ubuntu/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ cp -a /tmp/combined/windows/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ - cp -a /tmp/combined/mac/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cp -a /tmp/combined/macos/* /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ rm /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt - cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/mac/vfs/fileslist.txt > /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt + cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/macos/vfs/fileslist.txt > /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt rm -f /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ From 15683156d09cd806c88625880907eefdad756170 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 13:46:44 +0200 Subject: [PATCH 42/71] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(extension-attach-ar?= =?UTF-8?q?tifact-release.yml):=20Upgrade=20setup-maven=20action=20to=20ve?= =?UTF-8?q?rsion=205=20and=20maven-settings-xml-action=20to=20version=2022?= =?UTF-8?q?=20for=20better=20compatibility=20and=20features=20=E2=AC=86?= =?UTF-8?q?=EF=B8=8F=20(pro-extension-test.yml):=20Upgrade=20setup-maven?= =?UTF-8?q?=20action=20to=20version=205=20and=20maven-settings-xml-action?= =?UTF-8?q?=20to=20version=2022=20for=20better=20compatibility=20and=20fea?= =?UTF-8?q?tures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 7 ++++--- .github/workflows/pro-extension-test.yml | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index e25406cf..89b2ad1b 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -70,13 +70,13 @@ jobs: cache: "maven" - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 + uses: stCarolas/setup-maven@v5 with: maven-version: ${{ env.MAVEN_VERSION }} # look for dependencies in maven - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v21 + uses: whelk-io/maven-settings-xml-action@v22 with: repositories: | [ @@ -241,7 +241,7 @@ jobs: # look for dependencies in maven - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v21 + uses: whelk-io/maven-settings-xml-action@v22 with: repositories: | [ @@ -297,6 +297,7 @@ jobs: git config user.email "liquibot@liquibase.org" - name: Get Artifact ID + working-directory: ${{ inputs.artifactPath }} id: get-artifact-id run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index b5005924..ec75112c 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -99,13 +99,13 @@ jobs: cache: "maven" - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 + uses: stCarolas/setup-maven@v5 with: maven-version: ${{ env.MAVEN_VERSION }} # look for dependencies in maven - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v21 + uses: whelk-io/maven-settings-xml-action@v22 with: repositories: | [ @@ -224,13 +224,13 @@ jobs: cache: "maven" - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 + uses: stCarolas/setup-maven@v5 with: maven-version: ${{ env.MAVEN_VERSION }} # look for dependencies in maven - name: maven-settings-xml-action - uses: whelk-io/maven-settings-xml-action@v21 + uses: whelk-io/maven-settings-xml-action@v22 with: repositories: | [ From 307fc979db57a8d7d0d85bc0f8fff2abd974131f Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 13:50:18 +0200 Subject: [PATCH 43/71] =?UTF-8?q?=F0=9F=9A=80=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20reorganize=20zip=20command=20to=20correctly=20?= =?UTF-8?q?include=20all=20files=20in=20the=20jar=20archive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 89b2ad1b..219af8a9 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -207,11 +207,12 @@ jobs: rm /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt cat /tmp/combined/ubuntu/vfs/fileslist.txt /tmp/combined/windows/vfs/fileslist.txt /tmp/combined/macos/vfs/fileslist.txt > /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/vfs/fileslist.txt rm -f /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + cd /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + zip -r ../${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar * + cd .. cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ - cd /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ - zip -r ../${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar * - name: Upload multiplatform artifact From f3e41eca7cceffc8378af7941aba6a8979d29637 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 13:50:42 +0200 Subject: [PATCH 44/71] =?UTF-8?q?=F0=9F=93=9D=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20simplify=20artifact=20path=20configuration=20t?= =?UTF-8?q?o=20include=20all=20files=20in=20/tmp/combined=20directory=20fo?= =?UTF-8?q?r=20attachment=20to=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 219af8a9..a201db7d 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -220,10 +220,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom + /tmp/combined/* attach-to-release: name: Attach Artifact to Release From 85a73058ed774d314acf4353321580e390720f2f Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 13:53:23 +0200 Subject: [PATCH 45/71] =?UTF-8?q?=F0=9F=94=A7=20(pro-extension-test.yml):?= =?UTF-8?q?=20Update=20artifact=20copying=20logic=20to=20include=20sources?= =?UTF-8?q?,=20javadoc,=20and=20pom=20files=20in=20the=20combined=20direct?= =?UTF-8?q?ory=20for=20multiplatform=20artifacts=20upload.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index ec75112c..69807b10 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -366,13 +366,17 @@ jobs: rm -f /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar cd /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ zip -r ../${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar * + cd .. + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/* sonar-pr: if: ${{ !inputs.nightly }} From 19b723eeec19974cf26ad9f5c2378c414868e79d Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 14:10:09 +0200 Subject: [PATCH 46/71] =?UTF-8?q?=F0=9F=93=9D=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20update=20artifact=20path=20to=20include=20sepa?= =?UTF-8?q?rate=20jars=20for=20sources,=20javadoc,=20and=20pom=20files=20t?= =?UTF-8?q?o=20be=20attached=20to=20the=20release.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index a201db7d..219af8a9 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -220,7 +220,10 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/* + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom attach-to-release: name: Attach Artifact to Release From 01caf8d3e33d685c7f1a3cfe512e6a52944433eb Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 14:11:14 +0200 Subject: [PATCH 47/71] =?UTF-8?q?=F0=9F=93=9D=20(pro-extension-test.yml):?= =?UTF-8?q?=20update=20artifact=20path=20to=20include=20sources,=20javadoc?= =?UTF-8?q?,=20and=20pom=20files=20for=20multiplatform=20artifacts=20in=20?= =?UTF-8?q?the=20build=20process.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 69807b10..81eca94b 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -376,7 +376,10 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/* + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom sonar-pr: if: ${{ !inputs.nightly }} From 2a7938427561fe46d969a5d48d73955a16694db8 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 14:30:40 +0200 Subject: [PATCH 48/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-release-publish?= =?UTF-8?q?ed.yml):=20comment=20out=20the=20build=20release=20artifacts=20?= =?UTF-8?q?step=20to=20prevent=20unnecessary=20execution=20and=20speed=20u?= =?UTF-8?q?p=20the=20workflow.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-release-published.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 32d9cf6b..0064c4c7 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -109,12 +109,12 @@ jobs: run: | ${{ inputs.extraCommand }} - - name: Build release artifacts - id: build-release-artifacts - continue-on-error: true - run: | - mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false - git reset HEAD~ --hard + # - name: Build release artifacts + # id: build-release-artifacts + # continue-on-error: true + # run: | + # mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false + # git reset HEAD~ --hard - name: Get Artifact ID id: get-artifact-id From 094168668b6b1a4ca5a0d121e51b2d15f319b61a Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 14:42:33 +0200 Subject: [PATCH 49/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-release-prepare?= =?UTF-8?q?.yml):=20Add=20support=20for=20specifying=20the=20path=20to=20a?= =?UTF-8?q?rtifacts=20for=20multi-module=20extensions=20=F0=9F=94=A7=20(ex?= =?UTF-8?q?tension-release-published.yml):=20Add=20support=20for=20specify?= =?UTF-8?q?ing=20the=20path=20to=20artifacts=20for=20multi-module=20extens?= =?UTF-8?q?ions=20=F0=9F=94=A7=20(extension-release-rollback.yml):=20Add?= =?UTF-8?q?=20support=20for=20specifying=20the=20path=20to=20artifacts=20f?= =?UTF-8?q?or=20multi-module=20extensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-release-prepare.yml | 11 +++++++++-- .github/workflows/extension-release-published.yml | 8 +++++++- .github/workflows/extension-release-rollback.yml | 8 +++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extension-release-prepare.yml b/.github/workflows/extension-release-prepare.yml index 96e71d7b..02eabe26 100644 --- a/.github/workflows/extension-release-prepare.yml +++ b/.github/workflows/extension-release-prepare.yml @@ -8,6 +8,11 @@ on: required: false default: '' type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string permissions: contents: write @@ -89,8 +94,9 @@ jobs: ${{ inputs.extraCommand }} - name: Prepare Maven Release + working-directory: ${{ inputs.artifactPath }} run: | - mvn -B build-helper:parse-version release:clean release:prepare \ + mvn -B build-helper:parse-version release:clean release:prepare -DcheckModificationExcludeList=** -DignoreSnapshots=true \ -Darguments="-Dusername=liquibot -Dpassword=${{ secrets.BOT_TOKEN }} -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" \ -DdevelopmentVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0-SNAPSHOT -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.\${parsedVersion.incrementalVersion} \ -DcheckModificationExcludeList=pom.xml @@ -107,7 +113,8 @@ jobs: release-rollback: needs: prepare-release if: ${{ always() && contains(needs.*.result, 'failure') }} - uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.7.8 + uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@DAT-18141 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} + artifactPath: ${{ inputs.artifactPath }} diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 0064c4c7..13fb841f 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -13,6 +13,11 @@ on: required: false default: '' type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string secrets: SONATYPE_USERNAME: description: 'SONATYPE_USERNAME from the caller workflow' @@ -23,10 +28,11 @@ on: jobs: maven-release: - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.7.8 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@DAT-18141 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} + artifactPath: ${{ inputs.artifactPath }} release: runs-on: ubuntu-latest diff --git a/.github/workflows/extension-release-rollback.yml b/.github/workflows/extension-release-rollback.yml index 0d5b7875..e895ca83 100644 --- a/.github/workflows/extension-release-rollback.yml +++ b/.github/workflows/extension-release-rollback.yml @@ -8,6 +8,11 @@ on: required: false default: '' type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string permissions: contents: write @@ -94,8 +99,9 @@ jobs: ${{ inputs.extraCommand }} - name: Perform Maven Release Rollback + working-directory: ${{ inputs.artifactPath }} run: | - mvn -B versions:revert release:rollback \ + mvn -B versions:revert release:rollback -DcheckModificationExcludeList=** -DignoreSnapshots=true \ -Darguments="-Dusername=liquibot -Dpassword=${{ secrets.BOT_TOKEN }} -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" \ -DconnectionUrl=scm:git:https://github.com/${{ github.repository }}.git \ -DcheckModificationExcludeList=pom.xml \ No newline at end of file From ff80040d7ee1efc93387f17dc9a8fbf2f66cfe07 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 14:46:58 +0200 Subject: [PATCH 50/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-release-publish?= =?UTF-8?q?ed.yml):=20update=20build-release-artifacts=20job=20to=20includ?= =?UTF-8?q?e=20working-directory=20for=20better=20organization=20and=20cla?= =?UTF-8?q?rity=20=F0=9F=94=A7=20(extension-release-published.yml):=20upda?= =?UTF-8?q?te=20Get=20Artifact=20ID=20and=20Publish=20to=20Maven=20Central?= =?UTF-8?q?=20jobs=20to=20include=20working-directory=20for=20consistency?= =?UTF-8?q?=20and=20better=20organization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-release-published.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 13fb841f..025a215d 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -115,14 +115,16 @@ jobs: run: | ${{ inputs.extraCommand }} - # - name: Build release artifacts - # id: build-release-artifacts - # continue-on-error: true - # run: | - # mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false - # git reset HEAD~ --hard + - name: Build release artifacts + working-directory: ${{ inputs.artifactPath }} + id: build-release-artifacts + continue-on-error: true + run: | + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -DcheckModificationExcludeList=** -DignoreSnapshots=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false + git reset HEAD~ --hard - name: Get Artifact ID + working-directory: ${{ inputs.artifactPath }} id: get-artifact-id run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV @@ -134,6 +136,7 @@ jobs: out-file-path: "." - name: Publish to Maven Central + working-directory: ${{ inputs.artifactPath }} env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }} From c6c4248bf1b2aa58dde708ca477109fe2eb95b9c Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 14:49:28 +0200 Subject: [PATCH 51/71] =?UTF-8?q?=F0=9F=94=A7=20(.github/workflows/create-?= =?UTF-8?q?release.yml):=20Update=20the=20version=20of=20sonar-push.yml=20?= =?UTF-8?q?to=20DAT-18141=20and=20add=20support=20for=20specifying=20the?= =?UTF-8?q?=20artifact=20path=20=F0=9F=94=A7=20(.github/workflows/sonar-pu?= =?UTF-8?q?sh.yml):=20Add=20support=20for=20specifying=20the=20artifact=20?= =?UTF-8?q?path=20to=20be=20attached=20to=20the=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes .github/workflows/create-release.yml | 8 +++++++- .github/workflows/sonar-push.yml | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9c7e095a39565e9fec75f52b03c6c0fb8e8f112e GIT binary patch literal 6148 zcmeHKOG-mQ5Uh>?1KDKha!w$4gCQg*$OR+_QIH5?vVNBc8SOA#O9dYt7Ha~YC*`zW?r1Oqv9I!oZ-uJI>qw4Dk=icHTJG|iI zJAc2+Td&iUl>$;g3P=GdAO(J@fcIY7Y@Vnn1*Cu!I4j`ahemhog+pR|Iv8REAWoSM z<2q&uV)F#C7Y>Qc&@8FMq*{#_mUQM@)%C(5G3l@xKCGT>HKABMo%gpWhxJ57DIf(d z6}ZXm!u$W4{=@u#NzzUVNP&N)fK6AM)snANy>;|*-fJ8Ek?u90bT_Vp!VvA4810xF fZ^w60ly%M5Jnw}=V$hinI#E9Zu8T|x{IvpK{InHg literal 0 HcmV?d00001 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index dfd82202..2237c363 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -8,13 +8,19 @@ on: required: false default: '' type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.7.8 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@DAT-18141 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} + artifactPath: ${{ inputs.artifactPath }} create-release: name: Create Release diff --git a/.github/workflows/sonar-push.yml b/.github/workflows/sonar-push.yml index a5e725bf..a296c7b7 100644 --- a/.github/workflows/sonar-push.yml +++ b/.github/workflows/sonar-push.yml @@ -8,6 +8,11 @@ on: required: false default: '' type: string + artifactPath: + description: "Specify the path to the artifacts that should be attached to the build. Useful for multi-module extensions." + required: false + default: "." + type: string secrets: SONAR_TOKEN: description: 'SONAR_TOKEN from the caller workflow' From cf6ba2fbc2ca3ea042a2d91c54c341bcb162d51d Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 15:02:32 +0200 Subject: [PATCH 52/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Update=20artifact=20path=20to=20include=20all?= =?UTF-8?q?=20files=20with=20the=20same=20prefix=20for=20better=20flexibil?= =?UTF-8?q?ity=20=F0=9F=94=A7=20(pro-extension-test.yml):=20Update=20artif?= =?UTF-8?q?act=20path=20to=20include=20all=20files=20with=20the=20same=20p?= =?UTF-8?q?refix=20for=20better=20flexibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 5 +---- .github/workflows/pro-extension-test.yml | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 219af8a9..2c3c14cb 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -220,10 +220,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}* attach-to-release: name: Attach Artifact to Release diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 81eca94b..e77cf691 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -376,10 +376,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}* sonar-pr: if: ${{ !inputs.nightly }} From e615c7dfc5a25a40b57959eb61a748b45d88575d Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 15:05:54 +0200 Subject: [PATCH 53/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Update=20path=20to=20include=20all=20files=20i?= =?UTF-8?q?n=20the=20specified=20directory=20=F0=9F=94=A7=20(pro-extension?= =?UTF-8?q?-test.yml):=20Update=20path=20to=20include=20all=20files=20in?= =?UTF-8?q?=20the=20specified=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- .github/workflows/pro-extension-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 2c3c14cb..f5e8f016 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -220,7 +220,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}* + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/* attach-to-release: name: Attach Artifact to Release diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index e77cf691..c48ed13b 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -376,7 +376,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}* + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/* sonar-pr: if: ${{ !inputs.nightly }} From 23f6f99c7eb4753675ec97751f91f634b7cc63e5 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 15:24:49 +0200 Subject: [PATCH 54/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Update=20artifact=20path=20to=20include=20spec?= =?UTF-8?q?ific=20jar,=20sources=20jar,=20javadoc=20jar,=20and=20pom=20fil?= =?UTF-8?q?es=20for=20release=20attachment=20=F0=9F=94=A7=20(pro-extension?= =?UTF-8?q?-test.yml):=20Update=20artifact=20path=20to=20include=20specifi?= =?UTF-8?q?c=20jar,=20sources=20jar,=20javadoc=20jar,=20and=20pom=20files?= =?UTF-8?q?=20for=20testing=20purposes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 5 ++++- .github/workflows/pro-extension-test.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index f5e8f016..ce7f0b8c 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -220,7 +220,10 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/* + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom attach-to-release: name: Attach Artifact to Release diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index c48ed13b..e3886b12 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -376,7 +376,10 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/* + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom sonar-pr: if: ${{ !inputs.nightly }} From 85deec7dbcc73942136ce2bfb23874741633f485 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 15:39:20 +0200 Subject: [PATCH 55/71] =?UTF-8?q?=F0=9F=90=9B=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Remove=20duplicate=20file=20path=20in=20artifa?= =?UTF-8?q?ct=20attachment=20step=20to=20prevent=20errors=20=F0=9F=90=9B?= =?UTF-8?q?=20(pro-extension-test.yml):=20Remove=20duplicate=20file=20path?= =?UTF-8?q?=20in=20artifact=20attachment=20step=20to=20prevent=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- .github/workflows/pro-extension-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index ce7f0b8c..e4317778 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -220,7 +220,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index e3886b12..eddf35fc 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -376,7 +376,7 @@ jobs: with: name: multiplatform-artifacts path: | - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom From 949ca4d94e77205f3843a76a8673973a66213fcb Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 15:42:06 +0200 Subject: [PATCH 56/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20remove=20unnecessary=20condition=20for=20combi?= =?UTF-8?q?ning=20jars=20during=20release=20artifact=20build=20to=20simpli?= =?UTF-8?q?fy=20workflow=20and=20improve=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index e4317778..28c69187 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -331,7 +331,7 @@ jobs: fi - name: Build release artifacts - if: env.ARTIFACT_FOUND == '0' && !inputs.combineJars + if: env.ARTIFACT_FOUND == '0' id: build-release-artifacts run: | mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' From f6cbc905746a8905148f56496b4de2c0f4149c7f Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 15:59:01 +0200 Subject: [PATCH 57/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20set=20working=20directory=20to=20the=20specifi?= =?UTF-8?q?ed=20artifact=20path=20before=20building=20release=20artifacts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 28c69187..092e44c6 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -331,6 +331,7 @@ jobs: fi - name: Build release artifacts + working-directory: ${{ inputs.artifactPath }} if: env.ARTIFACT_FOUND == '0' id: build-release-artifacts run: | From 52d7086cc2bb1894eb9c1e3b671bb6629258ebce Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 16:02:47 +0200 Subject: [PATCH 58/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Update=20file=20paths=20for=20artifact=20copyi?= =?UTF-8?q?ng=20to=20simplify=20and=20improve=20readability=20=F0=9F=94=A7?= =?UTF-8?q?=20(pro-extension-test.yml):=20Update=20file=20paths=20for=20ar?= =?UTF-8?q?tifact=20copying=20to=20simplify=20and=20improve=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/extension-attach-artifact-release.yml | 12 ++++++------ .github/workflows/pro-extension-test.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 092e44c6..cd4dc428 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -210,9 +210,9 @@ jobs: cd /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ zip -r ../${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar * cd .. - cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ - cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ - cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/ + cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar /tmp/combined/ + cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar /tmp/combined/ + cp /tmp/ubuntu/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom /tmp/combined/ - name: Upload multiplatform artifact @@ -221,9 +221,9 @@ jobs: name: multiplatform-artifacts path: | /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar - /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build-multi-architecture.outputs.artifact_id}}-${{needs.build-multi-architecture.outputs.artifact_version}}.pom attach-to-release: name: Attach Artifact to Release diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index eddf35fc..ab66484a 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -367,9 +367,9 @@ jobs: cd /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ zip -r ../${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar * cd .. - cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ - cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/ + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar /tmp/combined/ + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar /tmp/combined/ + cp /tmp/ubuntu/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom /tmp/combined/ - name: Upload multiplatform artifact uses: actions/upload-artifact@v3 @@ -377,9 +377,9 @@ jobs: name: multiplatform-artifacts path: | /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.jar - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar - /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-sources.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}-javadoc.jar + /tmp/combined/${{needs.build.outputs.artifact_id}}-${{needs.build.outputs.artifact_version}}.pom sonar-pr: if: ${{ !inputs.nightly }} From 7ed4bd5f1a56301356ee502c283e47a291c93c1d Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 16:19:20 +0200 Subject: [PATCH 59/71] =?UTF-8?q?=E2=9C=A8=20(pro-extension-test.yml):=20a?= =?UTF-8?q?dd=20dependency=20on=20unit-test=20job=20for=20combineJars=20jo?= =?UTF-8?q?b=20to=20ensure=20unit=20tests=20are=20run=20before=20combining?= =?UTF-8?q?=20jars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pro-extension-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index ab66484a..275a4019 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -323,7 +323,7 @@ jobs: **/target/site/jacoco/jacoco.xml combineJars: - needs: [ build ] + needs: [ build, unit-test ] if: ${{ inputs.combineJars }} name: Combine Jars runs-on: ubuntu-latest From 7dec2189cc4862d6a26b749fd9043758eae510c1 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 16:20:46 +0200 Subject: [PATCH 60/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20update=20mvn=20command=20to=20include=20checkM?= =?UTF-8?q?odificationExcludeList=20and=20ignoreSnapshots=20options=20for?= =?UTF-8?q?=20release=20preparation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index cd4dc428..7e5f6620 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -335,7 +335,7 @@ jobs: if: env.ARTIFACT_FOUND == '0' id: build-release-artifacts run: | - mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -DcheckModificationExcludeList=** -DignoreSnapshots=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' git reset HEAD~ --hard mvn clean install -DskipTests -P '${{ inputs.mavenProfiles }}' From 97d7f58dfd8a6be44a2b134f0e098aea11bddcb5 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 16:37:28 +0200 Subject: [PATCH 61/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20comment=20out=20artifact=20download=20and=20bu?= =?UTF-8?q?ild=20steps=20as=20they=20are=20not=20needed=20for=20the=20curr?= =?UTF-8?q?ent=20workflow=20and=20can=20be=20re-enabled=20if=20required=20?= =?UTF-8?q?in=20the=20future.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 7e5f6620..e9b7a51e 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -307,37 +307,37 @@ jobs: run: | ${{ inputs.extraCommand }} - - name: Check and download artifacts from GPM - id: check-download-artifacts - env: - ARTIFACT_NAME: ${{ github.event.repository.name }} - run: | - RELEASE_VERSION=$(grep -m2 '' pom.xml | tail -n 1 | awk -F'[><]' '{print $3}' | sed 's/-SNAPSHOT//') - echo "RELEASE_VERSION=$RELEASE_VERSION" - mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dtransitive=false || echo "Failed to download artifact" - mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dpackaging=pom -Dtransitive=false || echo "Failed to download pom artifact" - mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=sources -Dtransitive=false || echo "Failed to download sources artifact" - mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=javadoc -Dtransitive=false || echo "Failed to download javadoc artifact" - rm -rf ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/*.lastUpdated - ARTIFACT_FOUND=$(ls -1 ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/ 2>/dev/null | wc -l) - echo "ARTIFACT_FOUND=$ARTIFACT_FOUND" >> $GITHUB_ENV - if [ $ARTIFACT_FOUND -eq 0 ]; then - echo "No artifact found" - else - echo "Artifact found" - rm -rf ./target && mkdir -p ./target - mv ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/* ./target - sed -i 's/-SNAPSHOT//g' pom.xml - fi - - - name: Build release artifacts - working-directory: ${{ inputs.artifactPath }} - if: env.ARTIFACT_FOUND == '0' - id: build-release-artifacts - run: | - mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -DcheckModificationExcludeList=** -DignoreSnapshots=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' - git reset HEAD~ --hard - mvn clean install -DskipTests -P '${{ inputs.mavenProfiles }}' + # - name: Check and download artifacts from GPM + # id: check-download-artifacts + # env: + # ARTIFACT_NAME: ${{ github.event.repository.name }} + # run: | + # RELEASE_VERSION=$(grep -m2 '' pom.xml | tail -n 1 | awk -F'[><]' '{print $3}' | sed 's/-SNAPSHOT//') + # echo "RELEASE_VERSION=$RELEASE_VERSION" + # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dtransitive=false || echo "Failed to download artifact" + # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dpackaging=pom -Dtransitive=false || echo "Failed to download pom artifact" + # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=sources -Dtransitive=false || echo "Failed to download sources artifact" + # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=javadoc -Dtransitive=false || echo "Failed to download javadoc artifact" + # rm -rf ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/*.lastUpdated + # ARTIFACT_FOUND=$(ls -1 ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/ 2>/dev/null | wc -l) + # echo "ARTIFACT_FOUND=$ARTIFACT_FOUND" >> $GITHUB_ENV + # if [ $ARTIFACT_FOUND -eq 0 ]; then + # echo "No artifact found" + # else + # echo "Artifact found" + # rm -rf ./target && mkdir -p ./target + # mv ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/* ./target + # sed -i 's/-SNAPSHOT//g' pom.xml + # fi + + # - name: Build release artifacts + # working-directory: ${{ inputs.artifactPath }} + # if: env.ARTIFACT_FOUND == '0' + # id: build-release-artifacts + # run: | + # mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -DcheckModificationExcludeList=** -DignoreSnapshots=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' + # git reset HEAD~ --hard + # mvn clean install -DskipTests -P '${{ inputs.mavenProfiles }}' - name: Download multiarchitecture release artifacts if: inputs.combineJars From 5ae704b6070f797ffc2a7025fc8cb938dfb9bb09 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:03:01 +0200 Subject: [PATCH 62/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20Update=20workflow=20to=20check=20and=20downloa?= =?UTF-8?q?d=20artifacts=20from=20GPM=20and=20build=20release=20artifacts?= =?UTF-8?q?=20=F0=9F=94=A7=20(extension-release-prepare.yml):=20Update=20w?= =?UTF-8?q?orkflow=20to=20prepare=20Maven=20release=20with=20correct=20arg?= =?UTF-8?q?uments=20=F0=9F=94=A7=20(extension-release-published.yml):=20Up?= =?UTF-8?q?date=20workflow=20to=20build=20release=20artifacts=20with=20cor?= =?UTF-8?q?rect=20arguments=20=F0=9F=94=A7=20(extension-release-rollback.y?= =?UTF-8?q?ml):=20Update=20workflow=20to=20perform=20Maven=20release=20rol?= =?UTF-8?q?lback=20with=20correct=20arguments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extension-attach-artifact-release.yml | 62 +++++++++---------- .../workflows/extension-release-prepare.yml | 4 +- .../workflows/extension-release-published.yml | 2 +- .../workflows/extension-release-rollback.yml | 4 +- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index e9b7a51e..909cb8f0 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -307,37 +307,37 @@ jobs: run: | ${{ inputs.extraCommand }} - # - name: Check and download artifacts from GPM - # id: check-download-artifacts - # env: - # ARTIFACT_NAME: ${{ github.event.repository.name }} - # run: | - # RELEASE_VERSION=$(grep -m2 '' pom.xml | tail -n 1 | awk -F'[><]' '{print $3}' | sed 's/-SNAPSHOT//') - # echo "RELEASE_VERSION=$RELEASE_VERSION" - # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dtransitive=false || echo "Failed to download artifact" - # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dpackaging=pom -Dtransitive=false || echo "Failed to download pom artifact" - # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=sources -Dtransitive=false || echo "Failed to download sources artifact" - # mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=javadoc -Dtransitive=false || echo "Failed to download javadoc artifact" - # rm -rf ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/*.lastUpdated - # ARTIFACT_FOUND=$(ls -1 ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/ 2>/dev/null | wc -l) - # echo "ARTIFACT_FOUND=$ARTIFACT_FOUND" >> $GITHUB_ENV - # if [ $ARTIFACT_FOUND -eq 0 ]; then - # echo "No artifact found" - # else - # echo "Artifact found" - # rm -rf ./target && mkdir -p ./target - # mv ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/* ./target - # sed -i 's/-SNAPSHOT//g' pom.xml - # fi - - # - name: Build release artifacts - # working-directory: ${{ inputs.artifactPath }} - # if: env.ARTIFACT_FOUND == '0' - # id: build-release-artifacts - # run: | - # mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -DcheckModificationExcludeList=** -DignoreSnapshots=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' - # git reset HEAD~ --hard - # mvn clean install -DskipTests -P '${{ inputs.mavenProfiles }}' + - name: Check and download artifacts from GPM + id: check-download-artifacts + env: + ARTIFACT_NAME: ${{ github.event.repository.name }} + run: | + RELEASE_VERSION=$(grep -m2 '' pom.xml | tail -n 1 | awk -F'[><]' '{print $3}' | sed 's/-SNAPSHOT//') + echo "RELEASE_VERSION=$RELEASE_VERSION" + mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dtransitive=false || echo "Failed to download artifact" + mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dpackaging=pom -Dtransitive=false || echo "Failed to download pom artifact" + mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=sources -Dtransitive=false || echo "Failed to download sources artifact" + mvn dependency:get -DgroupId=org.liquibase.ext -DartifactId=${{ env.ARTIFACT_NAME }} -Dversion=$RELEASE_VERSION -Dclassifier=javadoc -Dtransitive=false || echo "Failed to download javadoc artifact" + rm -rf ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/*.lastUpdated + ARTIFACT_FOUND=$(ls -1 ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/ 2>/dev/null | wc -l) + echo "ARTIFACT_FOUND=$ARTIFACT_FOUND" >> $GITHUB_ENV + if [ $ARTIFACT_FOUND -eq 0 ]; then + echo "No artifact found" + else + echo "Artifact found" + rm -rf ./target && mkdir -p ./target + mv ~/.m2/repository/org/liquibase/ext/${{ env.ARTIFACT_NAME }}/$RELEASE_VERSION/* ./target + sed -i 's/-SNAPSHOT//g' pom.xml + fi + + - name: Build release artifacts + working-directory: ${{ inputs.artifactPath }} + if: env.ARTIFACT_FOUND == '0' + id: build-release-artifacts + run: | + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DcheckModificationExcludeList=** -DignoreSnapshots=true -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false -P '${{ inputs.mavenProfiles }}' + git reset HEAD~ --hard + mvn clean install -DskipTests -P '${{ inputs.mavenProfiles }}' - name: Download multiarchitecture release artifacts if: inputs.combineJars diff --git a/.github/workflows/extension-release-prepare.yml b/.github/workflows/extension-release-prepare.yml index 02eabe26..01240100 100644 --- a/.github/workflows/extension-release-prepare.yml +++ b/.github/workflows/extension-release-prepare.yml @@ -96,10 +96,10 @@ jobs: - name: Prepare Maven Release working-directory: ${{ inputs.artifactPath }} run: | - mvn -B build-helper:parse-version release:clean release:prepare -DcheckModificationExcludeList=** -DignoreSnapshots=true \ + mvn -B build-helper:parse-version release:clean release:prepare \ -Darguments="-Dusername=liquibot -Dpassword=${{ secrets.BOT_TOKEN }} -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" \ -DdevelopmentVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0-SNAPSHOT -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.\${parsedVersion.incrementalVersion} \ - -DcheckModificationExcludeList=pom.xml + -DcheckModificationExcludeList=** -DignoreSnapshots=true - name: Save Release files if: always() diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 025a215d..4150daf4 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -120,7 +120,7 @@ jobs: id: build-release-artifacts continue-on-error: true run: | - mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -DcheckModificationExcludeList=** -DignoreSnapshots=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false + mvn -B release:clean release:prepare -Darguments="-Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DcheckModificationExcludeList=** -DignoreSnapshots=true -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false git reset HEAD~ --hard - name: Get Artifact ID diff --git a/.github/workflows/extension-release-rollback.yml b/.github/workflows/extension-release-rollback.yml index e895ca83..2ecd5d7c 100644 --- a/.github/workflows/extension-release-rollback.yml +++ b/.github/workflows/extension-release-rollback.yml @@ -101,7 +101,7 @@ jobs: - name: Perform Maven Release Rollback working-directory: ${{ inputs.artifactPath }} run: | - mvn -B versions:revert release:rollback -DcheckModificationExcludeList=** -DignoreSnapshots=true \ + mvn -B versions:revert release:rollback \ -Darguments="-Dusername=liquibot -Dpassword=${{ secrets.BOT_TOKEN }} -Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" \ -DconnectionUrl=scm:git:https://github.com/${{ github.repository }}.git \ - -DcheckModificationExcludeList=pom.xml \ No newline at end of file + -DcheckModificationExcludeList=** -DignoreSnapshots=true \ No newline at end of file From 1343accd9cca6b67ab61e9f3d7f77c6a31644a0f Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:26:01 +0200 Subject: [PATCH 63/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20set=20working=20directory=20to=20the=20specifi?= =?UTF-8?q?ed=20artifact=20path=20before=20signing=20files=20for=20draft?= =?UTF-8?q?=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 909cb8f0..da916bcf 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -382,6 +382,7 @@ jobs: passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Sign Files for Draft Release + working-directory: ${{ inputs.artifactPath }} run: | gpg -K version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) From b8baf5f65497bac23b794b8f0b8c8af15fcb7a71 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:32:11 +0200 Subject: [PATCH 64/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20set=20root=20directory=20variable=20to=20impro?= =?UTF-8?q?ve=20script=20readability=20and=20maintainability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/extension-attach-artifact-release.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index da916bcf..23cf01f9 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -381,15 +381,18 @@ jobs: gpg_private_key: ${{ secrets.GPG_SECRET }} passphrase: ${{ secrets.GPG_PASSPHRASE }} + - name: Set root directory variable + run: echo "REPO_ROOT=$(git rev-parse --show-toplevel)" >> $GITHUB_ENV + - name: Sign Files for Draft Release working-directory: ${{ inputs.artifactPath }} run: | gpg -K version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.jar - ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.pom - ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-javadoc.jar - ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-sources.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.pom + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-javadoc.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-sources.jar - name: Set draft release title id: set-release-title From 5a592ba40996f3bcc8a5cf888ab1c1ce8a9a114c Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:37:35 +0200 Subject: [PATCH 65/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-release-prepare?= =?UTF-8?q?.yml):=20Add=20working=20directory=20configuration=20to=20run?= =?UTF-8?q?=20extra=20command=20in=20the=20specified=20path=20=F0=9F=94=A7?= =?UTF-8?q?=20(extension-release-published.yml):=20Add=20working=20directo?= =?UTF-8?q?ry=20configuration=20to=20run=20extra=20command=20in=20the=20sp?= =?UTF-8?q?ecified=20path=20=F0=9F=94=A7=20(extension-release-rollback.yml?= =?UTF-8?q?):=20Add=20working=20directory=20configuration=20to=20run=20ext?= =?UTF-8?q?ra=20command=20in=20the=20specified=20path=20=F0=9F=94=A7=20(so?= =?UTF-8?q?nar-pull-request.yml):=20Add=20working=20directory=20configurat?= =?UTF-8?q?ion=20to=20run=20extra=20command=20in=20the=20specified=20path?= =?UTF-8?q?=20=F0=9F=94=A7=20(sonar-push.yml):=20Add=20working=20directory?= =?UTF-8?q?=20configuration=20to=20run=20extra=20command=20in=20the=20spec?= =?UTF-8?q?ified=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-release-prepare.yml | 1 + .github/workflows/extension-release-published.yml | 1 + .github/workflows/extension-release-rollback.yml | 1 + .github/workflows/sonar-pull-request.yml | 1 + .github/workflows/sonar-push.yml | 3 +++ 5 files changed, 7 insertions(+) diff --git a/.github/workflows/extension-release-prepare.yml b/.github/workflows/extension-release-prepare.yml index 01240100..f1b91146 100644 --- a/.github/workflows/extension-release-prepare.yml +++ b/.github/workflows/extension-release-prepare.yml @@ -89,6 +89,7 @@ jobs: git config --local user.name "liquibot" - name: Run extra command + working-directory: ${{ inputs.artifactPath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 4150daf4..d872e3ef 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -111,6 +111,7 @@ jobs: git config user.email "liquibot@liquibase.org" - name: Run extra command + working-directory: ${{ inputs.artifactPath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} diff --git a/.github/workflows/extension-release-rollback.yml b/.github/workflows/extension-release-rollback.yml index 2ecd5d7c..1b176d36 100644 --- a/.github/workflows/extension-release-rollback.yml +++ b/.github/workflows/extension-release-rollback.yml @@ -94,6 +94,7 @@ jobs: name: release-files - name: Run extra command + working-directory: ${{ inputs.artifactPath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} diff --git a/.github/workflows/sonar-pull-request.yml b/.github/workflows/sonar-pull-request.yml index a5dc4972..6fce3967 100644 --- a/.github/workflows/sonar-pull-request.yml +++ b/.github/workflows/sonar-pull-request.yml @@ -97,6 +97,7 @@ jobs: ${{ inputs.extraCommand }} - name: Get Artifact ID + working-directory: ${{ inputs.artifactPath }} id: get-artifact-id run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV diff --git a/.github/workflows/sonar-push.yml b/.github/workflows/sonar-push.yml index a296c7b7..419ada03 100644 --- a/.github/workflows/sonar-push.yml +++ b/.github/workflows/sonar-push.yml @@ -49,11 +49,13 @@ jobs: restore-keys: ${{ runner.os }}-sonar - name: Run extra command + working-directory: ${{ inputs.artifactPath }} if: inputs.extraCommand != '' run: | ${{ inputs.extraCommand }} - name: Get Artifact ID + working-directory: ${{ inputs.artifactPath }} id: get-artifact-id run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV @@ -112,6 +114,7 @@ jobs: ] - name: Sonar Scan + working-directory: ${{ inputs.artifactPath }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 49c38f000f8184971493ad0e1d25861de6beec08 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:50:05 +0200 Subject: [PATCH 66/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20fix=20path=20to=20sign=20artifacts=20by=20usin?= =?UTF-8?q?g=20absolute=20path=20from=20REPO=5FROOT=20to=20target=20direct?= =?UTF-8?q?ory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 23cf01f9..9eb257a9 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -389,10 +389,10 @@ jobs: run: | gpg -K version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.jar - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.pom - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-javadoc.jar - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-sources.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}.pom + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}-javadoc.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}-sources.jar - name: Set draft release title id: set-release-title From 860817c237adfc75f7e033bb2055e519bde28c84 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:56:23 +0200 Subject: [PATCH 67/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20update=20path=20for=20artifact=20download=20to?= =?UTF-8?q?=20use=20the=20input=20variable=20for=20flexibility=20?= =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact-release.yml):=20updat?= =?UTF-8?q?e=20the=20working=20directory=20for=20attaching=20files=20to=20?= =?UTF-8?q?the=20draft=20release=20to=20the=20specified=20artifact=20path?= =?UTF-8?q?=20=F0=9F=94=A7=20(extension-attach-artifact-release.yml):=20up?= =?UTF-8?q?date=20the=20command=20to=20run=20the=20upload=20script=20with?= =?UTF-8?q?=20the=20correct=20path=20to=20the=20project=20root=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 9eb257a9..63d93b60 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -344,7 +344,7 @@ jobs: uses: actions/download-artifact@v2 with: name: multiplatform-artifacts - path: ./target + path: ${{ inputs.artifactPath }}/target - name: Get latest draft release ID id: get-release @@ -403,8 +403,9 @@ jobs: curl -X PATCH -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: Bearer ${{ secrets.BOT_TOKEN }}" -d '{"name": "'"$RELEASE_TITLE"'"}' "https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}" - name: Attach Files to Draft Release + working-directory: ${{ inputs.artifactPath }} id: upload-release-asset - run: ./.github/upload_asset.sh $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + run: ${{ env.REPO_ROOT }}/.github/upload_asset.sh $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) env: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} ASSET_NAME_PREFIX: "${{ env.artifact_id }}-" From 93cef5104ba7aa69daa643a4f7f4091b9b10f2cd Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 17:58:11 +0200 Subject: [PATCH 68/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20set=20working=20directory=20to=20the=20specifi?= =?UTF-8?q?ed=20artifact=20path=20before=20setting=20draft=20release=20tit?= =?UTF-8?q?le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 63d93b60..553c0e78 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -395,6 +395,7 @@ jobs: ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}-sources.jar - name: Set draft release title + working-directory: ${{ inputs.artifactPath }} id: set-release-title run: | version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) From 7883ed78cdf41f334a1368ed74da7534cf5b54b5 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 25 Jul 2024 18:21:59 +0200 Subject: [PATCH 69/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-attach-artifact?= =?UTF-8?q?-release.yml):=20update=20artifact=20paths=20to=20include=20inp?= =?UTF-8?q?uts.artifactPath=20for=20signing=20artifacts=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-attach-artifact-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 553c0e78..befd7714 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -389,10 +389,10 @@ jobs: run: | gpg -K version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}.jar - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}.pom - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}-javadoc.jar - ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/target/${{ env.artifact_id }}-${version}-sources.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/${{ inputs.artifactPath }}/target/${{ env.artifact_id }}-${version}.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/${{ inputs.artifactPath }}/target/${{ env.artifact_id }}-${version}.pom + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/${{ inputs.artifactPath }}/target/${{ env.artifact_id }}-${version}-javadoc.jar + ${{ env.REPO_ROOT }}/.github/sign_artifact.sh ${{ env.REPO_ROOT }}/${{ inputs.artifactPath }}/target/${{ env.artifact_id }}-${version}-sources.jar - name: Set draft release title working-directory: ${{ inputs.artifactPath }} From 02ab20847c81c90dab28f51c75f4d5fdd55fa8f0 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Fri, 26 Jul 2024 08:55:14 +0200 Subject: [PATCH 70/71] =?UTF-8?q?=F0=9F=94=A7=20(extension-release-publish?= =?UTF-8?q?ed.yml):=20use=20the=20provided=20input=20variable=20for=20the?= =?UTF-8?q?=20output=20file=20path=20instead=20of=20hardcoding=20it=20to?= =?UTF-8?q?=20improve=20flexibility=20and=20reusability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/extension-release-published.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index d872e3ef..764fca4e 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -134,7 +134,7 @@ jobs: with: tag: "${{ github.event.release.tag_name }}" filename: "${{ env.artifact_id }}-*" - out-file-path: "." + out-file-path: ${{ inputs.artifactPath }} - name: Publish to Maven Central working-directory: ${{ inputs.artifactPath }} From 3cd9ccdd431e4a9ac3cdea76dedece3b46e10afe Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Fri, 9 Aug 2024 16:08:59 +0200 Subject: [PATCH 71/71] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(create-release.yml)?= =?UTF-8?q?:=20Update=20sonar-push.yml=20reference=20to=20use=20the=20'mai?= =?UTF-8?q?n'=20branch=20instead=20of=20a=20specific=20commit=20hash=20for?= =?UTF-8?q?=20better=20maintainability=20=E2=AC=86=EF=B8=8F=20(extension-r?= =?UTF-8?q?elease-prepare.yml):=20Update=20extension-release-rollback.yml?= =?UTF-8?q?=20reference=20to=20use=20the=20'main'=20branch=20instead=20of?= =?UTF-8?q?=20a=20specific=20commit=20hash=20for=20better=20maintainabilit?= =?UTF-8?q?y=20=E2=AC=86=EF=B8=8F=20(pro-extension-test.yml):=20Update=20s?= =?UTF-8?q?onar-pull-request.yml=20reference=20to=20use=20the=20'main'=20b?= =?UTF-8?q?ranch=20instead=20of=20a=20specific=20commit=20hash=20for=20bet?= =?UTF-8?q?ter=20maintainability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/create-release.yml | 2 +- .github/workflows/extension-release-prepare.yml | 2 +- .github/workflows/pro-extension-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 2237c363..28e73216 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -16,7 +16,7 @@ on: jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@DAT-18141 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@main secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} diff --git a/.github/workflows/extension-release-prepare.yml b/.github/workflows/extension-release-prepare.yml index 6b154187..c891650c 100644 --- a/.github/workflows/extension-release-prepare.yml +++ b/.github/workflows/extension-release-prepare.yml @@ -117,7 +117,7 @@ jobs: release-rollback: needs: prepare-release if: ${{ always() && contains(needs.*.result, 'failure') }} - uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@DAT-18141 + uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@main secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 779c9217..3f3513ae 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -386,7 +386,7 @@ jobs: sonar-pr: if: ${{ !inputs.nightly }} needs: [unit-test] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@DAT-18141 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@main secrets: inherit with: extraCommand: ${{ inputs.extraCommand }}