Skip to content

Commit

Permalink
Update Jenkinsfile for s3 archiving
Browse files Browse the repository at this point in the history
  • Loading branch information
zach1221 authored Feb 29, 2024
1 parent 61bff0d commit 4439b75
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions sorc/test/ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
stage('Launch SonarQube') {
steps {
script {
build job: '/land-da/land-da-sonarqube', parameters: [
build job: '/land-DA_workflow/land-da-sonarqube', parameters: [
string(name: 'BRANCH_NAME', value: env.CHANGE_BRANCH ?: 'develop'),
string(name: 'FORK_NAME', value: env.CHANGE_FORK ?: '')
], wait: false
Expand Down Expand Up @@ -68,12 +68,16 @@ pipeline {
cleanWs()
checkout scm
sh '''
git submodule update --init --recursive
ln -fs /scratch2/NAGAPE/epic/UFS_Land-DA/inputs /scratch2/NAGAPE/epic/role.epic/jenkins/workspace/
sh sorc/app_build.sh
cp sorc/test/hera_ctest.sh sorc/build/
cp sorc/test/check_ctest.sh sorc/build/
cp sorc/test/run_hera_ctest.sh sorc/build/
cd sorc/build/
module use modulefiles && module load landda_hera.intel
mkdir build
cp test/hera_ctest.sh build/
cp test/check_ctest.sh build/
cp test/run_hera_ctest.sh build/
cd build/
module use ../modulefiles && module load landda_hera.intel
ecbuild ../ && make -j4
echo $(pwd)
./run_hera_ctest.sh
'''
Expand All @@ -92,18 +96,28 @@ pipeline {
cleanWs()
checkout scm
sh '''
git submodule update --init --recursive
ln -fs /work/noaa/epic/UFS_Land-DA/inputs /work/noaa/epic/role-epic/jenkins/workspace/
sh sorc/app_build.sh
cp sorc/test/orion_ctest.sh sorc/build/
cp sorc/test/check_ctest.sh sorc/build/
cp sorc/test/run_orion_ctest.sh sorc/build/
cd sorc/test/
module use modulefiles && module load landda_orion.intel.lua
mkdir build
cp test/orion_ctest.sh build/
cp test/check_ctest.sh build/
cp test/run_orion_ctest.sh build/
cd test/
sed -i 's|MACHINE_ID=${MACHINE_ID:-hera}|MACHINE_ID=${MACHINE_ID:-orion}|g' run_ufs_datm_lnd.sh
cd ../../
cd sorc/build/
cd ..
cd build/
module use ../modulefiles && module load landda_orion.intel.lua
ecbuild ../ && make -j4
echo $(pwd)
ctest
export machine_name_logs=$(echo $machine | awk '{ print tolower($1) }')
tar --create --gzip --verbose --dereference --file "${machine_name_logs}.tgz" ${WORKSPACE}/tests/logs/*.log
'''
s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'noaa-epic-prod-jenkins-artifacts', excludedFile: '', flatten: true, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: "**/*tgz*", storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 'main', userMetadata: []
}
}
stage('Run Land DA Workflow on Hercules') {
Expand Down Expand Up @@ -138,7 +152,7 @@ pipeline {
sh '''
'''
}
}
}
}
}
}
}

0 comments on commit 4439b75

Please sign in to comment.