Skip to content
Merged
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions .github/workflows/base-package-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
distribution:
required: true
type: string
issue-on-failure:
required: false
type: boolean
default: false
description: "Set to true if a GH issue should be generated upon failure"

jobs:
package-tests:
Expand All @@ -28,3 +33,29 @@ jobs:

- name: Test ${{ matrix.type }} package
run: ./scripts/package-tests/package-tests.sh ./otelcol*-SNAPSHOT-*_linux_amd64.${{ matrix.type }} ${{ inputs.distribution }}

create-issue:
name: Create GitHub Issue
runs-on: ubuntu-22.04
needs: [package-tests]
if: failure() && inputs.issue-on-failure == 'true'
steps:
- name: Formulate issue
id: formulate_issue
run: |
# create a markdown file that contains details about the failure
echo "The nightly linux package tests failed in the following GitHub actions run." > nightly-test-failure.md
echo "* Link to run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> nightly-test-failure.md
echo "* Triggered by: Nightly scheduled build" >> nightly-test-failure.md
echo "" >> nightly-test-failure.md
echo "Note: This issue was auto-generated from [base-package-tests.yaml](https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/.github/workflows/base-package-tests.yaml)" >> nightly-test-failure.md

- name: Create issue on failure
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
gh issue create \
--repo open-telemetry/opentelemetry-collector-contrib \
--title "Nightly Linux Package Tests Failed" \
--body-file nightly-test-failure.md \
--label "release:blocker"
1 change: 1 addition & 0 deletions .github/workflows/package-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ jobs:
with:
distribution: otelcol-contrib
type: '[ "deb", "rpm" ]'
issue-on-failure: true
Loading