From 2bfe62f224e211cd06d911024a23b49a60a86305 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Wed, 6 Apr 2022 08:13:38 +0100 Subject: [PATCH] Change workflows for branching 3.1.x --- .github/workflows/central-sync-close.yml | 22 -------- .github/workflows/central-sync-create.yml | 58 ---------------------- .github/workflows/central-sync-release.yml | 22 -------- .github/workflows/ci.yml | 4 +- .github/workflows/issue-handler.yml | 40 --------------- .github/workflows/label-manage.yml | 23 --------- .github/workflows/label-rename.yml | 17 ------- .github/workflows/mongodb.yml | 4 +- .github/workflows/pr.yml | 2 +- .github/workflows/redis.yml | 4 +- .github/workflows/release-ga.yml | 8 +-- .github/workflows/release-milestone.yml | 4 +- .github/workflows/smoke.yml | 4 +- .github/workflows/stale-issues.yml | 36 -------------- 14 files changed, 15 insertions(+), 233 deletions(-) delete mode 100644 .github/workflows/central-sync-close.yml delete mode 100644 .github/workflows/central-sync-create.yml delete mode 100644 .github/workflows/central-sync-release.yml delete mode 100644 .github/workflows/issue-handler.yml delete mode 100644 .github/workflows/label-manage.yml delete mode 100644 .github/workflows/label-rename.yml delete mode 100644 .github/workflows/stale-issues.yml diff --git a/.github/workflows/central-sync-close.yml b/.github/workflows/central-sync-close.yml deleted file mode 100644 index 928924e8..00000000 --- a/.github/workflows/central-sync-close.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Central Sync Close - -on: - workflow_dispatch: - inputs: - stagedRepositoryId: - description: "Staged repository id" - required: true - -jobs: - build: - runs-on: ubuntu-latest - steps: - - # Request close promotion repo - - uses: jvalkeal/nexus-sync@v0 - with: - 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 }} - close: true diff --git a/.github/workflows/central-sync-create.yml b/.github/workflows/central-sync-create.yml deleted file mode 100644 index a3be1ba1..00000000 --- a/.github/workflows/central-sync-create.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Central Sync Create - -on: - workflow_dispatch: - inputs: - buildName: - description: "Artifactory build name" - required: true - buildNumber: - description: "Artifactory build number" - required: true - -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 - with: - version: 1.50.0 - 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 - id: nexus - 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 - 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.outputs.staged-repository-id }} diff --git a/.github/workflows/central-sync-release.yml b/.github/workflows/central-sync-release.yml deleted file mode 100644 index a6c53574..00000000 --- a/.github/workflows/central-sync-release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Central Sync Release - -on: - workflow_dispatch: - inputs: - stagedRepositoryId: - description: "Staged repository id" - required: true - -jobs: - build: - runs-on: ubuntu-latest - steps: - - # Request release promotion repo - - uses: jvalkeal/nexus-sync@v0 - with: - 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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0df8a0b7..a4fc5ec2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - main + - 3.1.x paths-ignore: - '.github/**' @@ -72,7 +72,7 @@ jobs: --server-id-deploy=repo.spring.io \ --repo-resolve=snapshot \ --repo-deploy=snapshot - echo JFROG_CLI_BUILD_NAME=spring-statemachine-main >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NAME=spring-statemachine-31x >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV # as we already tested just build and publish diff --git a/.github/workflows/issue-handler.yml b/.github/workflows/issue-handler.yml deleted file mode 100644 index a678b429..00000000 --- a/.github/workflows/issue-handler.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Issue Handler - -on: - workflow_dispatch: - issues: - types: [opened, labeled, unlabeled] - -jobs: - labeler: - runs-on: ubuntu-latest - steps: - - - name: Handle Issues - uses: jvalkeal/issue-handler@v0.0.6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - config: > - { - "data": { - "team": ["jvalkeal"] - }, - "recipes": [ - { - "name": "Mark new issue to get triaged", - "type": "ifThen", - "if": "isAction('opened') && !dataInArray('team', actor)", - "then": "labelIssue(['status/need-triage'])" - }, - { - "name": "Manage backport issues", - "type": "manageBackportIssues", - "whenLabeled": "labeledStartsWith(['branch/'])", - "whenUnlabeled": "labeledStartsWith(['branch/'])", - "whenLabels": "labelsContainsAny(['for/backport'])", - "fromLabels": "labeledStartsWith(['branch/'])", - "additionalLabels": "'type/backport'", - "body": "'Backport #' + number" - } - ] - } diff --git a/.github/workflows/label-manage.yml b/.github/workflows/label-manage.yml deleted file mode 100644 index 42295c4c..00000000 --- a/.github/workflows/label-manage.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Labels Manage - -on: - push: - branches: - - 'main' - paths: - - '.github/labels-manage.yml' - - '.github/workflows/label-manage.yml' - workflow_dispatch: - -jobs: - labeler: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Mangle Labels - uses: crazy-max/ghaction-github-labeler@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - yaml-file: .github/labels-manage.yml - dry-run: false - skip-delete: false diff --git a/.github/workflows/label-rename.yml b/.github/workflows/label-rename.yml deleted file mode 100644 index 52f62d0a..00000000 --- a/.github/workflows/label-rename.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Labels Rename - -on: - workflow_dispatch: - -jobs: - labeler: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Rename Labels - uses: crazy-max/ghaction-github-labeler@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - yaml-file: .github/labels-rename.yml - dry-run: false - skip-delete: true diff --git a/.github/workflows/mongodb.yml b/.github/workflows/mongodb.yml index 068e2fd1..e02d28db 100644 --- a/.github/workflows/mongodb.yml +++ b/.github/workflows/mongodb.yml @@ -4,12 +4,12 @@ on: workflow_dispatch: push: branches: - - main + - 3.1.x paths-ignore: - '.github/**' pull_request: branches: - - main + - 3.1.x jobs: build: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 36519a31..ba9266a5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -3,7 +3,7 @@ name: PR on: pull_request: branches: - - main + - 3.1.x jobs: diff --git a/.github/workflows/redis.yml b/.github/workflows/redis.yml index ad921af2..5ef9dc54 100644 --- a/.github/workflows/redis.yml +++ b/.github/workflows/redis.yml @@ -4,12 +4,12 @@ on: workflow_dispatch: push: branches: - - main + - 3.1.x paths-ignore: - '.github/**' pull_request: branches: - - main + - 3.1.x jobs: build: diff --git a/.github/workflows/release-ga.yml b/.github/workflows/release-ga.yml index 555de8f7..c63854dc 100644 --- a/.github/workflows/release-ga.yml +++ b/.github/workflows/release-ga.yml @@ -37,7 +37,7 @@ jobs: --server-id-deploy=repo.spring.io \ --repo-resolve=libs-release \ --repo-deploy=libs-staging-local - echo JFROG_CLI_BUILD_NAME=spring-statemachine-main-release >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NAME=spring-statemachine-31x-release >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV # switch from snapshot to a release version and extract project # version to get used with tagging @@ -90,7 +90,7 @@ jobs: --server-id-deploy=repo.spring.io \ --repo-resolve=libs-release \ --repo-deploy=libs-staging-local - echo JFROG_CLI_BUILD_NAME=spring-statemachine-main-release >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NAME=spring-statemachine-31x-release >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV # promoting build from staging repo into release - name: Promote Build @@ -102,7 +102,7 @@ jobs: jfrog rt gradle nextVersion - uses: jvalkeal/build-zoo-handler@v0.0.4 with: - commit-changes-branch: main + commit-changes-branch: 3.1.x commit-changes-message: Next development version # gh release before central @@ -174,7 +174,7 @@ jobs: # prepare env for cli do download released files - name: Configure JFrog Cli run: | - echo JFROG_CLI_BUILD_NAME=spring-statemachine-main-release >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NAME=spring-statemachine-31x-release >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV # download released files for a build. # spec file defines files we actually need for central diff --git a/.github/workflows/release-milestone.yml b/.github/workflows/release-milestone.yml index 7bce2960..08846651 100644 --- a/.github/workflows/release-milestone.yml +++ b/.github/workflows/release-milestone.yml @@ -41,7 +41,7 @@ jobs: --server-id-deploy=repo.spring.io \ --repo-resolve=libs-milestone \ --repo-deploy=libs-staging-local - echo JFROG_CLI_BUILD_NAME=spring-statemachine-main-milestone >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NAME=spring-statemachine-31x-milestone >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV # switch from snapshot to a release version and extract project # version to get used with tagging @@ -94,7 +94,7 @@ jobs: --server-id-deploy=repo.spring.io \ --repo-resolve=libs-milestone \ --repo-deploy=libs-staging-local - echo JFROG_CLI_BUILD_NAME=spring-statemachine-main-milestone >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NAME=spring-statemachine-31x-milestone >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV # promoting build from staging repo into release - name: Promote Build diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 2c0d7c41..b1e73059 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -4,12 +4,12 @@ on: workflow_dispatch: push: branches: - - main + - 3.1.x paths-ignore: - '.github/**' pull_request: branches: - - main + - 3.1.x jobs: build: diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml deleted file mode 100644 index 7cb65045..00000000 --- a/.github/workflows/stale-issues.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Stale Issues - -on: - workflow_dispatch: - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - name: Handle Stale Issues - uses: jvalkeal/issue-handler@v0.0.6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - dry-run: true - config: > - { - "recipes": [ - { - "name": "Handle stale issues", - "type": "staleIssues", - "issueSince": "2020-08-01", - "issueBeforeStale": 60, - "issueBeforeClose": 7, - "issueStaleMessage": "This issue is stale because it has been open 60 days with no activity. Remove status/stale label or comment or this will be closed in 7 days", - "issueCloseMessage": "Closing stale issue due to inactivity", - "issueStaleLabel": "status/stale", - "issueCloseLabel": "status/closed-as-stale", - "issueExemptLabels": [ - "status/on-hold", - "type/bug", - "type/need-investigation" - ], - "issueUnstaleWhenUpdated": true - } - ] - }