Change workflows for branching 3.1.x

This commit is contained in:
Janne Valkealahti
2022-04-06 08:13:38 +01:00
parent e33b3fc9f1
commit 2bfe62f224
14 changed files with 15 additions and 233 deletions

View File

@@ -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

View File

@@ -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 }}

View File

@@ -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

View File

@@ -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

View File

@@ -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"
}
]
}

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -3,7 +3,7 @@ name: PR
on:
pull_request:
branches:
- main
- 3.1.x
jobs:

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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
}
]
}