@@ -118,20 +118,33 @@ function before_script_steps($with_docker_auth = false) {
118118 - PHP_MAJOR_MINOR: <?= json_encode ($ windows_minor_major_targets ) ?>
119119
120120 variables:
121- GIT_CONFIG_COUNT: 2
122- GIT_CONFIG_KEY_0: core.longpaths
123- GIT_CONFIG_VALUE_0: true
124- GIT_CONFIG_KEY_1: core.symlinks
125- GIT_CONFIG_VALUE_1: true
126121 CONTAINER_NAME: $CI_JOB_NAME_SLUG
127- GIT_STRATEGY: clone
128- GIT_CLEAN_FLAGS: -ffdxq
122+ GIT_STRATEGY: none
129123 IMAGE: "registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_windows"
130124 script: |
125+ # Agressive Git cleanup
126+ Write-Host "Performing aggressive workspace cleanup with cmd.exe..."
127+ cmd /c "if exist .git rmdir /s /q .git" 2>$null
128+ cmd /c "for /d %d in (*) do @rmdir /s /q ""%d""" 2>$null
129+ cmd /c "del /f /s /q *" 2>$null
130+ Write-Host "Cleanup complete."
131+
131132 # Make sure we actually fail if a command fails
132133 $ErrorActionPreference = 'Stop'
133134 $PSNativeCommandUseErrorActionPreference = $true
134135
136+ # Manual git clone with proper config
137+ Write-Host "Cloning repository..."
138+ git config --global core.longpaths true
139+ git config --global core.symlinks true
140+ git clone --branch $env:CI_COMMIT_REF_NAME $env:CI_REPOSITORY_URL .
141+ git checkout $env:CI_COMMIT_SHA
142+
143+ # Initialize submodules
144+ Write-Host "Initializing submodules..."
145+ git submodule update --init --recursive
146+ Write-Host "Git setup complete."
147+
135148 mkdir dumps
136149
137150 $names = @('httpbin-integration','request-replayer', $env:CONTAINER_NAME)
@@ -492,7 +505,7 @@ function before_script_steps($with_docker_auth = false) {
492505 DD_TRACE_GIT_METADATA_ENABLED: "0"
493506 REPORT_EXIT_STATUS: "1"
494507 TEST_PHP_JUNIT: "${CI_PROJECT_DIR}/artifacts/tests/php-tests.xml"
495- SKIP_ONLINE_TEST : "1"
508+ SKIP_ONLINE_TESTS : "1"
496509<?php if (version_compare ($ major_minor , "7.2 " , ">= " )): /* too expensive */ ?>
497510 DD_INSTRUMENTATION_TELEMETRY_ENABLED: 0
498511<?php endif ; ?>
@@ -607,6 +620,9 @@ function before_script_steps($with_docker_auth = false) {
607620 WAIT_FOR: zookeeper:2181 kafka-integration:9092
608621 CI_DEBUG_SERVICES: "true"
609622<?php endif ; ?>
623+ <?php if (str_contains ($ target , "sqlsrv " )): ?>
624+ WAIT_FOR: sqlsrv-integration:1433
625+ <?php endif ; ?>
610626<?php if (preg_match ("(test_web_symfony_(2|30|33|40)) " , $ target )): ?>
611627 COMPOSER_VERSION: 2.2
612628<?php endif ; ?>
@@ -751,3 +767,4 @@ function before_script_steps($with_docker_auth = false) {
751767 - if: $CI_COMMIT_REF_NAME == "master"
752768 when: always
753769 - when: manual
770+ allow_failure: true
0 commit comments