From 192fb758f8d351ac8187a3b24bfa93bc0ae4e6e4 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 11 Nov 2025 22:14:03 +0000 Subject: [PATCH] Allow skipping pull for CI Signed-off-by: Simeon Widdis --- build.gradle | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index daa006c..531dd24 100644 --- a/build.gradle +++ b/build.gradle @@ -131,16 +131,22 @@ task cloneOrPullSqlRepo(type: Exec) { description = 'Clone or pull the SQL repository for testing' group = 'verification' - commandLine 'bash', '-c', ''' + def skipPull = project.findProperty('skipSqlRepoPull') ?: 'false' + + commandLine 'bash', '-c', """ if [ -d "remote/sql/.git" ]; then - echo "Pulling latest changes in remote/sql..." - cd remote/sql && git pull + if [ "${skipPull}" = "true" ]; then + echo "Skipping git pull for remote/sql (skipSqlRepoPull=true)" + else + echo "Pulling latest changes in remote/sql..." + cd remote/sql && git pull + fi else echo "Cloning SQL repository..." mkdir -p remote git clone https://github.com/opensearch-project/sql.git remote/sql fi - ''' + """ } task startTestCluster(type: Exec) {