-
Notifications
You must be signed in to change notification settings - Fork 231
61 lines (55 loc) · 2.19 KB
/
base-package-tests.yaml
File metadata and controls
61 lines (55 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Package Tests
on:
workflow_call:
inputs:
type:
required: true
type: string
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:
name: Package Tests
runs-on: ubuntu-24.04
strategy:
matrix:
type: ${{ fromJSON(inputs.type) }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Download built artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: linux-packages
- 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-24.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"