Use proper creds with githubNotify

I also made it more generic for the distros.
This commit is contained in:
William Giokas 2018-06-19 14:58:38 -06:00 committed by rallytime
parent d355861c5c
commit 727d2b4ffe
No known key found for this signature in database
GPG Key ID: E8F1A4B90D0DEA19
6 changed files with 50 additions and 18 deletions

View File

@ -20,10 +20,16 @@ pipeline {
}
post {
success {
githubNotify description: "The docs job has passed, artifacts have been saved", status: "SUCCESS"
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The docs job has passed',
status: 'SUCCESS',
context: "jenkins/pr/docs"
}
failure {
githubNotify description: "The docs job has failed", status: "FAILURE"
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The docs job has failed',
status: 'FAILURE',
context: "jenkins/pr/docs"
}
}
}

View File

@ -39,10 +39,16 @@ pipeline {
}
post {
success {
githubNotify description: "The centos7-py2 job has passed", status: "SUCCESS"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
failure {
githubNotify description: "The centos7-py2 job has failed", status: "FAILURE"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has failed",
status: 'FAILURE',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
}
}

View File

@ -39,10 +39,16 @@ pipeline {
}
post {
success {
githubNotify description: "The centos7-py3 job has passed", status: "SUCCESS"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
failure {
githubNotify description: "The centos7-py3 job has failed", status: "FAILURE"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has failed",
status: 'FAILURE',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
}
}

View File

@ -39,10 +39,16 @@ pipeline {
}
post {
success {
githubNotify description: "The ubuntu-1604-py2 job has passed", status: "SUCCESS"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
failure {
githubNotify description: "The ubuntu-1604-py2 job has failed", status: "FAILURE"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has failed",
status: 'FAILURE',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
}
}

View File

@ -39,10 +39,16 @@ pipeline {
}
post {
success {
githubNotify description: "The ubuntu-1604-py3 job has passed", status: "SUCCESS"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
failure {
githubNotify description: "The ubuntu-1604-py3 job has failed", status: "FAILURE"
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has failed",
status: 'FAILURE',
context: "jenkins/pr/${TEST_SUITE}-${TEST_PLATFORM}"
}
}
}

View File

@ -17,15 +17,13 @@ pipeline {
parallel {
stage('salt linting') {
steps {
// sh 'eval "$(pyenv init -)"; pylint --rcfile=.testing.pylintrc --disable=W1307,str-format-in-logging setup.py salt/ | tee pylint-report.xml'
sh "echo foo > pylint-reports.xml"
sh 'eval "$(pyenv init -)"; pylint --rcfile=.testing.pylintrc --disable=W1307,str-format-in-logging setup.py salt/ | tee pylint-report.xml'
archiveArtifacts artifacts: 'pylint-report.xml'
}
}
stage('test linting') {
steps {
// sh 'eval "$(pyenv init -)"; pylint --rcfile=.testing.pylintrc --disable=W0232,E1002,W1307,str-format-in-logging tests/ | tee pylint-report-tests.xml'
sh "echo bar > pylint-reports-tests.xml"
sh 'eval "$(pyenv init -)"; pylint --rcfile=.testing.pylintrc --disable=W0232,E1002,W1307,str-format-in-logging tests/ | tee pylint-report-tests.xml'
archiveArtifacts artifacts: 'pylint-report-tests.xml'
}
}
@ -34,12 +32,16 @@ pipeline {
}
post {
success {
// githubNotify description: "The lint job has passed", status: "SUCCESS",
githubNotify credentialsId: 'test-jenkins-credentials', description: 'test', status: 'SUCCESS'
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The lint job has passed',
status: 'SUCCESS',
context: "jenkins/pr/lint"
}
failure {
// githubNotify description: "The lint job has failed", status: "FAILURE"
githubNotify credentialsId: 'test-jenkins-credentials', description: 'test', status: 'FAILURE'
githubNotify credentialsId: 'test-jenkins-credentials',
description: 'The lint job has failed',
status: 'FAILURE',
context: "jenkins/pr/lint"
}
}
}