Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #19981] adding notifications to 'Publish CDK Manually' #21157

Merged
merged 10 commits into from
Jan 17, 2023
114 changes: 113 additions & 1 deletion .github/workflows/publish-cdk-command-manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ on:
type: choice
description: "Choose the type of version upgrade : major|minor|patch"
options:
- none
- major
- minor
- patch
- none
required: true
skip-publish-test:
description: 'By default, the job publishes to Test PyPi. Use "true" to only publish to actual PyPi servers.'
Expand Down Expand Up @@ -58,6 +58,34 @@ jobs:
commit_message: 🤖 Bump ${{ github.event.inputs.release-type }} version of Airbyte CDK
commit_user_name: Octavia Squidington III
commit_user_email: octavia-squidington-iii@users.noreply.github.com
- name: Post failure to Slack channel dev-connectors-extensibility
maxi297 marked this conversation as resolved.
Show resolved Hide resolved
if: !success()
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
with:
channel-id: C04J1M66D8B
payload: |
{
"text": "Error during `bump-version` while publishing Airbyte CDK!"
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Error while publishing Airbyte CDK!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "See details on <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}

build-cdk:
needs: bump-version
Expand All @@ -77,6 +105,34 @@ jobs:
ref: ${{ github.event.inputs.gitref }}
- name: Build CDK Package
run: SUB_BUILD=CONNECTORS_BASE ./gradlew --no-daemon --no-build-cache :airbyte-cdk:python:build
- name: Post failure to Slack channel dev-connectors-extensibility
if: !success()
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
with:
channel-id: C04J1M66D8B
payload: |
{
"text": "Error during `build-cdk` while publishing Airbyte CDK!"
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Error while publishing Airbyte CDK!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "See details on <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}

publish-cdk:
needs: build-cdk
Expand Down Expand Up @@ -109,3 +165,59 @@ jobs:
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
- name: Post success to Slack channel dev-connectors-extensibility
if: success()
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
with:
channel-id: C04J1M66D8B
payload: |
{
"text": "A new version of Airbyte CDK has been released!"
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A new version of Airbyte CDK has been released!\n\n"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "See details on <https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/python/CHANGELOG.md?plain=1#L3-L4|CHANGELOG.md> and <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
- name: Post failure to Slack channel dev-connectors-extensibility
if: !success()
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
with:
channel-id: C04J1M66D8B
payload: |
{
"text": "Error during `publish-cdk` while publishing Airbyte CDK!"
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Error while publishing Airbyte CDK!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "See details on <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}