mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-18 17:47:32 +00:00
Report status of each step to github
This commit is contained in:
parent
014191a663
commit
01a46c3275
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@ -69,30 +69,45 @@ stage('check') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def doDockerBuild(target, postStep = null) {
|
def reportStatus(target, state, message) {
|
||||||
return {
|
step([
|
||||||
timeout(50) { // minutes
|
$class: 'GitHubCommitStatusSetter',
|
||||||
node('docker') {
|
contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: target],
|
||||||
|
statusResultSource: [$class: 'ConditionalStatusResultSource', results: [[
|
||||||
|
$class: 'AnyBuildResult', message: message, state: state]]
|
||||||
|
],
|
||||||
|
reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/realm/realm-js']
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
def doInside(script, target, postStep = null) {
|
||||||
|
try {
|
||||||
|
reportStatus(target, 'PENDING', 'Build has started')
|
||||||
getSourceArchive()
|
getSourceArchive()
|
||||||
sh "bash scripts/docker-test.sh ${target}"
|
sh "bash ${script} ${target}"
|
||||||
if(postStep) {
|
if(postStep) {
|
||||||
postStep.call()
|
postStep.call()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reportStatus(target, 'SUCCESS', 'Success!')
|
||||||
|
} catch(Exception e) {
|
||||||
|
reportStatus(target, 'FAILURE', e.toString())
|
||||||
|
currentBuild.rawBuild.setResult(Result.FAILURE)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def doDockerBuild(target, postStep = null) {
|
||||||
|
return {
|
||||||
|
node('docker') {
|
||||||
|
doInside('scripts/docker-test.sh', target, postStep)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def doBuild(nodeSpec, target, postStep = null) {
|
def doBuild(nodeSpec, target, postStep = null) {
|
||||||
return {
|
return {
|
||||||
timeout(50) { // minutes
|
|
||||||
node(nodeSpec) {
|
node(nodeSpec) {
|
||||||
getSourceArchive()
|
doInside('scripts/test.sh', target, postStep)
|
||||||
sh "bash scripts/test.sh ${target}"
|
|
||||||
if(postStep) {
|
|
||||||
postStep.call()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user