Revert "Migrate slack notifications to GChat"
This reverts commits: -5d335ccf8d
-a5b1dec99a
This commit is contained in:
parent
e9e0ec89fb
commit
7149622efd
|
@ -209,11 +209,26 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "Tagging and publishing $REPO@$VERSION release on GitHub."
|
echo "Tagging and publishing $REPO@$VERSION release on GitHub."
|
||||||
./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
|
./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
|
||||||
- name: Announce Release on GChat
|
- name: Announce Release on Slack
|
||||||
|
id: spring-security-announcing
|
||||||
|
uses: slackapi/slack-github-action@v1.26.0
|
||||||
|
with:
|
||||||
|
payload: |
|
||||||
|
{
|
||||||
|
"text": "spring-security-announcing `${{ env.VERSION }}` is available now",
|
||||||
|
"blocks": [
|
||||||
|
{
|
||||||
|
"type": "section",
|
||||||
|
"text": {
|
||||||
|
"type": "mrkdwn",
|
||||||
|
"text": "spring-security-announcing `${{ env.VERSION }}` is available now"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
env:
|
env:
|
||||||
WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }}
|
||||||
run: |
|
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||||
curl -X POST '$WEBHOOK_URL' -H 'Content-Type: application/json' -d '{ text: "spring-security-announcing `$VERSION` is available now" }' || true
|
|
||||||
- name: Setup git config
|
- name: Setup git config
|
||||||
run: |
|
run: |
|
||||||
git config user.name 'github-actions[bot]'
|
git config user.name 'github-actions[bot]'
|
||||||
|
@ -245,16 +260,20 @@ jobs:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
- name: Schedule next release (if not already scheduled)
|
- name: Schedule next release (if not already scheduled)
|
||||||
run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN
|
run: ./gradlew scheduleNextRelease -PnextVersion=$VERSION -PgitHubAccessToken=$TOKEN
|
||||||
send-notification:
|
notify_result:
|
||||||
name: Send Notification
|
name: Check for failures
|
||||||
needs: [ perform_release, perform_post_release ]
|
needs: [perform_release, perform_post_release]
|
||||||
if: failure()
|
if: failure()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
steps:
|
steps:
|
||||||
- name: Send Notification
|
- name: Send Slack message
|
||||||
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1
|
# Workaround while waiting for Gamesight/slack-workflow-status#38 to be fixed
|
||||||
|
# See https://github.com/Gamesight/slack-workflow-status/issues/38
|
||||||
|
uses: sjohnr/slack-workflow-status@v1-beta
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: ${{ job.status }}
|
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }}
|
channel: '#spring-security-ci'
|
||||||
run-name: ${{ format('spring-security/{0}', github.ref_name) }}
|
name: 'CI Notifier'
|
||||||
|
|
|
@ -8,7 +8,7 @@ env:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
jobs:
|
jobs:
|
||||||
spring-releasetrain-checks:
|
spring-releasetrain-checks:
|
||||||
name: Check DueOn is on a Release Date
|
name: Check DueOn is on a Release Date
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.repository == 'spring-projects/spring-security' }}
|
if: ${{ github.repository == 'spring-projects/spring-security' }}
|
||||||
|
@ -23,16 +23,18 @@ jobs:
|
||||||
export TOOL_VERSION=0.1.1
|
export TOOL_VERSION=0.1.1
|
||||||
wget "https://repo.maven.apache.org/maven2/io/spring/releasetrain/spring-release-train-tools/$TOOL_VERSION/spring-release-train-tools-$TOOL_VERSION.jar"
|
wget "https://repo.maven.apache.org/maven2/io/spring/releasetrain/spring-release-train-tools/$TOOL_VERSION/spring-release-train-tools-$TOOL_VERSION.jar"
|
||||||
java -cp "spring-release-train-tools-$TOOL_VERSION.jar" io.spring.releasetrain.CheckMilestoneDueOnMain --dueOn "$DUE_ON" --expectedDayOfWeek MONDAY --expectedMondayCount 3
|
java -cp "spring-release-train-tools-$TOOL_VERSION.jar" io.spring.releasetrain.CheckMilestoneDueOnMain --dueOn "$DUE_ON" --expectedDayOfWeek MONDAY --expectedMondayCount 3
|
||||||
send-notification:
|
notify_result:
|
||||||
name: Send Notification
|
name: Check for failures
|
||||||
needs: [ spring-releasetrain-checks ]
|
needs: [spring-releasetrain-checks]
|
||||||
if: failure()
|
if: failure()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
steps:
|
steps:
|
||||||
- name: Send Notification
|
- name: Send Slack message
|
||||||
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1
|
uses: Gamesight/slack-workflow-status@v1.3.0
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: ${{ job.status }}
|
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }}
|
channel: '#spring-security-ci'
|
||||||
run-name: ${{ format('spring-security/{0}', github.ref_name) }}
|
name: 'CI Notifier'
|
||||||
|
|
|
@ -4,6 +4,7 @@ on:
|
||||||
workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main.
|
workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main.
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -57,11 +58,12 @@ jobs:
|
||||||
git tag $updatedVersion
|
git tag $updatedVersion
|
||||||
git push
|
git push
|
||||||
git push origin $updatedVersion
|
git push origin $updatedVersion
|
||||||
- name: Send Notification
|
- id: send-slack-notification
|
||||||
|
name: Send Slack message
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1
|
uses: Gamesight/slack-workflow-status@v1.3.0
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: ${{ job.status }}
|
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }}
|
channel: '#spring-security-ci'
|
||||||
run-name: ${{ format('spring-security/{0}', github.ref_name) }}
|
name: 'CI Notifier'
|
||||||
|
|
Loading…
Reference in New Issue