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

Notify nightly failures #14049

Merged
merged 8 commits into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 102 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ jobs:
export GEM_HOST_API_KEY="Bearer $GITHUB_TOKEN"
bazel run //rb:${{ matrix.gem }}-bump-nightly-version ${{ inputs.version }}
bazel run //rb:${{ matrix.gem }}-release-nightly
on-ruby-failure:
name: On Ruby Failure
runs-on: ubuntu-latest
if: ${{ always() && (needs.ruby.result == 'failure' || needs.ruby.result == 'timed_out') }}
needs: ruby
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":rotating_light:"
SLACK_COLOR: ${{ needs.ruby.status }}
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: Nightly Ruby ${{ needs.ruby.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

python:
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'python' || github.event_name == 'schedule')
Expand All @@ -53,7 +70,23 @@ jobs:
pip install twine
twine upload --repository testpypi bazel-bin/py/selenium-4*.whl bazel-bin/py/selenium-4*.tar.gz
secrets: inherit

on-python-failure:
name: On Python Failure
runs-on: ubuntu-latest
if: ${{ always() && (needs.python.result == 'failure' || needs.python.result == 'timed_out') }}
needs: python
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":rotating_light:"
SLACK_COLOR: ${{ needs.python.status }}
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: Nightly Python ${{ needs.python.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

java:
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'java' || github.event_name == 'schedule')
Expand All @@ -65,6 +98,23 @@ jobs:
run: |
./go publish-maven-snapshot
secrets: inherit
on-java-failure:
name: On Java Failure
runs-on: ubuntu-latest
if: ${{ always() && (needs.java.result == 'failure' || needs.java.result == 'timed_out') }}
needs: java
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":rotating_light:"
SLACK_COLOR: ${{ needs.java.status }}
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: Nightly Java ${{ needs.java.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

dotnet:
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'dotnet' || github.event_name == 'schedule')
Expand All @@ -78,6 +128,23 @@ jobs:
./go "dotnet:version[nightly]"
./go dotnet:release
secrets: inherit
on-dotnet-failure:
name: On .NET Failure
runs-on: ubuntu-latest
if: ${{ always() && (needs.dotnet.result == 'failure' || needs.dotnet.result == 'timed_out') }}
needs: dotnet
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":rotating_light:"
SLACK_COLOR: ${{ needs.dotnet.status }}
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: Nightly .NET ${{ needs.dotnet.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

grid:
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'grid' || github.event_name == 'schedule')
Expand All @@ -90,6 +157,23 @@ jobs:
echo build --stamp >>.bazelrc.local
./go java-release-zip
nightly-release-files: build/dist/*.*
on-grid-failure:
name: On Grid Failure
runs-on: ubuntu-latest
if: ${{ always() && (needs.grid.result == 'failure' || needs.grid.result == 'timed_out') }}
needs: grid
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":rotating_light:"
SLACK_COLOR: ${{ needs.grid.status }}
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: Nightly Grid ${{ needs.grid.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

javascript:
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'javascript' || github.event_name == 'schedule')
Expand All @@ -103,11 +187,25 @@ jobs:
sed -i 's|https://registry.npmjs.org/|https://npm.pkg.github.com|g' javascript/node/selenium-webdriver/package.json
sed -i 's|"name": "selenium-webdriver"|"name": "@seleniumhq/selenium-webdriver"|g' javascript/node/selenium-webdriver/package.json
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
echo "@seleniumhq:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "@seleniumhq:registry=https://npm.pkg.github.com" >> .npmrc
echo "always-auth=true" >> ~/.npmrc
echo "always-auth=true" >> .npmrc
./go "node:version[nightly]"
./go node:release
secrets: inherit
on-javascript-failure:
name: On JavaScript Failure
runs-on: ubuntu-latest
if: ${{ always() && (needs.javascript.result == 'failure' || needs.javascript.result == 'timed_out') }}
needs: javascript
steps:
- uses: actions/checkout@v4
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":rotating_light:"
SLACK_COLOR: ${{ needs.javascript.status }}
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: Nightly JavaScript ${{ needs.javascript.result }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}