From 81053abada11a55630c130ec9842f5fa8f3bd96e Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 18:53:54 +0100 Subject: [PATCH 01/12] updating package name Signed-off-by: salaboy --- client/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/build.gradle b/client/build.gradle index 94547309..33a3790b 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -8,7 +8,7 @@ plugins { id 'com.github.spotbugs' version '5.2.1' } -group 'com.microsoft' +group 'io.dapr' version = '1.5.1' archivesBaseName = 'durabletask-client' From 79eef4a9f24259aa9a8af9b2bf8922dc0f680998 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 18:55:01 +0100 Subject: [PATCH 02/12] updating to 1.5.2 Signed-off-by: salaboy --- client/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/build.gradle b/client/build.gradle index 33a3790b..04cf4000 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -9,7 +9,7 @@ plugins { } group 'io.dapr' -version = '1.5.1' +version = '1.5.2' archivesBaseName = 'durabletask-client' def grpcVersion = '1.59.0' From b4ff50ce627e23e47d4160473b8651767c3d033a Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 18:58:59 +0100 Subject: [PATCH 03/12] update action Signed-off-by: salaboy --- .github/workflows/build-validation.yml | 186 ++++++++++++------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 7659f586..94d18fb3 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -19,99 +19,99 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'microsoft' - - - name: set JDK_11 environment variable test compiling and running - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - run: echo ::set-env name=JDK_11::$(echo $JAVA_HOME) - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'temurin' - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Build with Gradle - run: ./gradlew build -x test - - - name: Run SpotBugs - run: ./gradlew spotbugsMain spotbugsTest - continue-on-error: false - - - name: Upload SpotBugs reports - uses: actions/upload-artifact@v4 - with: - name: SpotBugs Reports - path: '**/build/reports/spotbugs' - if-no-files-found: ignore - - - name: Run Unit Tests with Gradle - run: | - export JAVA_HOME=$JDK_11 - ./gradlew clean test || echo "UNIT_TEST_FAILED=true" >> $GITHUB_ENV - continue-on-error: true - - - name: Upload test reports if tests failed - if: env.UNIT_TEST_FAILED == 'true' - uses: actions/upload-artifact@v4 - with: - name: Unit Test Reports - path: '**/build/reports/tests/test' - if-no-files-found: ignore # Prevents errors if no reports exist - - - name: Fail the job if unit tests failed - if: env.UNIT_TEST_FAILED == 'true' - run: exit 1 - - # TODO: Move the sidecar into a central image repository - - name: Initialize Durable Task Sidecar - run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator - - - name: Display Durable Task Sidecar Logs - run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 & - - # wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar - - name: Wait for 10 seconds - run: sleep 10 - - - name: Integration Tests with Gradle - run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV - continue-on-error: true - - - name: Kill Durable Task Sidecar - run: docker kill durabletask-sidecar - - - name: Upload Durable Task Sidecar Logs - uses: actions/upload-artifact@v4 - with: - name: Durable Task Sidecar Logs - path: durabletask-sidecar.log - - - name: Archive test report - uses: actions/upload-artifact@v4 - with: - name: Integration test report - path: client/build/reports/tests/integrationTest - - - name: Upload JAR output - uses: actions/upload-artifact@v4 - with: - name: Package - path: client/build/libs - - - name: Fail the job if tests failed - if: env.TEST_FAILED == 'true' - run: exit 1 + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'microsoft' + + - name: set JDK_11 environment variable test compiling and running + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + run: echo ::set-env name=JDK_11::$(echo $JAVA_HOME) + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Build with Gradle + run: ./gradlew build -x test + + - name: Run SpotBugs + run: ./gradlew spotbugsMain spotbugsTest + continue-on-error: false + + - name: Upload SpotBugs reports + uses: actions/upload-artifact@v4 + with: + name: SpotBugs Reports + path: '**/build/reports/spotbugs' + if-no-files-found: ignore + + - name: Run Unit Tests with Gradle + run: | + export JAVA_HOME=$JDK_11 + ./gradlew clean test || echo "UNIT_TEST_FAILED=true" >> $GITHUB_ENV + continue-on-error: true + + - name: Upload test reports if tests failed + if: env.UNIT_TEST_FAILED == 'true' + uses: actions/upload-artifact@v4 + with: + name: Unit Test Reports + path: '**/build/reports/tests/test' + if-no-files-found: ignore # Prevents errors if no reports exist + + - name: Fail the job if unit tests failed + if: env.UNIT_TEST_FAILED == 'true' + run: exit 1 + + # TODO: Move the sidecar into a central image repository + - name: Initialize Durable Task Sidecar + run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator + + - name: Display Durable Task Sidecar Logs + run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 & + + # wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar + - name: Wait for 10 seconds + run: sleep 10 + + - name: Integration Tests with Gradle + run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV + continue-on-error: true + + - name: Kill Durable Task Sidecar + run: docker kill durabletask-sidecar + + - name: Upload Durable Task Sidecar Logs + uses: actions/upload-artifact@v4 + with: + name: Durable Task Sidecar Logs + path: durabletask-sidecar.log + + - name: Archive test report + uses: actions/upload-artifact@v4 + with: + name: Integration test report + path: client/build/reports/tests/integrationTest + + - name: Upload JAR output + uses: actions/upload-artifact@v4 + with: + name: Package + path: client/build/libs + + - name: Fail the job if tests failed + if: env.TEST_FAILED == 'true' + run: exit 1 functions-e2e-tests: From 8663646a8420de835ea6e069e49f84f588cf3a22 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 19:53:13 +0100 Subject: [PATCH 04/12] adding release pipeline Signed-off-by: salaboy --- .github/workflows/release.yml | 110 ++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..1c085f3b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,110 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Release Pipeline + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'microsoft' + + - name: set JDK_11 environment variable test compiling and running + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + run: echo ::set-env name=JDK_11::$(echo $JAVA_HOME) + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Build with Gradle + run: ./gradlew build -x test + + - name: Run SpotBugs + run: ./gradlew spotbugsMain spotbugsTest + continue-on-error: false + + - name: Upload SpotBugs reports + uses: actions/upload-artifact@v4 + with: + name: SpotBugs Reports + path: '**/build/reports/spotbugs' + if-no-files-found: ignore + + - name: Run Unit Tests with Gradle + run: | + export JAVA_HOME=$JDK_11 + ./gradlew clean test || echo "UNIT_TEST_FAILED=true" >> $GITHUB_ENV + continue-on-error: true + + - name: Upload test reports if tests failed + if: env.UNIT_TEST_FAILED == 'true' + uses: actions/upload-artifact@v4 + with: + name: Unit Test Reports + path: '**/build/reports/tests/test' + if-no-files-found: ignore # Prevents errors if no reports exist + + - name: Fail the job if unit tests failed + if: env.UNIT_TEST_FAILED == 'true' + run: exit 1 + + # TODO: Move the sidecar into a central image repository + - name: Initialize Durable Task Sidecar + run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator + + - name: Display Durable Task Sidecar Logs + run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 & + + # wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar + - name: Wait for 10 seconds + run: sleep 10 + + - name: Integration Tests with Gradle + run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV + continue-on-error: true + + - name: Kill Durable Task Sidecar + run: docker kill durabletask-sidecar + + - name: Upload Durable Task Sidecar Logs + uses: actions/upload-artifact@v4 + with: + name: Durable Task Sidecar Logs + path: durabletask-sidecar.log + + - name: Archive test report + uses: actions/upload-artifact@v4 + with: + name: Integration test report + path: client/build/reports/tests/integrationTest + + - name: Upload JAR output + uses: actions/upload-artifact@v4 + with: + name: Package + path: client/build/libs + + - name: Fail the job if tests failed + if: env.TEST_FAILED == 'true' + run: exit 1 + + - name: Publish to local + run: ./gradlew publishToMaven From 5f701292e2b72265bea1e72d6f4ca132a9940e12 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 19:55:01 +0100 Subject: [PATCH 05/12] publish goal Signed-off-by: salaboy --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c085f3b..d89beda6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,4 +107,4 @@ jobs: run: exit 1 - name: Publish to local - run: ./gradlew publishToMaven + run: ./gradlew publish From 7e4c53efe5e3d56477dd3e66943757aa9f3698f9 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:04:10 +0100 Subject: [PATCH 06/12] adding settings + release pipeline Signed-off-by: salaboy --- .github/workflows/release.yml | 53 +++++++++-------------------------- settings.gradle | 10 +++---- settings.xml | 26 +++++++++++++++++ 3 files changed, 45 insertions(+), 44 deletions(-) create mode 100644 settings.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d89beda6..dad339b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,12 +8,17 @@ name: Release Pipeline jobs: - build: + publish: runs-on: ubuntu-latest - + timeout-minutes: 30 + env: + JDK_VER: 11 + OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }} + OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }} + GPG_KEY: ${{ secrets.GPG_KEY }} + GPG_PWD: ${{ secrets.GPG_PWD }} steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 uses: actions/setup-java@v2 with: @@ -66,45 +71,15 @@ jobs: if: env.UNIT_TEST_FAILED == 'true' run: exit 1 - # TODO: Move the sidecar into a central image repository - - name: Initialize Durable Task Sidecar - run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator - - - name: Display Durable Task Sidecar Logs - run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 & - - # wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar - - name: Wait for 10 seconds - run: sleep 10 - - - name: Integration Tests with Gradle - run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV - continue-on-error: true - - - name: Kill Durable Task Sidecar - run: docker kill durabletask-sidecar - - - name: Upload Durable Task Sidecar Logs - uses: actions/upload-artifact@v4 - with: - name: Durable Task Sidecar Logs - path: durabletask-sidecar.log - - - name: Archive test report - uses: actions/upload-artifact@v4 - with: - name: Integration test report - path: client/build/reports/tests/integrationTest - - name: Upload JAR output uses: actions/upload-artifact@v4 with: name: Package path: client/build/libs - - name: Fail the job if tests failed - if: env.TEST_FAILED == 'true' - run: exit 1 - - - name: Publish to local - run: ./gradlew publish + - name: Publish to ossrh + run: | + echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg + export GPG_TTY=$(tty) + gpg --batch --import private-key.gpg + ./gradlew publish diff --git a/settings.gradle b/settings.gradle index 3813e3ae..8cdaf47b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,9 +1,9 @@ rootProject.name = 'durabletask-java' include ":client" -include ":azurefunctions" -include ":azuremanaged" -include ":samples" -include ":samples-azure-functions" -include ":endtoendtests" +//include ":azurefunctions" +//include ":azuremanaged" +//include ":samples" +//include ":samples-azure-functions" +//include ":endtoendtests" diff --git a/settings.xml b/settings.xml new file mode 100644 index 00000000..f37b1353 --- /dev/null +++ b/settings.xml @@ -0,0 +1,26 @@ + + + + + + ossrh + ${env.OSSRH_USER_TOKEN} + ${env.OSSRH_PWD_TOKEN} + + + + + + true + + + ${env.GPG_KEY} + ${env.GPG_PWD} + + + + \ No newline at end of file From 67db9be25274ac5f222ba5655566bd9bfa125c88 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:07:33 +0100 Subject: [PATCH 07/12] adding on Signed-off-by: salaboy --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dad339b2..13fc6c55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,8 @@ name: Release Pipeline +on: + jobs: publish: runs-on: ubuntu-latest From 30c7a849ceaad50c0bb43879d256f5a1e1dc3825 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:09:21 +0100 Subject: [PATCH 08/12] on workflow dispatch Signed-off-by: salaboy --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13fc6c55..6fbc9c16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ name: Release Pipeline on: + workflow_dispatch: jobs: publish: From 232e90f75f9ca42d19e191a2423a759cf9d9ff08 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:15:13 +0100 Subject: [PATCH 09/12] release on demand Signed-off-by: salaboy --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fbc9c16..1fc1846a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,7 @@ name: Release Pipeline on: workflow_dispatch: + inputs: jobs: publish: From 9ef68e428b697f673e458fcff4fc9c3982984b6c Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:18:10 +0100 Subject: [PATCH 10/12] on dispatch Signed-off-by: salaboy --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fc1846a..e5ac1f7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,9 +7,7 @@ name: Release Pipeline -on: - workflow_dispatch: - inputs: +on: workflow_dispatch jobs: publish: From 259166cf315fd167fd9080fb9c8a592a89c8ef16 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:31:56 +0100 Subject: [PATCH 11/12] removing azure modules Signed-off-by: salaboy --- settings.gradle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/settings.gradle b/settings.gradle index 8cdaf47b..3b07b5e8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,9 +1,6 @@ rootProject.name = 'durabletask-java' include ":client" -//include ":azurefunctions" -//include ":azuremanaged" -//include ":samples" -//include ":samples-azure-functions" -//include ":endtoendtests" +include ":samples" +include ":endtoendtests" From 9cf99352c5393a5db1f2055062da3d52da4d6c59 Mon Sep 17 00:00:00 2001 From: salaboy Date: Wed, 7 May 2025 20:34:19 +0100 Subject: [PATCH 12/12] simplifying build Signed-off-by: salaboy --- .github/workflows/build-validation.yml | 78 -------------------------- settings.gradle | 2 - 2 files changed, 80 deletions(-) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 94d18fb3..bd7d4a2a 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -112,81 +112,3 @@ jobs: - name: Fail the job if tests failed if: env.TEST_FAILED == 'true' run: exit 1 - - functions-e2e-tests: - - needs: build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'temurin' - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Publish to local - run: ./gradlew publishToMavenLocal -PskipSigning - - - name: Build azure functions sample - run: ./gradlew azureFunctionsPackage - continue-on-error: true - - - name: Setup azure functions runtime - run: endtoendtests/e2e-test-setup.ps1 -DockerfilePath endtoendtests/Dockerfile - shell: pwsh - - - name: End to End Tests with Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: endToEndTest - - - name: Archive test report - uses: actions/upload-artifact@v4 - with: - name: Integration test report - path: client/build/reports/tests/endToEndTest - - functions-sample-tests: - - needs: build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'temurin' - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Publish to local - run: ./gradlew publishToMavenLocal -PskipSigning - - - name: Build azure functions sample - run: ./gradlew azureFunctionsPackage - continue-on-error: true - - - name: Setup azure functions runtime - run: samples-azure-functions/e2e-test-setup.ps1 -DockerfilePath samples-azure-functions/Dockerfile - shell: pwsh - - - name: Sample Tests with Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: sampleTest - - - name: Archive test report - uses: actions/upload-artifact@v4 - with: - name: Integration test report - path: client/build/reports/tests/endToEndTest \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3b07b5e8..cefeef31 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,4 @@ rootProject.name = 'durabletask-java' include ":client" -include ":samples" -include ":endtoendtests"