diff --git a/Jenkins/Phabricator-pipeline/Jenkinsfile b/Jenkins/Phabricator-pipeline/Jenkinsfile index f32c76b..02e3425 100644 --- a/Jenkins/Phabricator-pipeline/Jenkinsfile +++ b/Jenkins/Phabricator-pipeline/Jenkinsfile @@ -75,6 +75,7 @@ pipeline { // copy console log to result folder sh "wget -qO console-log.txt http://jenkins-ui.jenkins.svc.cluster.local:8080/job/${JOB_BASE_NAME}/${BUILD_NUMBER}/consoleText" // keep a copy of the answer from Phabricator for debugging + // TODO: move all file copy operations here sh """ set -eu if [ -f "${DIFF_JSON}" ]; then diff --git a/Jenkins/master-pipeline/Jenkinsfile b/Jenkins/master-pipeline/Jenkinsfile index cbc1f86..f7a505a 100644 --- a/Jenkins/master-pipeline/Jenkinsfile +++ b/Jenkins/master-pipeline/Jenkinsfile @@ -57,6 +57,7 @@ pipeline { dir("${env.TARGET_DIR}") { // copy console log to result folder sh "wget -qO console-log.txt http://jenkins-ui.jenkins.svc.cluster.local:8080/job/${JOB_BASE_NAME}/${BUILD_NUMBER}/consoleText" + // TODO: move all file copy operations here } } } diff --git a/scripts/run_cmake.sh b/scripts/run_cmake.sh index a2a09d7..59050b7 100755 --- a/scripts/run_cmake.sh +++ b/scripts/run_cmake.sh @@ -23,6 +23,7 @@ export CC=clang-8 export CXX=clang++-8 export LD=LLD +#TODO: move this to the pipeline TARGET_DIR="/mnt/nfs/results/${JOB_BASE_NAME}-${BUILD_NUMBER}" mkdir -p ${TARGET_DIR} @@ -31,10 +32,11 @@ cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_LLD=ON \ -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;lld;libunwind" \ -D LLVM_CCACHE_BUILD=ON -D LLVM_CCACHE_DIR="${CCACHE_PATH}" -D LLVM_CCACHE_MAXSIZE=20G \ -D LLVM_ENABLE_ASSERTIONS=ON -DCMAKE_CXX_FLAGS=-gmlt \ - -DLLVM_LIT_ARGS="-v --xunit-xml-output ${WORKSPACE}/build/test-results.xml" 2>&1 | tee -a cmake-log.txt + -DLLVM_LIT_ARGS="-v --xunit-xml-output ${WORKSPACE}/build/test-results.xml" RETURN_CODE="${PIPESTATUS[0]}" set -e -cp cmake-log.txt CMakeCache.txt ${TARGET_DIR} +#TODO: move this to the Pipeline +cp CMakeCache.txt ${TARGET_DIR} echo "CMake completed ======================================" exit ${RETURN_CODE} \ No newline at end of file diff --git a/scripts/run_ninja.sh b/scripts/run_ninja.sh index 5ce8626..75068c4 100755 --- a/scripts/run_ninja.sh +++ b/scripts/run_ninja.sh @@ -17,6 +17,7 @@ set -eu CMD=$1 echo "Running ${CMD}... =====================================" cd ${WORKSPACE} +# TODO: move copy operation to pipeline BUILD_ID="${JOB_BASE_NAME}-${BUILD_NUMBER}" TARGET_DIR="/mnt/nfs/results/${BUILD_ID}" @@ -24,12 +25,12 @@ ulimit -n 8192 cd build set +e -ninja ${CMD} 2>&1 | tee -a ninja_${CMD}-log.txt -RETURN_CODE="${PIPESTATUS[0]}" +ninja ${CMD} +RETURN_CODE="$?" set -e echo "check-all completed ======================================" -cp ninja_${CMD}-log.txt ${TARGET_DIR} +# TODO: move copy operation to pipeline if test -f "test-results.xml" ; then cp test-results.xml ${TARGET_DIR} fi