Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSI requirements.json file #2813

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ variables:
value: "master"
description: "Run a specific datadog-reliability-env branch downstream"
SYSTEM_TESTS_LIBRARY: php

include:
- remote: https://gitlab-templates.ddbuild.io/libdatadog/include/ci_authenticated_job.yml
- remote: https://gitlab-templates.ddbuild.io/libdatadog/include/one-pipeline.yml
Expand Down Expand Up @@ -118,3 +119,10 @@ onboarding_tests_k8s_injection:
- WEBLOG_VARIANT:
- dd-lib-php-init-test-83
- dd-lib-php-init-test-alpine

requirements_json_test:
rules:
- when: on_success
variables:
REQUIREMENTS_BLOCK_JSON_PATH: "loader/packaging/block_tests.json"
REQUIREMENTS_ALLOW_JSON_PATH: "loader/packaging/allow_tests.json"
11 changes: 11 additions & 0 deletions loader/packaging/allow_tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{"filepath": "/usr/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/usr/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "musl"}},
{"filepath": "/usr/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.17"}},
{"filepath": "/usr/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "musl:1.5"}},
{"filepath": "/elephp5ant/thing", "args": [], "envars": [], "host": {"os": "linux", "arch": "amd64", "libc": "musl"}},
{"filepath": "/usr/bin/gluglu", "args": [], "envars": [], "host": {"os": "linux", "arch": "amd64", "libc": "glibc:3.42"}},
{"filepath": "/opt/php/7/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/opt/php/7.4/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/usr/bin/php83", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}}
]
14 changes: 14 additions & 0 deletions loader/packaging/block_tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{"filepath": "/usr/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "amd64", "libc": "glibc:2.15"}},
{"filepath": "/usr/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "amd64", "libc": "gluglu:2.20"}},

{"filepath": "/opt/php5/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/opt/php5.3/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/opt/php/5/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/opt/php/5.4/bin/php", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},

{"filepath": "/usr/bin/php5", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/usr/bin/php53", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/usr/bin/php-54", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}},
{"filepath": "/usr/bin/php.54", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64", "libc": "glibc:2.17"}}
]
45 changes: 45 additions & 0 deletions loader/packaging/requirements.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"version": 1,
"native_deps": {
"glibc": [
{
"arch": "x64",
"supported": true,
"description": "From centOS 7",
"min": "2.17"
},
{
"arch": "arm64",
"supported": true,
"description": "From centOS 7",
"min": "2.17"
}
],
"musl": [
{
"arch": "x64",
"supported": true
},
{
"arch": "arm64",
"supported": true
}
]
},
"deny": [
{
"id": "php5",
"description": "Do not inject if PHP 5",
"os": null,
"cmds": [
"**/php/5*/**",
"**/php5*/**",
"**/php5*",
"**/php-5*",
"**/php.5*"
],
"args": [],
"envars": null
}
]
}
1 change: 1 addition & 0 deletions tooling/bin/generate-ssi-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ for architecture in "${architectures[@]}"; do

cp -r ./src ${trace}/
echo "$release_version_sanitized" > ${root}/version
ln ./loader/packaging/requirements.json ${root}/requirements.json

########################
# Final archives
Expand Down
Loading