Skip to content

Commit

Permalink
chore(ingress-nginx): add support for v1.11.3 and v1.12.0 (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmehala authored Jan 20, 2025
1 parent 5dde069 commit e0e7b43
Show file tree
Hide file tree
Showing 12 changed files with 312 additions and 485 deletions.
307 changes: 100 additions & 207 deletions .circleci/continue_config.yml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions .circleci/src/@common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ executors:
docker:
- image: "<< parameters.image >>"
resource_class: arm.xlarge
ubuntu-amd64:
machine:
image: ubuntu-2204:current
resource_class: xlarge
ubuntu-arm64:
machine:
image: ubuntu-2204:current
resource_class: arm.xlarge
162 changes: 44 additions & 118 deletions .circleci/src/@jobs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jobs:
build_amd64:
build:
parameters:
nginx-version:
type: string
Expand All @@ -14,16 +14,21 @@ jobs:
- 'ON'
- 'OFF'
default: 'OFF'
arch:
type: enum
enum:
- 'amd64'
- 'arm64'
steps:
- checkout
- run: git submodule sync && git submodule update --init --recursive
- run:
name: Verify versions (release tag only)
name: Set ARCH env var
command: |
if [[ $CIRCLE_TAG =~ ^v ]]; then
bin/verify_version.sh "$(echo "$CIRCLE_TAG" | tr -d v)"
if [ "<< parameters.arch >>" == "amd64" ]; then
echo 'export ARCH=x86_64' >> $BASH_ENV;
else
echo "Not a release"
echo 'export ARCH=aarch64' >> $BASH_ENV;
fi
- run:
command: 'make build-musl'
Expand All @@ -41,62 +46,14 @@ jobs:
- store_artifacts:
path: ".musl-build/ngx_http_datadog_module.so.debug"
destination: ngx_http_datadog_module.so.debug
machine:
image: ubuntu-2204:current
resource_class: xlarge
environment:
ARCH: x86_64
MAKE_JOB_COUNT: 8
WAF: "<< parameters.waf >>"
RUM: "<< parameters.rum >>"
NGINX_VERSION: "<< parameters.nginx-version >>"
build_arm64:
parameters:
nginx-version:
type: string
waf:
type: enum
enum:
- 'ON'
- 'OFF'
rum:
type: enum
enum:
- 'ON'
- 'OFF'
default: 'OFF'
steps:
- checkout
- run: git submodule sync && git submodule update --init --recursive
- run:
command: 'make build-musl'
environment:
BUILD_TYPE: RelWithDebInfo
NGINX_VERSION: "<< parameters.nginx-version >>"
- persist_to_workspace:
root: "."
paths:
- ".musl-build/ngx_http_datadog_module.so"
- ".musl-build/ngx_http_datadog_module.so.debug"
- store_artifacts:
path: ".musl-build/ngx_http_datadog_module.so"
destination: ngx_http_datadog_module.so
- store_artifacts:
path: ".musl-build/ngx_http_datadog_module.so.debug"
destination: ngx_http_datadog_module.so.debug
- store_artifacts:
path: nginx-version-info
destination: nginx-version-info
machine:
image: ubuntu-2204:current
resource_class: arm.xlarge
executor:
name: ubuntu-<< parameters.arch >>
environment:
ARCH: aarch64
MAKE_JOB_COUNT: 8
WAF: "<< parameters.waf >>"
RUM: "<< parameters.rum >>"
NGINX_VERSION: "<< parameters.nginx-version >>"
build_openresty_amd64:
build_openresty:
parameters:
resty-version:
type: string
Expand All @@ -105,53 +62,20 @@ jobs:
enum:
- 'ON'
- 'OFF'
steps:
- checkout
- run: git submodule sync && git submodule update --init --recursive
- run:
name: Verify versions (release tag only)
command: |
if [[ $CIRCLE_TAG =~ ^v ]]; then
bin/verify_version.sh "$(echo "$CIRCLE_TAG" | tr -d v)"
else
echo "Not a release"
fi
- run:
command: 'make build-openresty'
environment:
BUILD_TYPE: RelWithDebInfo
RESTY_VERSION: "<< parameters.resty-version >>"
- persist_to_workspace:
root: "."
paths:
- ".openresty-build/ngx_http_datadog_module.so"
- ".openresty-build/ngx_http_datadog_module.so.debug"
- store_artifacts:
path: ".openresty-build/ngx_http_datadog_module.so"
destination: ngx_http_datadog_module.so
- store_artifacts:
path: ".openresty-build/ngx_http_datadog_module.so.debug"
destination: ngx_http_datadog_module.so.debug
machine:
image: ubuntu-2204:current
resource_class: xlarge
environment:
ARCH: x86_64
MAKE_JOB_COUNT: 8
WAF: "<< parameters.waf >>"
RESTY_VERSION: "<< parameters.resty-version >>"
build_openresty_arm64:
parameters:
resty-version:
type: string
waf:
arch:
type: enum
enum:
- 'ON'
- 'OFF'
- 'amd64'
- 'arm64'
steps:
- checkout
- run: git submodule sync && git submodule update --init --recursive
- run: |
if [ "<< parameters.arch >>" == "amd64" ]; then
echo 'export ARCH=x86_64' >> $BASH_ENV;
else
echo 'export ARCH=aarch64' >> $BASH_ENV;
fi
- run:
command: 'make build-openresty'
environment:
Expand All @@ -168,14 +92,9 @@ jobs:
- store_artifacts:
path: ".openresty-build/ngx_http_datadog_module.so.debug"
destination: ngx_http_datadog_module.so.debug
- store_artifacts:
path: openresty-version-info
destination: openresty-version-info
machine:
image: ubuntu-2204:current
resource_class: arm.xlarge
executor:
name: ubuntu-<< parameters.arch >>
environment:
ARCH: aarch64
MAKE_JOB_COUNT: 8
WAF: "<< parameters.waf >>"
RESTY_VERSION: "<< parameters.resty-version >>"
Expand Down Expand Up @@ -232,18 +151,16 @@ jobs:
DOCKER_BUILDKIT: 1
WAF: "<< parameters.waf >>"
RUM: "<< parameters.rum >>"
BASE_IMAGE: "<<parameters.base-image>>"
steps:
- checkout
- run:
name: Install Python dependencies
command: pip install -r requirements.txt
- attach_workspace:
at: "/tmp/workspace"
- run: mv -v /tmp/workspace/.musl-build/ngx_http_datadog_module.so* test/services/nginx/
- setup_remote_docker:
docker_layer_caching: true
- run: test/bin/run --verbose --failfast
- 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
- store_artifacts:
path: test/logs/test.log
destination: test.log
Expand All @@ -268,18 +185,16 @@ jobs:
# https://github.com/containers/podman/issues/13889
DOCKER_BUILDKIT: 1
WAF: "<< parameters.waf >>"
BASE_IMAGE: "<<parameters.base-image>>"
steps:
- checkout
- run:
name: Install Python dependencies
command: pip install -r requirements.txt
- attach_workspace:
at: "/tmp/workspace"
- run: mv -v /tmp/workspace/.openresty-build/ngx_http_datadog_module.so* test/services/nginx/
- setup_remote_docker:
docker_layer_caching: true
- run: test/bin/run --verbose --failfast
- 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
- store_artifacts:
path: test/logs/test.log
destination: test.log‡
Expand All @@ -299,18 +214,16 @@ jobs:
# https://github.com/containers/podman/issues/13889
DOCKER_BUILDKIT: 1
NGINX_FLAVOR: "ingress-nginx"
BASE_IMAGE: "<<parameters.base-image>>:<<parameters.nginx-version>>"
steps:
- checkout
- run:
name: Install Python dependencies
command: pip install -r requirements.txt
- attach_workspace:
at: "/tmp/workspace"
- run: mv -v /tmp/workspace/.musl-build/ngx_http_datadog_module.so* test/services/nginx/
- setup_remote_docker:
docker_layer_caching: true
- run: test/bin/run --verbose --failfast
- 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
- store_artifacts:
path: test/logs/test.log
destination: test.log
Expand Down Expand Up @@ -348,6 +261,14 @@ jobs:
resource_class: small
steps:
- checkout
- run:
name: Verify versions (release tag only)
command: |
if [[ $CIRCLE_TAG =~ ^v ]]; then
bin/verify_version.sh "$(echo "$CIRCLE_TAG" | tr -d v)"
else
echo "Not a release"
fi
- run:
name: Install Python dependencies
command: |
Expand Down Expand Up @@ -429,9 +350,8 @@ jobs:
DD_API_KEY: fakekey
NGINX_DOCKERFILE: bookworm.Dockerfile
build_ingress_nginx_module:
machine:
image: ubuntu-2204:current
resource_class: xlarge
executor:
name: ubuntu-<< parameters.arch >>
environment:
MAKE_JOB_COUNT: 8
parameters:
Expand All @@ -445,8 +365,14 @@ jobs:
steps:
- checkout
- run: git submodule sync && git submodule update --init --recursive
- run: |
if [ "<< parameters.arch >>" == "amd64" ]; then
echo 'export ARCH=x86_64' >> $BASH_ENV;
else
echo 'export ARCH=aarch64' >> $BASH_ENV;
fi
- run:
command: 'make build-ingress-nginx'
command: make build-ingress-nginx
environment:
WAF: ON
BUILD_TYPE: RelWithDebInfo
Expand Down
Loading

0 comments on commit e0e7b43

Please sign in to comment.