Skip to content

Commit 9fa5ba6

Browse files
create a logs tar
Signed-off-by: epic-cicd-jenkins <ecc.platform@noaa.gov>
1 parent 8abcea5 commit 9fa5ba6

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.cicd/Jenkinsfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def generateStage(nodeLabel) {
2727
checkout scm
2828
script {
2929
def UFS_PLATFORM = nodeLabel.replaceAll("'","")
30-
echo "nodeLabel=${nodeLabel} NODE_NAME=${NODE_NAME} UFS_PLATFORM=${env.UFS_PLATFORM} UFS_COMPILER=${env.UFS_COMPILER}"
30+
echo "nodeLabel=${nodeLabel} NODE_NAME=${NODE_NAME} UFS_PLATFORM=${UFS_PLATFORM} UFS_COMPILER=${env.UFS_COMPILER}"
3131
sh 'bash --login "${WORKSPACE}/.cicd/scripts/wm_init.sh"'
3232
sh "STAGE_NAME='${env.STAGE_NAME}' " + 'bash --login "${WORKSPACE}/.cicd/scripts/disk_usage.sh"'
3333
s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'noaa-epic-prod-jenkins-artifacts', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: "${UFS_PLATFORM}-*-time-wm_init.json", storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 'main', userMetadata: []
@@ -66,7 +66,6 @@ def generateStage(nodeLabel) {
6666
}
6767
else {
6868
sh "WM_CREATE_BASELINE=false " + 'bash --login "${WORKSPACE}/.cicd/scripts/wm_test.sh"'
69-
//sh ''' ${WORKSPACE}/.cicd/scripts/post_test_results.sh ${NODE_NAME} RT '''
7069
}
7170
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: []
7271
s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'noaa-epic-prod-jenkins-artifacts', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: true, noUploadOnFailure: false, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: "wm_test_results-*-*.txt", storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 'main', userMetadata: []

.cicd/scripts/post_test_results.sh

+12-8
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,23 @@ function post_test() {
4848
SSH_ORIGIN=$(curl --silent "https://api.github.com/repos/ufs-community/ufs-weather-model/pulls/${CHANGE_ID}" | jq -r '.head.repo.ssh_url')
4949
git remote -v | grep -w sshorigin > /dev/null 2>&1 && git remote remove sshorigin > /dev/null 2>&1
5050
git remote add sshorigin ${SSH_ORIGIN} > /dev/null 2>&1
51-
#git add logs/RegressionTests_${machine,,}.log
52-
#git commit -m "[AutoRT] ${machine} Job Completed.\n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"
51+
git add tests/logs/RegressionTests_${machine,,}.log
52+
git status
53+
git commit -m "[AutoRT] ${machine} Job Completed.\n\n\n on-behalf-of @ufs-community <ecc.platform@noaa.gov>"
5354

54-
#FORK_BRANCH=$(curl --silent "https://api.github.com/repos/ufs-community/ufs-weather-model/pulls/${CHANGE_ID}" | jq -r '.head.ref')
55-
#git pull sshorigin ${FORK_BRANCH}
55+
FORK_BRANCH=$(curl --silent "https://api.github.com/repos/ufs-community/ufs-weather-model/pulls/${CHANGE_ID}" | jq -r '.head.ref')
56+
git pull sshorigin ${FORK_BRANCH}
57+
git status
5658
#git push sshorigin HEAD:${FORK_BRANCH}
5759

58-
#tar --create --gzip --verbose --dereference --file "${machine,,}.tgz" ${WORKSPACE}/tests/logs/*.log
59-
6060
echo "Testing concluded...removing label ${label} for ${machine} from ${GIT_URL}"
61-
#GIT_OWNER=$(echo ${GIT_URL} | cut -d '/' -f4)
62-
#GIT_REPO_NAME=$(echo ${GIT_URL} | cut -d '/' -f5 | cut -d '.' -f1)
61+
GIT_OWNER=$(echo ${GIT_URL} | cut -d '/' -f4)
62+
GIT_REPO_NAME=$(echo ${GIT_URL} | cut -d '/' -f5 | cut -d '.' -f1)
63+
echo "GIT_OWNER=${GIT_OWNER} GIT_REPO_NAME=${GIT_REPO_NAME}"
64+
echo "https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels/${machine}-${label}"
6365
#curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels/${machine}-${label}
6466
}
6567

68+
pwd
6669
post_test "${machine}" "${label}"
70+
tar --create --gzip --verbose --dereference --file "${machine,,}.tgz" tests/logs/*.log

0 commit comments

Comments
 (0)