Update Jenkinsfile (#97)

* Update Jenkinsfile

* Update progress.py

* Update Jenkinsfile
This commit is contained in:
MegaMech 2021-12-16 02:42:33 -07:00 committed by GitHub
parent 1702697b73
commit a99a739216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

8
Jenkinsfile vendored
View File

@ -1,3 +1,5 @@
def progressBadge = addEmbeddableBadgeConfiguration(id: "totalProgress", subject: "Total Progress")
pipeline {
agent any
stages {
@ -20,6 +22,12 @@ pipeline {
sh 'make -j4 VERSION=us'
}
}
stage('Update Progress') {
steps {
progress = sh(script: 'python3 progress.py badge1',returnStdout: true).trim()
progressBadge.setStatus(progress)
}
}
}
environment {
QEMU_IRIX = credentials('qemu-irix')

View File

@ -272,6 +272,9 @@ if args.format == 'csv':
str(TotalNonMatchingFunctions), str(TotalMipsToCFunctions)]
print(",".join(csv_list))
elif args.format == 'badge1':
print(round(srcPct, 2)+"%")
elif args.format == 'shield-json':
# https://shields.io/endpoint
print(json.dumps({