diff --git a/.github/workflows/apps-plugin-milestone.yml b/.github/workflows/apps-plugin-milestone.yml index 443c7e5d..5a651a03 100644 --- a/.github/workflows/apps-plugin-milestone.yml +++ b/.github/workflows/apps-plugin-milestone.yml @@ -18,7 +18,7 @@ jobs: run: working-directory: spring-cloud-dataflow-apps-plugin steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: java-version: 17 @@ -27,7 +27,7 @@ jobs: with: maven-version: 3.8.8 maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/' - - uses: jfrog/setup-jfrog-cli@v1 + - uses: jfrog/setup-jfrog-cli@v3 with: version: 1.46.4 env: diff --git a/.github/workflows/apps-plugin-release.yml b/.github/workflows/apps-plugin-release.yml index efd028e0..28c06fdb 100644 --- a/.github/workflows/apps-plugin-release.yml +++ b/.github/workflows/apps-plugin-release.yml @@ -14,7 +14,7 @@ jobs: run: working-directory: spring-cloud-dataflow-apps-plugin steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: java-version: 17 @@ -23,7 +23,7 @@ jobs: with: maven-version: 3.8.8 maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/' - - uses: jfrog/setup-jfrog-cli@v1 + - uses: jfrog/setup-jfrog-cli@v3 with: version: 1.46.4 env: diff --git a/.github/workflows/apps-plugin-snapshot.yml b/.github/workflows/apps-plugin-snapshot.yml index bf2e6596..669ed830 100644 --- a/.github/workflows/apps-plugin-snapshot.yml +++ b/.github/workflows/apps-plugin-snapshot.yml @@ -17,7 +17,7 @@ jobs: run: working-directory: spring-cloud-dataflow-apps-plugin steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: java-version: 17 @@ -26,7 +26,7 @@ jobs: with: maven-version: 3.8.8 maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/' - - uses: jfrog/setup-jfrog-cli@v1 + - uses: jfrog/setup-jfrog-cli@v3 with: version: 1.46.4 env: diff --git a/.github/workflows/cental-sync.yml b/.github/workflows/cental-sync-create.yml similarity index 76% rename from .github/workflows/cental-sync.yml rename to .github/workflows/cental-sync-create.yml index d2f2d08e..a270c63b 100644 --- a/.github/workflows/cental-sync.yml +++ b/.github/workflows/cental-sync-create.yml @@ -1,4 +1,4 @@ -name: Central Sync +name: Central Sync (Create) on: workflow_dispatch: @@ -14,32 +14,25 @@ jobs: build: runs-on: ubuntu-latest steps: - - # to get spec file in .github - - uses: actions/checkout@v2 - - # Setup jfrog cli - - uses: jfrog/setup-jfrog-cli@v1 + - uses: actions/checkout@v3 + - uses: jfrog/setup-jfrog-cli@v3 with: version: 1.46.4 env: JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - # Extract build id from input - name: Extract Build Id run: | echo JFROG_CLI_BUILD_NAME=${{ github.event.inputs.buildName }} >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=${{ github.event.inputs.buildNumber }} >> $GITHUB_ENV - - # Download released files - name: Download Release Files run: | jfrog rt download \ --spec .github/release-files-spec.json \ --spec-vars "buildname=$JFROG_CLI_BUILD_NAME;buildnumber=$JFROG_CLI_BUILD_NUMBER" - - # Create checksums, signatures and create staging repo on central and upload - - uses: jvalkeal/nexus-sync@v0 + # Create checksums, signatures and create staging repo + - name: Create Nexus staging repo + uses: jvalkeal/nexus-sync@v0 + id: nexus-sync with: url: ${{ secrets.OSSRH_URL }} username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} @@ -48,8 +41,12 @@ jobs: create: true upload: true close: true - release: true + release: false generate-checksums: true pgp-sign: true pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }} pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + + # Print staging repo id + - name: Print Staging Repo Id + run: echo ${{ steps.nexus-sync.outputs.staged-repository-id }} diff --git a/.github/workflows/central-release.yml b/.github/workflows/central-release.yml deleted file mode 100644 index 3e85f567..00000000 --- a/.github/workflows/central-release.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Central Release - -on: - workflow_dispatch: - inputs: - build-zoo-handler: - description: 'Build Zoo Handler Payload' - required: true - -jobs: - central: - runs-on: ubuntu22-8-32 - environment: central - steps: - - # to get spec file in .github - - uses: actions/checkout@v2 - - # Setup jfrog cli - - uses: jfrog/setup-jfrog-cli@v1 - with: - version: 1.46.4 - env: - JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - # zoo extract and ensure - - name: Extract Zoo Context Properties - uses: jvalkeal/build-zoo-handler@v0.0.4 - with: - dispatch-handler-extract-context-properties: true - ensure-env: | - BUILD_ZOO_HANDLER_spring_cloud_deployer_buildname - BUILD_ZOO_HANDLER_spring_cloud_deployer_buildnumber - BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname - BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildnumber - BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname - BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber - - # Download released files - - name: Download Release Files - run: | - jfrog rt download \ - --spec .github/release-files-spec.json \ - --spec-vars "buildname=$BUILD_ZOO_HANDLER_spring_cloud_deployer_buildname;buildnumber=$BUILD_ZOO_HANDLER_spring_cloud_deployer_buildnumber" - jfrog rt download \ - --spec .github/release-files-spec.json \ - --spec-vars "buildname=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname;buildnumber=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildnumber" - jfrog rt download \ - --spec .github/release-files-spec.json \ - --spec-vars "buildname=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname;buildnumber=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber" - - # Create checksums, signatures and create staging repo on central and upload - - uses: jvalkeal/nexus-sync@v0 - with: - url: ${{ secrets.OSSRH_URL }} - username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} - password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} - staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }} - create: true - upload: true - close: true - release: true - generate-checksums: true - pgp-sign: true - pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }} - pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - - # zoo success - - name: Notify Build Success Zoo Handler Controller - uses: jvalkeal/build-zoo-handler@v0.0.4 - with: - dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }} - dispatch-handler-client-payload-data: > - { - "event": "central-succeed" - } - - # zoo failure - - name: Notify Build Failure Zoo Handler Controller - if: ${{ failure() }} - uses: jvalkeal/build-zoo-handler@v0.0.4 - with: - dispatch-handler-token: ${{ secrets.REPO_ACCESS_TOKEN }} - dispatch-handler-client-payload-data: > - { - "event": "central-failed" - } diff --git a/.github/workflows/central-sync-release.yml b/.github/workflows/central-sync-release.yml new file mode 100644 index 00000000..5db4aa5d --- /dev/null +++ b/.github/workflows/central-sync-release.yml @@ -0,0 +1,22 @@ +name: Central Sync (Release) + +on: + workflow_dispatch: + inputs: + stagedRepositoryId: + description: "Staged repository id" + required: true + +permissions: {} +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: jvalkeal/nexus-sync@v0 + with: + url: ${{ secrets.OSSRH_URL }} + username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} + password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} + staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }} + staging-repo-id: ${{ github.event.inputs.stagedRepositoryId }} + release: true