Skip to content

Commit e0e7b43

Browse files
authored
chore(ingress-nginx): add support for v1.11.3 and v1.12.0 (#165)
1 parent 5dde069 commit e0e7b43

File tree

12 files changed

+312
-485
lines changed

12 files changed

+312
-485
lines changed

.circleci/continue_config.yml

Lines changed: 100 additions & 207 deletions
Large diffs are not rendered by default.

.circleci/src/@common.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ executors:
2626
docker:
2727
- image: "<< parameters.image >>"
2828
resource_class: arm.xlarge
29+
ubuntu-amd64:
30+
machine:
31+
image: ubuntu-2204:current
32+
resource_class: xlarge
33+
ubuntu-arm64:
34+
machine:
35+
image: ubuntu-2204:current
36+
resource_class: arm.xlarge

.circleci/src/@jobs.yml

Lines changed: 44 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jobs:
2-
build_amd64:
2+
build:
33
parameters:
44
nginx-version:
55
type: string
@@ -14,16 +14,21 @@ jobs:
1414
- 'ON'
1515
- 'OFF'
1616
default: 'OFF'
17+
arch:
18+
type: enum
19+
enum:
20+
- 'amd64'
21+
- 'arm64'
1722
steps:
1823
- checkout
1924
- run: git submodule sync && git submodule update --init --recursive
2025
- run:
21-
name: Verify versions (release tag only)
26+
name: Set ARCH env var
2227
command: |
23-
if [[ $CIRCLE_TAG =~ ^v ]]; then
24-
bin/verify_version.sh "$(echo "$CIRCLE_TAG" | tr -d v)"
28+
if [ "<< parameters.arch >>" == "amd64" ]; then
29+
echo 'export ARCH=x86_64' >> $BASH_ENV;
2530
else
26-
echo "Not a release"
31+
echo 'export ARCH=aarch64' >> $BASH_ENV;
2732
fi
2833
- run:
2934
command: 'make build-musl'
@@ -41,62 +46,14 @@ jobs:
4146
- store_artifacts:
4247
path: ".musl-build/ngx_http_datadog_module.so.debug"
4348
destination: ngx_http_datadog_module.so.debug
44-
machine:
45-
image: ubuntu-2204:current
46-
resource_class: xlarge
47-
environment:
48-
ARCH: x86_64
49-
MAKE_JOB_COUNT: 8
50-
WAF: "<< parameters.waf >>"
51-
RUM: "<< parameters.rum >>"
52-
NGINX_VERSION: "<< parameters.nginx-version >>"
53-
build_arm64:
54-
parameters:
55-
nginx-version:
56-
type: string
57-
waf:
58-
type: enum
59-
enum:
60-
- 'ON'
61-
- 'OFF'
62-
rum:
63-
type: enum
64-
enum:
65-
- 'ON'
66-
- 'OFF'
67-
default: 'OFF'
68-
steps:
69-
- checkout
70-
- run: git submodule sync && git submodule update --init --recursive
71-
- run:
72-
command: 'make build-musl'
73-
environment:
74-
BUILD_TYPE: RelWithDebInfo
75-
NGINX_VERSION: "<< parameters.nginx-version >>"
76-
- persist_to_workspace:
77-
root: "."
78-
paths:
79-
- ".musl-build/ngx_http_datadog_module.so"
80-
- ".musl-build/ngx_http_datadog_module.so.debug"
81-
- store_artifacts:
82-
path: ".musl-build/ngx_http_datadog_module.so"
83-
destination: ngx_http_datadog_module.so
84-
- store_artifacts:
85-
path: ".musl-build/ngx_http_datadog_module.so.debug"
86-
destination: ngx_http_datadog_module.so.debug
87-
- store_artifacts:
88-
path: nginx-version-info
89-
destination: nginx-version-info
90-
machine:
91-
image: ubuntu-2204:current
92-
resource_class: arm.xlarge
49+
executor:
50+
name: ubuntu-<< parameters.arch >>
9351
environment:
94-
ARCH: aarch64
9552
MAKE_JOB_COUNT: 8
9653
WAF: "<< parameters.waf >>"
9754
RUM: "<< parameters.rum >>"
9855
NGINX_VERSION: "<< parameters.nginx-version >>"
99-
build_openresty_amd64:
56+
build_openresty:
10057
parameters:
10158
resty-version:
10259
type: string
@@ -105,53 +62,20 @@ jobs:
10562
enum:
10663
- 'ON'
10764
- 'OFF'
108-
steps:
109-
- checkout
110-
- run: git submodule sync && git submodule update --init --recursive
111-
- run:
112-
name: Verify versions (release tag only)
113-
command: |
114-
if [[ $CIRCLE_TAG =~ ^v ]]; then
115-
bin/verify_version.sh "$(echo "$CIRCLE_TAG" | tr -d v)"
116-
else
117-
echo "Not a release"
118-
fi
119-
- run:
120-
command: 'make build-openresty'
121-
environment:
122-
BUILD_TYPE: RelWithDebInfo
123-
RESTY_VERSION: "<< parameters.resty-version >>"
124-
- persist_to_workspace:
125-
root: "."
126-
paths:
127-
- ".openresty-build/ngx_http_datadog_module.so"
128-
- ".openresty-build/ngx_http_datadog_module.so.debug"
129-
- store_artifacts:
130-
path: ".openresty-build/ngx_http_datadog_module.so"
131-
destination: ngx_http_datadog_module.so
132-
- store_artifacts:
133-
path: ".openresty-build/ngx_http_datadog_module.so.debug"
134-
destination: ngx_http_datadog_module.so.debug
135-
machine:
136-
image: ubuntu-2204:current
137-
resource_class: xlarge
138-
environment:
139-
ARCH: x86_64
140-
MAKE_JOB_COUNT: 8
141-
WAF: "<< parameters.waf >>"
142-
RESTY_VERSION: "<< parameters.resty-version >>"
143-
build_openresty_arm64:
144-
parameters:
145-
resty-version:
146-
type: string
147-
waf:
65+
arch:
14866
type: enum
14967
enum:
150-
- 'ON'
151-
- 'OFF'
68+
- 'amd64'
69+
- 'arm64'
15270
steps:
15371
- checkout
15472
- run: git submodule sync && git submodule update --init --recursive
73+
- run: |
74+
if [ "<< parameters.arch >>" == "amd64" ]; then
75+
echo 'export ARCH=x86_64' >> $BASH_ENV;
76+
else
77+
echo 'export ARCH=aarch64' >> $BASH_ENV;
78+
fi
15579
- run:
15680
command: 'make build-openresty'
15781
environment:
@@ -168,14 +92,9 @@ jobs:
16892
- store_artifacts:
16993
path: ".openresty-build/ngx_http_datadog_module.so.debug"
17094
destination: ngx_http_datadog_module.so.debug
171-
- store_artifacts:
172-
path: openresty-version-info
173-
destination: openresty-version-info
174-
machine:
175-
image: ubuntu-2204:current
176-
resource_class: arm.xlarge
95+
executor:
96+
name: ubuntu-<< parameters.arch >>
17797
environment:
178-
ARCH: aarch64
17998
MAKE_JOB_COUNT: 8
18099
WAF: "<< parameters.waf >>"
181100
RESTY_VERSION: "<< parameters.resty-version >>"
@@ -232,18 +151,16 @@ jobs:
232151
DOCKER_BUILDKIT: 1
233152
WAF: "<< parameters.waf >>"
234153
RUM: "<< parameters.rum >>"
235-
BASE_IMAGE: "<<parameters.base-image>>"
236154
steps:
237155
- checkout
238156
- run:
239157
name: Install Python dependencies
240158
command: pip install -r requirements.txt
241159
- attach_workspace:
242160
at: "/tmp/workspace"
243-
- run: mv -v /tmp/workspace/.musl-build/ngx_http_datadog_module.so* test/services/nginx/
244161
- setup_remote_docker:
245162
docker_layer_caching: true
246-
- run: test/bin/run --verbose --failfast
163+
- run: python3 test/bin/run.py --platform linux/<<parameters.arch>> --image <<parameters.base-image>> --module-path /tmp/workspace/.musl-build/ngx_http_datadog_module.so -- --verbose --failfast
247164
- store_artifacts:
248165
path: test/logs/test.log
249166
destination: test.log
@@ -268,18 +185,16 @@ jobs:
268185
# https://github.com/containers/podman/issues/13889
269186
DOCKER_BUILDKIT: 1
270187
WAF: "<< parameters.waf >>"
271-
BASE_IMAGE: "<<parameters.base-image>>"
272188
steps:
273189
- checkout
274190
- run:
275191
name: Install Python dependencies
276192
command: pip install -r requirements.txt
277193
- attach_workspace:
278194
at: "/tmp/workspace"
279-
- run: mv -v /tmp/workspace/.openresty-build/ngx_http_datadog_module.so* test/services/nginx/
280195
- setup_remote_docker:
281196
docker_layer_caching: true
282-
- run: test/bin/run --verbose --failfast
197+
- run: python3 test/bin/run.py --platform linux/<<parameters.arch>> --image <<parameters.base-image>> --module-path /tmp/workspace/.openresty-build/ngx_http_datadog_module.so -- --verbose --failfast
283198
- store_artifacts:
284199
path: test/logs/test.log
285200
destination: test.log‡
@@ -299,18 +214,16 @@ jobs:
299214
# https://github.com/containers/podman/issues/13889
300215
DOCKER_BUILDKIT: 1
301216
NGINX_FLAVOR: "ingress-nginx"
302-
BASE_IMAGE: "<<parameters.base-image>>:<<parameters.nginx-version>>"
303217
steps:
304218
- checkout
305219
- run:
306220
name: Install Python dependencies
307221
command: pip install -r requirements.txt
308222
- attach_workspace:
309223
at: "/tmp/workspace"
310-
- run: mv -v /tmp/workspace/.musl-build/ngx_http_datadog_module.so* test/services/nginx/
311224
- setup_remote_docker:
312225
docker_layer_caching: true
313-
- run: test/bin/run --verbose --failfast
226+
- run: python3 test/bin/run.py --platform linux/<<parameters.arch>> --image <<parameters.base-image>>:v<<parameters.nginx-version>> --module-path /tmp/workspace/.musl-build/ngx_http_datadog_module.so -- --verbose --failfast
314227
- store_artifacts:
315228
path: test/logs/test.log
316229
destination: test.log
@@ -348,6 +261,14 @@ jobs:
348261
resource_class: small
349262
steps:
350263
- checkout
264+
- run:
265+
name: Verify versions (release tag only)
266+
command: |
267+
if [[ $CIRCLE_TAG =~ ^v ]]; then
268+
bin/verify_version.sh "$(echo "$CIRCLE_TAG" | tr -d v)"
269+
else
270+
echo "Not a release"
271+
fi
351272
- run:
352273
name: Install Python dependencies
353274
command: |
@@ -429,9 +350,8 @@ jobs:
429350
DD_API_KEY: fakekey
430351
NGINX_DOCKERFILE: bookworm.Dockerfile
431352
build_ingress_nginx_module:
432-
machine:
433-
image: ubuntu-2204:current
434-
resource_class: xlarge
353+
executor:
354+
name: ubuntu-<< parameters.arch >>
435355
environment:
436356
MAKE_JOB_COUNT: 8
437357
parameters:
@@ -445,8 +365,14 @@ jobs:
445365
steps:
446366
- checkout
447367
- run: git submodule sync && git submodule update --init --recursive
368+
- run: |
369+
if [ "<< parameters.arch >>" == "amd64" ]; then
370+
echo 'export ARCH=x86_64' >> $BASH_ENV;
371+
else
372+
echo 'export ARCH=aarch64' >> $BASH_ENV;
373+
fi
448374
- run:
449-
command: 'make build-ingress-nginx'
375+
command: make build-ingress-nginx
450376
environment:
451377
WAF: ON
452378
BUILD_TYPE: RelWithDebInfo

0 commit comments

Comments
 (0)