From 86c530d0a409cdcb1788ce2cc2f912b4b71f8e53 Mon Sep 17 00:00:00 2001 From: Maryam Abdi Date: Tue, 22 Mar 2022 00:56:24 -0600 Subject: [PATCH] update cdash server (#195) Co-authored-by: benjaminmenetrier --- CI/buildspec_clang.yml | 8 ++++++-- CI/buildspec_gnu.yml | 8 ++++++-- CI/buildspec_intel.yml | 8 ++++++-- CI/cdash-url.sh | 3 ++- CI/cmake/CTestConfig.cmake | 7 ++----- README.md | 10 +++++----- 6 files changed, 27 insertions(+), 17 deletions(-) diff --git a/CI/buildspec_clang.yml b/CI/buildspec_clang.yml index 13691e641..eba01ff6c 100644 --- a/CI/buildspec_clang.yml +++ b/CI/buildspec_clang.yml @@ -23,6 +23,10 @@ phases: - echo $CODEBUILD_WEBHOOK_TRIGGER - echo $CODEBUILD_WEBHOOK_BASE_REF + # read cdash url from s3 + - wget https://ci-test-cdash-url.s3.amazonaws.com/cdash_url.txt + - CDASH_URL=$(cat cdash_url.txt) + # Codebuild only runs on PUSH events if HEAD_REF # is refs/heads/develop (merge to develop). In this # case CODEBUILD_GIT_BRANCH="develop" @@ -74,6 +78,7 @@ phases: - cp CMakeLists.txt /jcsda/saber-bundle - cp -r cmake /jcsda/saber-bundle/ - cp /jcsda/saber-bundle/cmake/CTestConfig.cmake /jcsda/saber-bundle + - sed -i "s@CDASH_URL@$CDASH_URL@g" /jcsda/saber-bundle/CTestConfig.cmake # print list - cd /jcsda/saber-bundle @@ -120,8 +125,7 @@ phases: # upload find cdash url and upload it as CodeBuild artifact to S3 - if [ "$BUILD_STATUS" = "1" ]; then echo "Build & tests passed, find cdash url"; - bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /build_container/saber/Testing; - url=$(bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /build_container/saber/Testing); + url=$(bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /build_container/saber/Testing $CDASH_URL); echo $url; echo ${url} > /jcsda/artifacts/cdash-url.txt; cat /jcsda/artifacts/cdash-url.txt; diff --git a/CI/buildspec_gnu.yml b/CI/buildspec_gnu.yml index 8f4110212..8abd54b89 100644 --- a/CI/buildspec_gnu.yml +++ b/CI/buildspec_gnu.yml @@ -35,6 +35,10 @@ phases: - echo "CODEBUILD_GIT_BRANCH=${CODEBUILD_GIT_BRANCH}" - echo "CODEBUILD_SOURCE_VERSION=${CODEBUILD_SOURCE_VERSION}" + # read cdash url from s3 + - wget https://ci-test-cdash-url.s3.amazonaws.com/cdash_url.txt + - CDASH_URL=$(cat cdash_url.txt) + pre_build: commands: - echo Executing pre_build phase @@ -67,6 +71,7 @@ phases: # cdash upload setup - cp /jcsda/saber-bundle/cmake/CTestConfig.cmake /jcsda/saber-bundle/ + - sed -i "s@CDASH_URL@$CDASH_URL@g" /jcsda/saber-bundle/CTestConfig.cmake - chmod -R 777 /jcsda/saber-bundle build: @@ -122,8 +127,7 @@ phases: # upload find cdash url and upload it as CodeBuild artifact to S3 - if [ "$BUILD_STATUS" = "1" ]; then echo "Build & tests passed, find cdash url"; - bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /home/jedi/saber/Testing; - url=$(bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /home/jedi/saber/Testing); + url=$(bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /home/jedi/saber/Testing $CDASH_URL); echo $url; echo ${url} > /jcsda/artifacts/cdash-url.txt; cat /jcsda/artifacts/cdash-url.txt; diff --git a/CI/buildspec_intel.yml b/CI/buildspec_intel.yml index fd6d68338..cbd280b6a 100644 --- a/CI/buildspec_intel.yml +++ b/CI/buildspec_intel.yml @@ -55,6 +55,10 @@ phases: - cd CI - . /etc/profile.d/intel.sh + # read cdash url from s3 + - wget https://ci-test-cdash-url.s3.amazonaws.com/cdash_url.txt + - CDASH_URL=$(cat cdash_url.txt) + # jedi-cmake - ./clone.sh $GIT_USER $GIT_PASS jcsda-internal/jedi-cmake $CODEBUILD_GIT_BRANCH jedicmake /jcsda/saber-bundle develop @@ -73,6 +77,7 @@ phases: # cdash upload setup - cp /jcsda/saber-bundle/cmake/CTestConfig.cmake /jcsda/saber-bundle/ + - sed -i "s@CDASH_URL@$CDASH_URL@g" /jcsda/saber-bundle/CTestConfig.cmake - chmod 777 -R /jcsda/saber-bundle # print list @@ -140,8 +145,7 @@ phases: # upload find cdash url and upload it as CodeBuild artifact to S3 - if [ "$BUILD_STATUS" = "1" ]; then echo "Build & tests passed, find cdash url"; - bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /home/jedi/saber/Testing; - url=$(bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /home/jedi/saber/Testing); + url=$(bash /jcsda/saber-bundle/saber/CI/cdash-url.sh /home/jedi/saber/Testing $CDASH_URL); echo $url; echo ${url} > /jcsda/artifacts/cdash-url.txt; cat /jcsda/artifacts/cdash-url.txt; diff --git a/CI/cdash-url.sh b/CI/cdash-url.sh index 13cf4aac2..5ba01c4f8 100755 --- a/CI/cdash-url.sh +++ b/CI/cdash-url.sh @@ -1,8 +1,9 @@ #!/bin/bash dir=$1 +cdash_url=$2 tag=$(head -1 $dir/TAG) Done=$(cat $dir/$tag/Done.xml) buildID=$(echo $Done | grep -o -P '(?<=buildId>).*(?=