Skip to content

Commit 09b005f

Browse files
authored
Merge branch 'main' into bgv/nim-nap-otel-log-parser
2 parents 5f92180 + 96f04b9 commit 09b005f

File tree

78 files changed

+3152
-831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3152
-831
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Start Promtail
2+
description: Start promtail in a docker container to ship test results to Grafana Loki, then stop the container
3+
inputs:
4+
loki_url:
5+
description: URL endpoint of the Grafana Loki instance
6+
required: true
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Start promtail container
11+
shell: bash
12+
run: |
13+
docker run -d \
14+
--name=promtail \
15+
-v ${{ github.workspace }}/test/dashboard/promtail/promtail-config.yaml:/etc/promtail/promtail-config.yaml \
16+
-v ${{ github.workspace }}/test/dashboard/logs/:/var/log \
17+
-e TEST_OUTDIR=test/dashboard/logs \
18+
-e LOKI_URL=${{ inputs.loki_url }} \
19+
-e GITHUB_RUN_ID="${{ github.run_id }}" \
20+
-e GITHUB_WORKFLOW="${{ github.workflow }}" \
21+
-e GITHUB_EVENT_NAME="${{ github.event_name }}" \
22+
-e GITHUB_REPOSITORY="${{ github.repository }}" \
23+
-e GITHUB_SERVER_URL="${{ github.server_url }}" \
24+
-e GITHUB_JOB="${{ github.job }}" \
25+
-e GITHUB_HEAD_REF="${{ github.head_ref }}" \
26+
-e GITHUB_SHA="${{ github.sha }}" \
27+
-e GITHUB_ACTOR="${{ github.actor }}" \
28+
grafana/promtail:3.4.4 \
29+
-config.file=/etc/promtail/promtail-config.yaml \
30+
-config.expand-env=true

.github/workflows/ci.yml

Lines changed: 118 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
proxy-sanity-check:
2727
name: Proxy Sanity Check
2828
runs-on: ubuntu-22.04
29-
if: ${{ !github.event.pull_request.head.repo.fork }}
29+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
3030
env:
3131
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev"
3232
steps:
3333
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3434
with:
3535
fetch-tags: 'true'
36-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
36+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3737
with:
3838
go-version-file: 'go.mod'
3939
cache: false
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-22.04
4747
steps:
4848
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
49-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
49+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
5050
with:
5151
go-version-file: 'go.mod'
5252
cache: false
@@ -62,7 +62,7 @@ jobs:
6262
contents: write
6363
steps:
6464
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
65-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
65+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
6666
with:
6767
go-version-file: 'go.mod'
6868
cache: false
@@ -82,7 +82,7 @@ jobs:
8282
runs-on: ubuntu-22.04
8383
steps:
8484
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
85-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
85+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
8686
with:
8787
go-version-file: 'go.mod'
8888
cache: false
@@ -96,7 +96,7 @@ jobs:
9696
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
9797
with:
9898
fetch-tags: 'true'
99-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
99+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
100100
with:
101101
go-version-file: 'go.mod'
102102
cache: false
@@ -106,7 +106,7 @@ jobs:
106106
run: |
107107
make clean local-deb-package local-rpm-package local-apk-package
108108
- name: Upload Artifacts
109-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
109+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
110110
with:
111111
name: nginx-agent-unsigned-snapshots
112112
path: build
@@ -127,7 +127,7 @@ jobs:
127127
version: "3.22"
128128
steps:
129129
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
130-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
130+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
131131
with:
132132
go-version-file: 'go.mod'
133133
cache: false
@@ -136,16 +136,74 @@ jobs:
136136
with:
137137
name: nginx-agent-unsigned-snapshots
138138
path: build
139+
140+
- name: Create Results Directory
141+
run: mkdir -p ${{ github.workspace }}/test/dashboard/logs/${{ github.job }}/${{matrix.container.image}}-${{matrix.container.version}}
142+
143+
- name: Start Promtail
144+
uses: ./.github/actions/start-promtail
145+
with:
146+
loki_url: ${{ secrets.LOKI_DASHBOARD_URL }}
147+
139148
- name: Run Integration Tests
140149
run: |
141150
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
142151
OS_RELEASE="${{ matrix.container.image }}" OS_VERSION="${{ matrix.container.version }}" \
143-
make integration-test
152+
make integration-test | tee ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}}/raw_logs.log
153+
exit "${PIPESTATUS[0]}"
154+
155+
- name: Format Results
156+
if: always()
157+
run: bash ./scripts/dashboard/format_results.sh ${{job.status}} ${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}} ${{github.workspace}}
158+
159+
upgrade-tests:
160+
name: Upgrade Tests
161+
needs: build-unsigned-snapshot
162+
runs-on: ubuntu-22.04
163+
strategy:
164+
matrix:
165+
container:
166+
- image: "ubuntu"
167+
version: "24.04"
168+
- image: "redhatenterprise"
169+
version: "9"
170+
- image: "alpine"
171+
version: "3.22"
172+
steps:
173+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
174+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
175+
with:
176+
go-version-file: 'go.mod'
177+
cache: false
178+
- name: Download Packages
179+
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
180+
with:
181+
name: nginx-agent-unsigned-snapshots
182+
path: build
183+
184+
- name: Create Results Directory
185+
run: mkdir -p ${{ github.workspace }}/test/dashboard/logs/${{ github.job }}/${{matrix.container.image}}-${{matrix.container.version}}
186+
187+
- name: Start Promtail
188+
uses: ./.github/actions/start-promtail
189+
with:
190+
loki_url: ${{ secrets.LOKI_DASHBOARD_URL }}
191+
192+
- name: Run Upgrade Tests
193+
run: |
194+
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
195+
OS_RELEASE="${{ matrix.container.image }}" OS_VERSION="${{ matrix.container.version }}" \
196+
make upgrade-test | tee ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}}/raw_logs.log
197+
exit "${PIPESTATUS[0]}"
198+
199+
- name: Format Results
200+
if: always()
201+
run: bash ./scripts/dashboard/format_results.sh ${{job.status}} ${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}} ${{github.workspace}}
144202

