diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2948a30f937..1ce6488b832 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -114,6 +114,11 @@ package-oci: needs: - build-gem - install-dependencies + - requirements_json_test + +requirements_json_test: + variables: + REQUIREMENTS_ALLOW_JSON_PATH: "lib-injection/test_allow.json" onboarding_tests_installer: parallel: diff --git a/.gitlab/prepare-oci-package.sh b/.gitlab/prepare-oci-package.sh index cf96732ba47..d051f359c15 100755 --- a/.gitlab/prepare-oci-package.sh +++ b/.gitlab/prepare-oci-package.sh @@ -5,6 +5,7 @@ set -e mkdir sources cp ../lib-injection/host_inject.rb sources +cp ../lib-injection/requirements.json sources/requirements.json # Kubernetes injection expects a different path ln -rs sources/host_inject.rb sources/auto_inject.rb diff --git a/lib-injection/requirements.json b/lib-injection/requirements.json new file mode 100644 index 00000000000..6b62ab3173c --- /dev/null +++ b/lib-injection/requirements.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/DataDog/auto_inject/refs/heads/main/preload_go/cmd/library_requirements_tester/testdata/requirements_schema.json", + "version": 1, + "native_deps": { + "glibc": [{ + "arch": "x86", + "supported": true, + "min": "2.28" + }, + { + "arch": "arm64", + "supported": true, + "min": "2.28" + }], + }, + "deny": [] +} diff --git a/lib-injection/test_allow.json b/lib-injection/test_allow.json new file mode 100644 index 00000000000..1a426be3b7e --- /dev/null +++ b/lib-injection/test_allow.json @@ -0,0 +1,7 @@ +[ + {"name": "unsupported 2.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.16"}}, + {"name": "unsupported 1.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:1.22"}}, + {"name": "unsupported 2.x.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.16.9"}}, + {"name": "unsupported 2.x glibc arm64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.22"}}, + {"name": "unsupported 2.x.x glibc x64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.22.9"}}, +]