mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
parent
042cb625b6
commit
f04b7f1300
37
Jenkinsfile
vendored
37
Jenkinsfile
vendored
@ -1,13 +1,6 @@
|
||||
def agentLabel
|
||||
if (BRANCH_NAME == "master") {
|
||||
agentLabel = "master"
|
||||
} else {
|
||||
agentLabel = "papermario"
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label agentLabel
|
||||
label 'papermario'
|
||||
}
|
||||
|
||||
stages {
|
||||
@ -28,11 +21,31 @@ pipeline {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
sh 'python3 progress.py us --csv >> /var/www/papermar.io/html/reports/progress_us.csv'
|
||||
sh 'python3 progress.py us --shield-json > /var/www/papermar.io/html/reports/progress_us_shield.json'
|
||||
sh 'mkdir reports'
|
||||
|
||||
sh 'python3 progress.py jp --csv >> /var/www/papermar.io/html/reports/progress_jp.csv'
|
||||
sh 'python3 progress.py jp --shield-json > /var/www/papermar.io/html/reports/progress_jp_shield.json'
|
||||
sh 'python3 progress.py us --csv >> reports/progress_us.csv'
|
||||
sh 'python3 progress.py us --shield-json > reports/progress_us_shield.json'
|
||||
|
||||
sh 'python3 progress.py jp --csv >> reports/progress_jp.csv'
|
||||
sh 'python3 progress.py jp --shield-json > reports/progress_jp_shield.json'
|
||||
|
||||
stash includes: 'reports/*', name: 'reports'
|
||||
}
|
||||
}
|
||||
stage('Update Progress') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
agent {
|
||||
label 'master'
|
||||
}
|
||||
steps {
|
||||
unstash 'reports'
|
||||
sh 'cat reports/progress_us.csv >> /var/www/papermar.io/html/reports/progress_us.csv'
|
||||
sh 'cat reports/progress_us_shield.json > /var/www/papermar.io/html/reports/progress_us_shield.json'
|
||||
|
||||
sh 'cat reports/progress_jp.csv >> /var/www/papermar.io/html/reports/progress_jp.csv'
|
||||
sh 'cat reports/progress_jp_shield.json > /var/www/papermar.io/html/reports/progress_jp_shield.json'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user