From 24f75e155279a4fb8f843208878699aee6c5c936 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 25 Mar 2021 02:51:09 +0900 Subject: [PATCH 1/3] Testing Jenkins refactor --- Jenkinsfile | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fbfe89ef..b62a80a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,11 @@ pipeline { - agent any + agent { + label 'tmc' + } stages { stage('Setup') { steps { - echo 'Setting up...' sh 'cd ${AGBCC} && ./install.sh ${WORKSPACE} && cd ${WORKSPACE}' sh 'cp /usr/local/etc/roms/tmc.us.gba baserom.gba' sh 'make -j setup' @@ -20,8 +21,23 @@ pipeline { branch 'master' } steps { - sh 'python3 progress.py >> /var/www/html/reports/progress_tmc.csv' - sh 'python3 progress.py -m >> /var/www/html/reports/progress_tmc_matching.csv' + sh 'mkdir reports' + sh 'python3 progress.py >> reports/progress_tmc.csv' + sh 'python3 progress.py -m >> reports/progress_tmc_matching.csv' + stash includes: 'reports/*', name: 'reports' + } + } + stage('Update Progress') { + when { + branch 'master' + } + agent { + label 'master' + } + steps { + unstash 'reports' + sh 'cat reports/progress_tmc.csv >> /var/www/html/reports/progress_tmc.csv' + sh 'cat reports/progress_tmc_matching.csv >> /var/www/html/reports/progress_tmc_matching.csv' } } } From 67a0bbbdfe0790ecb4676f871a3b89c0db192e41 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 25 Mar 2021 03:32:00 +0900 Subject: [PATCH 2/3] . --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b62a80a6..8a511df6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { stages { stage('Setup') { steps { - sh 'cd ${AGBCC} && ./install.sh ${WORKSPACE} && cd ${WORKSPACE}' + sh 'cd ${env.AGBCC} && ./install.sh ${WORKSPACE} && cd ${WORKSPACE}' sh 'cp /usr/local/etc/roms/tmc.us.gba baserom.gba' sh 'make -j setup' } From f196b852edce5ea974afbe46e94d323566b99b03 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 25 Mar 2021 03:39:07 +0900 Subject: [PATCH 3/3] ? --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a511df6..b62a80a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ pipeline { stages { stage('Setup') { steps { - sh 'cd ${env.AGBCC} && ./install.sh ${WORKSPACE} && cd ${WORKSPACE}' + sh 'cd ${AGBCC} && ./install.sh ${WORKSPACE} && cd ${WORKSPACE}' sh 'cp /usr/local/etc/roms/tmc.us.gba baserom.gba' sh 'make -j setup' }