-
Notifications
You must be signed in to change notification settings - Fork 7
168 lines (155 loc) · 6.19 KB
/
Copy pathcomponent_onhost_e2e.yaml
File metadata and controls
168 lines (155 loc) · 6.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: 📞 OnHost E2E tests
on:
workflow_call:
secrets:
NR_SYSTEM_IDENTITY_CLIENT_ID:
required: false
NR_SYSTEM_IDENTITY_PRIVATE_KEY:
required: false
E2E_ACCOUNT_ID:
required: true
E2E_API_KEY:
required: true
E2E_LICENSE_KEY:
required: true
inputs:
caller_workflow:
description: 'Name of the top-level workflow triggering this run, used for NR event reporting'
required: false
type: string
default: ''
permissions:
contents: read
# NOTE: The below environment vars are bumped automatically by Renovate so we always use the latest
# versions of the packages in our E2E tests. If you change the names or move these values outside
# the GitHub workflows please update `renovate.json` accordingly to avoid breaking the automation!
env:
HOST_E2E_INFRA_AGENT_VERSION: "1.74.3"
HOST_E2E_NRDOT_VERSION: "1.14.0"
HOST_E2E_PRELOAD_VERSION: "0.1.0"
jobs:
build-packages:
name: Build packages
uses: ./.github/workflows/component_packages.yml
with:
pre-release: false
skip_sign: true
tag_name: 0.900.${{ github.run_id }}
on-host-linux-e2e:
name: OnHost Linux E2E tests
needs: [build-packages]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
group:
- remote-config
- ebpf-agent
- infra-agent
- nrdot-agent
- proxy
- preload-agent
steps:
- name: Record job start time
run: echo "JOB_START_TIME=$(date +%s)" >> "$GITHUB_ENV"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/install-rust-toolchain
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: built-binaries-0.900.${{ github.run_id }}
path: ./
- name: Build e2e-runner binary
run: cargo build -p e2e-runner
- name: "Linux e2e ${{ matrix.group }}"
run: |
echo "${{ secrets.NR_SYSTEM_IDENTITY_PRIVATE_KEY }}" > /tmp/newrelic-agent-control-priv.key
sudo ${{ github.workspace }}/target/debug/e2e-runner ${{ matrix.group }} \
--artifacts-package-dir ./dist \
--nr-api-key "${{ secrets.E2E_API_KEY }}" \
--nr-license-key "${{ secrets.E2E_LICENSE_KEY }}" \
--nr-account-id "${{ secrets.E2E_ACCOUNT_ID }}" \
--nr-region "us" \
--system-identity-client-id "${{ secrets.NR_SYSTEM_IDENTITY_CLIENT_ID }}" \
--agent-control-private-key "/tmp/newrelic-agent-control-priv.key" \
--agent-control-version "0.900.${{ github.run_id }}" \
--recipes-repo-branch "main" \
--infra-agent-version "${{ env.HOST_E2E_INFRA_AGENT_VERSION }}" \
--nrdot-version "${{ env.HOST_E2E_NRDOT_VERSION }}" \
--preload-version "${{ env.HOST_E2E_PRELOAD_VERSION }}"
- name: Report test result to New Relic
if: always()
env:
NR_LICENSE_KEY: ${{ secrets.E2E_LICENSE_KEY }}
NR_ACCOUNT_ID: ${{ secrets.E2E_ACCOUNT_ID }}
E2E_SCENARIO: ${{ matrix.group }}
E2E_ENVIRONMENT: linux
E2E_STATUS: ${{ job.status }}
E2E_CALLER_WORKFLOW: ${{ inputs.caller_workflow }}
run: bash .github/workflows/scripts/report_e2e_result.sh
- name: Upload e2e result summary
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: e2e-result-linux-${{ matrix.group }}
path: e2e-result-*-linux-${{ matrix.group }}.txt
if-no-files-found: warn
on-host-windows-e2e:
name: OnHost Windows E2E tests
needs: [build-packages]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
group:
- infra-agent
- nrdot
- proxy
- wrong-config
- remote-config
- switch-infra-agent-version
steps:
- name: Record job start time
shell: bash
run: echo "JOB_START_TIME=$(date +%s)" >> "$GITHUB_ENV"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/install-rust-toolchain
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: built-binaries-0.900.${{ github.run_id }}
path: ./
- name: Build e2e-runner binary
run: cargo build -p e2e-runner
- name: "Windows e2e ${{ matrix.group }}"
shell: powershell
run: |
"${{ secrets.NR_SYSTEM_IDENTITY_PRIVATE_KEY }}" | Out-File -Encoding utf8 -FilePath $env:TEMP\newrelic-agent-control-priv.key
& "${{ github.workspace }}\target\debug\e2e-runner.exe" ${{ matrix.group }} `
--artifacts-package-dir .\dist `
--nr-api-key "${{ secrets.E2E_API_KEY }}" `
--nr-license-key "${{ secrets.E2E_LICENSE_KEY }}" `
--nr-account-id "${{ secrets.E2E_ACCOUNT_ID }}" `
--nr-region "us" `
--system-identity-client-id "${{ secrets.NR_SYSTEM_IDENTITY_CLIENT_ID }}" `
--agent-control-private-key "$env:TEMP\newrelic-agent-control-priv.key" `
--agent-control-version "0.900.${{ github.run_id }}" `
--recipes-repo-branch "main" `
--infra-agent-version "${{ env.HOST_E2E_INFRA_AGENT_VERSION }}" `
--nrdot-version "${{ env.HOST_E2E_NRDOT_VERSION }}"
- name: Report test result to New Relic
if: always()
shell: bash
env:
NR_LICENSE_KEY: ${{ secrets.E2E_LICENSE_KEY }}
NR_ACCOUNT_ID: ${{ secrets.E2E_ACCOUNT_ID }}
E2E_SCENARIO: ${{ matrix.group }}
E2E_ENVIRONMENT: windows
E2E_STATUS: ${{ job.status }}
E2E_CALLER_WORKFLOW: ${{ inputs.caller_workflow }}
run: bash .github/workflows/scripts/report_e2e_result.sh
- name: Upload e2e result summary
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: e2e-result-windows-${{ matrix.group }}
path: e2e-result-*-windows-${{ matrix.group }}.txt
if-no-files-found: warn