ci: update GitHub check status at job start too

This way we'll see in GitHub PRs that the new job is in progress.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-10-24 14:45:32 +02:00
parent 8460e9f2c3
commit 678331de28
1 changed files with 19 additions and 9 deletions

View File

@ -73,9 +73,15 @@ pipeline {
}
stages {
stage('Setup') {
stage('Prep') {
steps { script {
currentBuild.displayName = getNewBuildName()
updateGitHubStatus()
} }
}
stage('Deps') {
steps { script {
sh 'pip3 install --user -r requirements.txt'
} }
}
@ -154,14 +160,7 @@ pipeline {
properties: [],
jdk: '',
])
/* For PR builds update check status. */
if (params.BUILD_SOURCE ==~ /.*\/PR-[0-9]+\/?$/) {
github.statusUpdate(
context: 'jenkins/prs/tests/e2e-new',
commit: jenkins.getJobCommitByPath(params.BUILD_SOURCE),
repo_url: 'https://github.com/status-im/status-desktop'
)
}
updateGitHubStatus()
} }
cleanup { cleanWs() }
}
@ -178,3 +177,14 @@ def getNewBuildName() {
return utils.baseName(params.BUILD_SOURCE)
}
}
def updateGitHubStatus() {
/* For PR builds update check status. */
if (params.BUILD_SOURCE ==~ /.*\/PR-[0-9]+\/?$/) {
github.statusUpdate(
context: 'jenkins/prs/tests/e2e-new',
commit: jenkins.getJobCommitByPath(params.BUILD_SOURCE),
repo_url: 'https://github.com/status-im/status-desktop'
)
}
}