Skip to content

Commit f8bc36f

Browse files
committed
update pushed nginx-fpm-php-8.5-release-musl image
1 parent 676689b commit f8bc36f

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

.gitlab/generate-package.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,26 @@
7272
],
7373
];
7474

75+
$appsec_helper_rust_image_tag = "nginx-fpm-php-8.5-release-musl";
76+
$appsec_helper_rust_image = appsec_image_from_tag_mapping($appsec_helper_rust_image_tag);
77+
78+
function appsec_image_from_tag_mapping(string $tag): string
79+
{
80+
$tag_mappings_file = __DIR__ . "/../appsec/tests/integration/gradle/tag_mappings.gradle";
81+
$tag_mappings = file_get_contents($tag_mappings_file);
82+
if ($tag_mappings === false) {
83+
throw new RuntimeException("Failed to read $tag_mappings_file");
84+
}
85+
86+
if (!preg_match("/['\"]" . preg_quote($tag, "/") . "['\"]\\s*:\\s*['\"]([^'\"]+)['\"]/", $tag_mappings, $matches)) {
87+
throw new RuntimeException("Tag $tag not found in $tag_mappings_file");
88+
}
89+
90+
$repo = "registry.ddbuild.io/images/mirror/datadog/dd-appsec-php-ci";
91+
$image_ref = $matches[1];
92+
return str_starts_with($image_ref, "sha256:") ? "$repo@$image_ref" : "$repo:$image_ref";
93+
}
94+
7595
?>
7696

7797
stages:
@@ -303,7 +323,7 @@
303323

304324
"compile appsec helper rust":
305325
stage: appsec
306-
image: "registry.ddbuild.io/images/mirror/datadog/dd-appsec-php-ci:nginx-fpm-php-8.5-release-musl"
326+
image: "<?= $appsec_helper_rust_image ?>"
307327
tags: [ "arch:$ARCH" ]
308328
needs: [ "prepare code" ]
309329
parallel:

appsec/tests/integration/gradle/tag_mappings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ext.tag_mappings = [
3737
'php-7.1-release': 'sha256:d52f126a9101785afe08aeb8af45ebc9393f6007fa9ad20f847fceb4dfe00ef6',
3838
'php-8.4-release': 'sha256:8dd60fd881701c66853820ca7bbbfa5554a91a6007c372444d3203f30d7eae4f',
3939
'apache2-mod-php-8.4-release-zts': 'sha256:d0974677d0f1e12dc59a217a07045afd9649bdc42e680df7d6f7c718ad07c9ed',
40-
'nginx-fpm-php-8.5-release-musl': 'sha256:0ab409dfc415b0c035414b89efdb34218faa1850e99ad3fcf7b52bd5fc042e0c',
40+
'nginx-fpm-php-8.5-release-musl': 'sha256:e455d450af85e1b0723ae3cc7e48b0e32b01b6000b619751b2b60597648671e4',
4141
'apache2-mod-php-8.3-release-zts': 'sha256:0ddb8cdc827b9a3dc271a35712346c66ab5a70aa34ae4f2fdf73e3632d0fd1f0',
4242
'apache2-mod-php-8.5-release-zts': 'sha256:33aa76b5ee683d9eb3a1c199b01f3dc998671c0d27ea465ac67943ccda0ad017',
4343
'php-7.2-debug': 'sha256:b809a751f79a4a5b8dedaa57b08c1e9ad407805732f67609a015370867691b79',

0 commit comments

Comments
 (0)