Skip to content

Commit

Permalink
Implement requirement.json
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Oct 22, 2024
1 parent 38f6cc1 commit 32da2b9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .gitlab/prepare-oci-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 17 additions & 0 deletions lib-injection/requirements.json
Original file line number Diff line number Diff line change
@@ -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": []
}
7 changes: 7 additions & 0 deletions lib-injection/test_allow.json
Original file line number Diff line number Diff line change
@@ -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"}},
]

0 comments on commit 32da2b9

Please sign in to comment.