From fdfa8bbfc8145c15490e75324af4b74ac88e36f3 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Tue, 24 Jan 2023 14:32:55 +0000 Subject: [PATCH] Publish Java to bestbeforetoday --- .github/scripts/maven_publish_release.sh | 4 +- .github/scripts/maven_publish_snapshot.sh | 4 +- .github/workflows/build-docs.yml | 1 + .github/workflows/push.yml | 10 +- .github/workflows/release.yml | 1 + .github/workflows/test.yml | 171 +++++++++++----------- .github/workflows/verify-versions.yml | 1 + 7 files changed, 97 insertions(+), 95 deletions(-) diff --git a/.github/scripts/maven_publish_release.sh b/.github/scripts/maven_publish_release.sh index 465a957a9..d7c71a327 100755 --- a/.github/scripts/maven_publish_release.sh +++ b/.github/scripts/maven_publish_release.sh @@ -5,5 +5,5 @@ set -eu -o pipefail POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout) PUBLISH_VERSION="${POM_VERSION%%-*}" -mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}" -mvn --batch-mode --activate-profiles release -DskipTests deploy +mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}" +mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy diff --git a/.github/scripts/maven_publish_snapshot.sh b/.github/scripts/maven_publish_snapshot.sh index e9702f8d8..7c3ad005a 100755 --- a/.github/scripts/maven_publish_snapshot.sh +++ b/.github/scripts/maven_publish_snapshot.sh @@ -6,5 +6,5 @@ POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpressi GATEWAY_VERSION="${POM_VERSION%%-*}" PUBLISH_VERSION="${GATEWAY_VERSION}-SNAPSHOT" -mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}" -mvn --batch-mode --activate-profiles release -DskipTests deploy +mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}" +mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 236e4c9ed..dca9cf6b2 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -28,6 +28,7 @@ jobs: with: java-version: 17 distribution: temurin + cache: maven - name: Generate JavaDoc run: make generate-docs-java - name: Upload JavaDoc diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 851bd11b2..4ec472b3c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -17,7 +17,6 @@ jobs: - name: Checkout source uses: actions/checkout@v3 with: - ref: gh-pages path: source - name: Checkout publish uses: actions/checkout@v3 @@ -27,20 +26,18 @@ jobs: token: ${{ secrets.REPO_ACCESS_TOKEN }} - name: Remove old API documentation shell: bash - run: rm -rf "${GITHUB_REF_NAME}/api" + run: rm -rf "${GITHUB_REF_NAME}/api" working-directory: publish - name: Download JavaDoc uses: actions/download-artifact@v3 - working-directory: publish with: name: java-doc - path: ${{ github.ref_name }}/api/java + path: publish/${{ github.ref_name }}/api/java - name: Download Node documentation uses: actions/download-artifact@v3 - working-directory: publish with: name: node-doc - path: ${{ github.ref_name }}/api/node + path: publish/${{ github.ref_name }}/api/node - name: Publish working-directory: publish env: @@ -80,6 +77,7 @@ jobs: with: java-version: 8 distribution: temurin + cache: maven gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b6f2cb30..d7ed57977 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,7 @@ jobs: with: java-version: 8 distribution: temurin + cache: maven server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91888295b..a2172d79e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,90 +21,91 @@ jobs: needs: verify-versions uses: ./.github/workflows/build-docs.yml - go: - needs: verify-versions - runs-on: ubuntu-22.04 - name: Test Go - strategy: - fail-fast: false - matrix: - go-version: - - 1.17 - - 1.18 - - 1.19 - env: - SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - - name: Install SoftHSM - run: ./.github/scripts/install_softhsm.sh - env: - TMPDIR: ${{ runner.temp }} - - name: Generate mocks - run: make generate - - name: Run unit tests - run: make unit-test-go-pkcs11 - - name: Pull Fabric Docker images - run: make pull-latest-peer - - name: Run scenario tests - run: make scenario-test-go + # go: + # needs: verify-versions + # runs-on: ubuntu-22.04 + # name: Test Go + # strategy: + # fail-fast: false + # matrix: + # go-version: + # - 1.17 + # - 1.18 + # - 1.19 + # env: + # SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-go@v3 + # with: + # go-version: ${{ matrix.go-version }} + # - name: Install SoftHSM + # run: ./.github/scripts/install_softhsm.sh + # env: + # TMPDIR: ${{ runner.temp }} + # - name: Generate mocks + # run: make generate + # - name: Run unit tests + # run: make unit-test-go-pkcs11 + # - name: Pull Fabric Docker images + # run: make pull-latest-peer + # - name: Run scenario tests + # run: make scenario-test-go - node: - needs: verify-versions - runs-on: ubuntu-22.04 - name: Test Node - strategy: - fail-fast: false - matrix: - node-version: - - 14 - - 16 - - 18 - env: - SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Run unit tests - run: make unit-test-node - - name: Install SoftHSM - run: ./.github/scripts/install_softhsm.sh - env: - TMPDIR: ${{ runner.temp }} - - name: Pull Fabric Docker images - run: make pull-latest-peer - - name: Run scenario tests - run: make scenario-test-node + # node: + # needs: verify-versions + # runs-on: ubuntu-22.04 + # name: Test Node + # strategy: + # fail-fast: false + # matrix: + # node-version: + # - 14 + # - 16 + # - 18 + # env: + # SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-node@v3 + # with: + # node-version: ${{ matrix.node-version }} + # - uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.DEFAULT_GO_VERSION }} + # - name: Run unit tests + # run: make unit-test-node + # - name: Install SoftHSM + # run: ./.github/scripts/install_softhsm.sh + # env: + # TMPDIR: ${{ runner.temp }} + # - name: Pull Fabric Docker images + # run: make pull-latest-peer + # - name: Run scenario tests + # run: make scenario-test-node - java: - needs: verify-versions - runs-on: ubuntu-22.04 - name: Test Java - strategy: - fail-fast: false - matrix: - java-version: - - 8 - - 11 - - 17 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java-version }} - distribution: temurin - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - name: Pull Fabric Docker images - run: make pull-latest-peer - - name: Run unit and scenario tests - run: make scenario-test-java + # java: + # needs: verify-versions + # runs-on: ubuntu-22.04 + # name: Test Java + # strategy: + # fail-fast: false + # matrix: + # java-version: + # - 8 + # - 11 + # - 17 + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-java@v3 + # with: + # java-version: ${{ matrix.java-version }} + # distribution: temurin + # cache: maven + # - uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.DEFAULT_GO_VERSION }} + # - name: Pull Fabric Docker images + # run: make pull-latest-peer + # - name: Run unit and scenario tests + # run: make scenario-test-java diff --git a/.github/workflows/verify-versions.yml b/.github/workflows/verify-versions.yml index 74874a326..16a3179ab 100644 --- a/.github/workflows/verify-versions.yml +++ b/.github/workflows/verify-versions.yml @@ -48,6 +48,7 @@ jobs: with: java-version: 17 distribution: temurin + cache: maven - name: Check Java artifact version shell: bash working-directory: java