-
Notifications
You must be signed in to change notification settings - Fork 14
130 lines (125 loc) · 3.79 KB
/
package-test-single.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
name: Package Test(single)
on:
workflow_dispatch:
inputs:
package_testing_branch:
description: 'Target branch for package-testing repository'
type: string
default: 'v3'
required: false
pmm_server_image:
description: "pmm-server docker image(auto detected if empty)"
required: false
type: string
default: "perconalab/pmm-server:3-dev-latest"
playbook:
description: 'Select test to run:'
default: 'pmm3-client_integration'
required: true
type: choice
options:
- pmm3-client
- pmm3-client_upgrade
- pmm3-client_custom_path
- pmm3-client_integration
- pmm3-client_integration_upgrade
- pmm3-client_integration_auth_config
- pmm3-client_integration_auth_register
- pmm3-client_integration_custom_path
- pmm3-client_integration_custom_port
- pmm3-client_integration_upgrade_custom_port
- pmm3-client_integration_upgrade_custom_path
package:
description: "Select source package for enabling repo"
required: true
default: "pmm3-client"
type: choice
options:
- original
- pmm3-client
- tools
repository:
description: 'Select Repo for Client:'
required: true
default: 'dev-latest'
type: choice
options:
- release
- release candidate
- dev-latest
pmm_client_tarball:
description: "PMM Client tarball link or FB-code"
type: string
metrics_mode:
description: 'Select the Metrics Mode for PMM Client:'
required: false
default: 'auto'
type: choice
options:
- auto
- push
- pull
workflow_call:
inputs:
package_testing_branch:
type: string
required: true
pmm_server_image:
required: false
type: string
playbook:
required: true
type: string
package:
required: true
type: string
repository:
required: true
type: string
pmm_client_tarball:
required: false
type: string
metrics_mode:
type: string
required: false
jobs:
get_versions:
name: Get versions
uses: ./.github/workflows/pmm-version-getter.yml
with:
repository: ${{ inputs.repository || 'release'}}
p_test:
name: ${{ inputs.playbook }}
uses: ./.github/workflows/runner-package-test.yml
secrets: inherit
needs: get_versions
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(needs.get_versions.outputs.pt_os) }}
with:
package_testing_branch: ${{ inputs.package_testing_branch || 'master' }}
expected_version: ${{needs.get_versions.outputs.finish_version}}
package: ${{ inputs.package || 'pmm3-client' }}
repository: ${{ inputs.repository || 'dev-latest' }}
metrics_mode: ${{ inputs.metrics_mode || 'auto' }}
playbook: ${{ inputs.playbook || 'pmm3-client_integration' }}
pmm_client_tarball: ${{ inputs.pmm_client_tarball || 'null' }}
test_name: ${{ matrix.os }}
os: ${{ matrix.os }}
slack_notify:
runs-on: ubuntu-latest
if: ${{ failure() && inputs.repository == 'release' }}
needs: p_test
steps:
- name: Slack Notification
uses: percona/gh-action-action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_TOKEN }}
SLACK_USERNAME: "package tests runner"
SLACK_ICON_EMOJI: ":squirrel:"
SLACK_COLOR: "#FF0000"
SLACK_TITLE: "Package tests failure"
SLACK_MESSAGE: "Failed Package tests for release repository"
SLACK_FOOTER: "Please check the Actions URL ^"