From 9b9a983860064ec4853d12a42644b78895a484a1 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 23 Mar 2021 10:17:02 +0900 Subject: [PATCH] Jenkins refactor (#732) * Jenkins refactor * reorder --- Jenkinsfile | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 047676ac84..a89b04d5d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,7 @@ pipeline { - agent any + agent { + label 'oot' + } stages { stage('Check for unused asm') { @@ -9,7 +11,6 @@ pipeline { } stage('Setup') { steps { - echo 'Setting up...' sh 'cp /usr/local/etc/roms/baserom_oot.z64 baserom_original.z64' sh 'make -j setup' } @@ -37,9 +38,25 @@ pipeline { branch 'master' } steps { - sh 'python3 progress.py csv >> /var/www/html/reports/progress.csv' - sh 'python3 progress.py csv -m >> /var/www/html/reports/progress_matching.csv' - sh 'python3 progress.py shield-json > /var/www/html/reports/progress_shield.json' + sh 'mkdir reports' + sh 'python3 progress.py csv >> reports/progress.csv' + sh 'python3 progress.py csv -m >> reports/progress_matching.csv' + sh 'python3 progress.py shield-json > reports/progress_shield.json' + stash includes: 'reports/*', name: 'reports' + } + } + stage('Update Progress') { + when { + branch 'master' + } + agent { + label 'master' + } + steps { + unstash 'reports' + sh 'cat reports/progress.csv >> /var/www/html/reports/progress.csv' + sh 'cat reports/progress_matching.csv >> /var/www/html/reports/progress_matching.csv' + sh 'cat reports/progress_shield.json > /var/www/html/reports/progress_shield.json' } } }