145203
official-oss-image-integration-tests:
146204
name: Integration Tests - Official OSS Images
147205
needs: build-unsigned-snapshot
148-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
206+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
149207
runs-on: ubuntu-22.04
150208
strategy:
151209
matrix:
@@ -164,7 +222,7 @@ jobs:
164222
release: "alpine"
165223
steps:
166224
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
167-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
225+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
168226
with:
169227
go-version-file: 'go.mod'
170228
cache: false
@@ -173,45 +231,59 @@ jobs:
173231
with:
174232
name: nginx-agent-unsigned-snapshots
175233
path: build
234+
235+
- name: Create Results Directory
236+
run: mkdir -p ${{ github.workspace }}/test/dashboard/logs/${{ github.job }}/${{matrix.container.image}}-${{matrix.container.version}}
237+
238+
- name: Start Promtail
239+
uses: ./.github/actions/start-promtail
240+
with:
241+
loki_url: ${{ secrets.LOKI_DASHBOARD_URL }}
242+
176243
- name: Run Integration Tests
177244
run: |
178245
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
179246
CONTAINER_NGINX_IMAGE_REGISTRY="docker-registry.nginx.com" \
180247
TAG="${{ matrix.container.version }}-${{ matrix.container.image }}" \
181248
OS_RELEASE="${{ matrix.container.release }}" OS_VERSION="${{ matrix.container.version }}" \
182-
make official-image-integration-test
249+
make official-image-integration-test | tee ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}}/raw_logs.log
250+
exit "${PIPESTATUS[0]}"
251+
252+
- name: Format Results
253+
if: always()
254+
run: bash ./scripts/dashboard/format_results.sh ${{job.status}} ${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}} ${{github.workspace}}
183255

184256
official-plus-image-integration-tests:
185257
name: Integration Tests - Official Plus Images
186258
needs: build-unsigned-snapshot
187-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
259+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
188260
runs-on: ubuntu-22.04
189261
strategy:
190262
matrix:
191263
container:
192264
- image: "alpine"
193-
version: "3.20"
194-
plus: "r32"
265+
version: "3.22"
266+
plus: "r35"
195267
release: "alpine"
196268
path: "/nginx-plus/agent"
197269
- image: "alpine"
198-
version: "3.19"
199-
plus: "r31"
270+
version: "3.21"
271+
plus: "r34"
200272
release: "alpine"
201273
path: "/nginx-plus/agent"
202274
- image: "debian"
203275
version: "bookworm"
204-
plus: "r32"
276+
plus: "r35"
205277
release: "debian"
206278
path: "/nginx-plus/agent"
207279
- image: "debian"
208280
version: "bookworm"
209-
plus: "r31"
281+
plus: "r34"
210282
release: "debian"
211283
path: "/nginx-plus/agent"
212284
steps:
213285
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
214-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
286+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
215287
with:
216288
go-version-file: 'go.mod'
217289
cache: false
@@ -221,18 +293,33 @@ jobs:
221293
name: nginx-agent-unsigned-snapshots
222294
path: build
223295
- name: Login to Docker Registry
224-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
296+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
225297
with:
226-
registry: ${{ secrets.REGISTRY_URL }}
298+
registry: ${{ secrets.TEST_REGISTRY_URL }}
227299
username: ${{ secrets.REGISTRY_USERNAME }}
228300
password: ${{ secrets.REGISTRY_PASSWORD }}
301+
302+
- name: Create Results Directory
303+
run: mkdir -p ${{ github.workspace }}/test/dashboard/logs/${{ github.job }}/${{matrix.container.image}}-${{matrix.container.version}}
304+
305+
- name: Start Promtail
306+
uses: ./.github/actions/start-promtail
307+
with:
308+
loki_url: ${{ secrets.LOKI_DASHBOARD_URL }}
309+
229310
- name: Run Integration Tests
230311
run: |
231312
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
232-
CONTAINER_NGINX_IMAGE_REGISTRY="${{ secrets.REGISTRY_URL }}" \
313+
CONTAINER_NGINX_IMAGE_REGISTRY="${{ secrets.TEST_REGISTRY_URL }}" \
233314
TAG="${{ matrix.container.plus }}-${{ matrix.container.image }}-${{ matrix.container.version }}" \
234315
OS_RELEASE="${{ matrix.container.release }}" OS_VERSION="${{ matrix.container.version }}" IMAGE_PATH="${{ matrix.container.path }}" \
235-
make official-image-integration-test
316+
NGINX_LICENSE_JWT='${{ secrets.TEST_JWT }}' \
317+
make official-image-integration-test | tee ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}}/raw_logs.log
318+
exit "${PIPESTATUS[0]}"
319+
320+
- name: Format Results
321+
if: always()
322+
run: bash ./scripts/dashboard/format_results.sh ${{job.status}} ${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}} ${{github.workspace}}
236323

