diff --git a/Jenkinsfile b/Jenkinsfile index 4abd28c5d..ecb650bea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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') diff --git a/progress.py b/progress.py index a907280e3..b084d27c2 100644 --- a/progress.py +++ b/progress.py @@ -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({