Skip to content

Commit

Permalink
ci: notify stages in the CI with GitHub checks (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Feb 16, 2022
1 parent b91dbbb commit c2f9e50
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,39 @@ pipeline {
stage('Check') {
options { skipDefaultCheckout() }
steps {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'check',script: 'make check')
withGithubNotify(context: "Check") {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'check',script: 'make check')
}
}
}
}
}
stage('Local') {
options { skipDefaultCheckout() }
steps {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'local',script: 'make local')
withGithubNotify(context: "Local") {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'local',script: 'make local')
}
}
}
}
}
stage('Unit Test') {
options { skipDefaultCheckout() }
steps {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'test', script: 'make test-unit')
sh(label: 'test', script: 'make junit-report')
withGithubNotify(context: "Unit Test", tab: 'tests') {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'test', script: 'make test-unit')
sh(label: 'test', script: 'make junit-report')
}
}
}
}
Expand All @@ -78,12 +84,14 @@ pipeline {
stage('Integration Test') {
options { skipDefaultCheckout() }
steps {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
retryWithSleep(retries: 2, seconds: 5, backoff: true){ sh(label: "Install Docker", script: '.ci/scripts/install-docker-compose.sh') }
sh(label: 'test', script: 'make test-int')
sh(label: 'test', script: 'make junit-report')
withGithubNotify(context: "Integration Test", tab: 'tests') {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
retryWithSleep(retries: 2, seconds: 5, backoff: true){ sh(label: "Install Docker", script: '.ci/scripts/install-docker-compose.sh') }
sh(label: 'test', script: 'make test-int')
sh(label: 'test', script: 'make junit-report')
}
}
}
}
Expand All @@ -96,10 +104,12 @@ pipeline {
stage('Release Test') {
options { skipDefaultCheckout() }
steps {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'Create release artifacts', script: 'make docker-release')
withGithubNotify(context: "Release Test") {
cleanup()
dir("${BASE_DIR}"){
withGoEnv(){
sh(label: 'Create release artifacts', script: 'make docker-release')
}
}
}
}
Expand Down

0 comments on commit c2f9e50

Please sign in to comment.