Skip to content

Commit

Permalink
Add SSI requirements.json file (#2813)
Browse files Browse the repository at this point in the history
* Add SSI requirements.json file

* Update requirements.json to new format

* Enable requirements_json_test CI job

* OS support is managed at the package level
  • Loading branch information
iamluc authored Oct 3, 2024
1 parent f87446c commit 6eb87bc
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 0 deletions.
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

0 comments on commit 6eb87bc

Please sign in to comment.