GHA: snapshot build on every push and slack notifications on failed builds

This commit is contained in:
aboyko
2023-11-01 14:03:44 -04:00
parent c3ceee03bd
commit e27b678ea9
5 changed files with 63 additions and 6 deletions

View File

@@ -28,8 +28,7 @@ jobs:
qualifier=`echo "${release##*.}"`
echo $version
echo $qualifier
echo "## ${release}" > ${{ github.workspace }}/gen-changelog.md
sed "/${version} ${qualifier}/,/^## .*/!d;//d;s/^* /- /" Changelog.md >> ${{ github.workspace }}/gen-changelog.md
sed "/${version} ${qualifier}/,/^## .*/!d;//d;s/^* /- /" Changelog.md > ${{ github.workspace }}/gen-changelog.md
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: changelog-${{ inputs.version }}-${{ github.run_id }}.md
@@ -62,7 +61,7 @@ jobs:
with:
id: ${{ inputs.version }}
tag_name: ${{ inputs.version }}
release_name: Release ${{ inputs.version }}
release_name: ${{ inputs.version }}
body_path: ${{ github.workspace }}/gen-changelog.md
draft: true
prerelease: false

View File

@@ -99,3 +99,11 @@ jobs:
else
./mvnw --batch-mode clean package -Pe430 -P${{ inputs.build_type }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
fi
notify-failure:
if: ${{ failure() }}
uses: ./.github/workflows/notify-failed-build.yml
with:
link: '[${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
label: 'Failed LS Extensions ${{ inputs.build_type }} build'
secrets: inherit

View File

@@ -320,3 +320,11 @@ jobs:
AWS_DEFAULT_REGION: us-east-1
run: |
aws s3 rm s3://dist.springsource.com/sts4-distro-ci-temp --recursive --exclude "*" --include "${{ needs.eclipse-distro-build.outputs.id }}/*"
notify-failure:
if: ${{ failure() }}
uses: ./.github/workflows/notify-failed-build.yml
with:
link: '[${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
label: 'Failed Eclipse ${{ inputs.eclipse_profile }} Distribution ${{ inputs.build_type }} build'
secrets: inherit

View File

@@ -0,0 +1,42 @@
name: Notify Failed Build
on:
workflow_call:
inputs:
link:
description: Workflow URL link markdown
required: true
type: string
label:
description: Build label
required: true
type: string
jobs:
notify-failure:
steps:
- id: tools-team-slack
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
env:
SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
with:
channel-id: "C0188MENU2J"
payload: |
{
"text": "${{ inputs.label }} ${{ inputs.link }}",
"attachments": [
{
"pretext": "Build Failed",
"color": "f0190a",
"fields": [
{
"title": "Status",
"short": true,
"value": "Failed"
}
]
}
]
}

View File

@@ -6,9 +6,9 @@ concurrency:
on:
workflow_dispatch:
# push:
# branches:
# - 'main'
push:
branches:
- 'main'
jobs:
eclipse-ls-extensions: