From 8d5c67c937a0169bd344f6cffc72d800169c8e5b Mon Sep 17 00:00:00 2001 From: Vignesh Raman Date: Thu, 10 Oct 2024 11:53:07 +0530 Subject: [PATCH] ci: prepare-artifacts-python: copy if src dir exist prepare-artifacts-python.sh fails in drm-ci, since src directory is not present in linux. So copy files only if src directory is present. Signed-off-by: Vignesh Raman Part-of: --- .gitlab-ci/prepare-artifacts-python.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci/prepare-artifacts-python.sh b/.gitlab-ci/prepare-artifacts-python.sh index eb7ee94817d..7d12d406dc2 100755 --- a/.gitlab-ci/prepare-artifacts-python.sh +++ b/.gitlab-ci/prepare-artifacts-python.sh @@ -35,13 +35,15 @@ if [ ${#duplicate_files[@]} -gt 0 ]; then exit 1 fi -find src/ -path '*/ci/*' \ - \( \ - -name '*.txt' \ - -o -name '*.toml' \ - -o -name '*traces*.yml' \ - \) \ - -exec cp -p {} artifacts/ \; +if [ -d "src/" ]; then + find src/ -path '*/ci/*' \ + \( \ + -name '*.txt' \ + -o -name '*.toml' \ + -o -name '*traces*.yml' \ + \) \ + -exec cp -p {} artifacts/ \; +fi cp -Rp .gitlab-ci/*.txt artifacts/ if [ -n "$S3_ARTIFACT_NAME" ]; then