237324
performance-tests:
238325
name: Performance Tests
@@ -241,15 +328,15 @@ jobs:
241328
contents: write
242329
steps:
243330
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
244-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
331+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
245332
with:
246333
go-version-file: 'go.mod'
247334
cache: false
248335
- name: Run Performance Tests
249336
run: |
250337
make performance-test
251338
- name: Store benchmark result
252-
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29 # v1.20.3
339+
uses: benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7
253340
with:
254341
name: Compare Benchmark Results
255342
tool: 'go'
@@ -265,15 +352,15 @@ jobs:
265352
run: git push 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/nginx/agent.git' benchmark-results:benchmark-results
266353
load-tests:
267354
name: Load Tests
268-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
355+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
269356
permissions:
270357
contents: write
271358
runs-on: ubuntu-22.04
272359
needs: build-unsigned-snapshot
273360

274361
steps:
275362
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
276-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
363+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
277364
with:
278365
go-version-file: 'go.mod'
279366
cache: false
@@ -291,7 +378,7 @@ jobs:
291378
run: echo "GO_VERSION=$(cat go.mod | grep toolchain | sed 's/toolchain //; s/go//')" >> $GITHUB_ENV
292379

293380
- name: Build Docker Image
294-
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
381+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
295382
env:
296383
GO_VERSION: ${{ env.GO_VERSION }}
297384
with:
@@ -315,14 +402,14 @@ jobs:
315402
echo "$results"
316403
317404
- name: Upload Load Test Results
318-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
405+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
319406
with:
320407
name: load-test-results
321408
path: benchmarks.json
322409
if-no-files-found: error
323410

324411
- name: Store benchmark result
325-
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29 # v1.20.3
412+
uses: benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7
326413
with:
327414
name: Compare Benchmark Results
328415
tool: 'customSmallerIsBetter'

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ jobs:
5858
packages: read
5959
security-events: write # for github/codeql-action/autobuild to send a status report
6060
name: Analyze
61-
uses: nginxinc/compliance-rules/.github/workflows/codeql.yml@c903bfe6c668eaba362cde6a7882278bc1564401 # v0.1
61+
uses: nginxinc/compliance-rules/.github/workflows/codeql.yml@a27656f8f9a8748085b434ebe007f5b572709aad # v0.2
6262
with:
6363
requested_languages: go

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2626

2727
- name: "Dependency Review"
28-
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5
28+
uses: actions/dependency-review-action@bc41886e18ea39df68b1b1245f4184881938e050 # v4.7.2
2929
with:
3030
config-file: "nginxinc/k8s-common/dependency-review-config.yml@main"

.github/workflows/f5-cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- name: Run F5 Contributor License Agreement (CLA) assistant
3030
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have hereby read the F5 CLA and agree to its terms') || github.event_name == 'pull_request_target'
31-
uses: contributor-assistant/github-action@f41946747f85d28e9a738f4f38dbcc74b69c7e0e # v2.5.1
31+
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
3232
with:
3333
# Any pull request targeting the following branch will trigger a CLA check.
3434
branch: "main"

.github/workflows/mend.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ permissions:
2525

2626
jobs:
2727
mend:
28-
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || (github.event_name == 'push' && github.event.repository.fork == false) }}
28+
if: >-
29+
${{
30+
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-')) ||
31+
(github.event_name == 'push' && !github.event.repository.fork)
32+
}}
2933
uses: nginxinc/compliance-rules/.github/workflows/mend.yml@a27656f8f9a8748085b434ebe007f5b572709aad # v0.2
3034
secrets: inherit
3135
with:

0 commit comments

Comments
 (0)