@cryptotaxi247 / kubo / commits / cb60ff7c9

ci: apply timeout for build steps after getting node

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Jul 30, 2018 at 15:53 UTC cb60ff7c9c687344d6a2bc1c7191ffd8680a42ff
1 file changed +13 -13
ci/Jenkinsfile
+13 -13
@@ -54,15 +54,19 @@ def setupStep(nodeLabel, f) {
54 }
55 }
56
57 -def gobuild_step(list) {
57 +def gobuild_step = { list ->
58 setupStep('linux') { run ->
59 - run "make gx-deps"
59 + timeout(time: build_timeout, unit: 'MINUTES') {
60 + run "make gx-deps"
61
61 - list.each { platform ->
62 - withEnv(["GOOS=${platform[0]}", "GOARCH=${platform[1]}"]) {
63 - run "go build -i -ldflags=\"-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=${env.SUBNAME}-${env.BUILD_NUMBER}\" -o cmd/ipfs/ipfs github.com/ipfs/go-ipfs/cmd/ipfs"
64 - run "cp cmd/ipfs/ipfs cmd/ipfs/dist; cd cmd/ipfs/dist; tar -czvf ../go-ipfs_${env.GOOS}-${env.GOARCH}-${env.SUBNAME}-${env.BUILD_NUMBER}.tar.gz ."
65 - archiveArtifacts artifacts: "cmd/ipfs/go-ipfs_${env.GOOS}-${env.GOARCH}-${env.SUBNAME}-${env.BUILD_NUMBER}.tar.gz", fingerprint: true
62 + list.each { platform ->
63 + timeout(time: check_timeout, unit: 'MINUTES') {
64 + withEnv(["GOOS=${platform[0]}", "GOARCH=${platform[1]}"]) {
65 + run "go build -i -ldflags=\"-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=${env.SUBNAME}-${env.BUILD_NUMBER}\" -o cmd/ipfs/ipfs github.com/ipfs/go-ipfs/cmd/ipfs"
66 + run "cp cmd/ipfs/ipfs cmd/ipfs/dist; cd cmd/ipfs/dist; tar -czvf ../go-ipfs_${env.GOOS}-${env.GOARCH}-${env.SUBNAME}-${env.BUILD_NUMBER}.tar.gz ."
67 + archiveArtifacts artifacts: "cmd/ipfs/go-ipfs_${env.GOOS}-${env.GOARCH}-${env.SUBNAME}-${env.BUILD_NUMBER}.tar.gz", fingerprint: true
68 + }
69 + }
70 }
71 }
72 }
@@ -111,9 +115,7 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
115 }
116 },
117 'go build': {
114 - timeout(time: check_timeout, unit: 'MINUTES') {
115 - gobuild_step(fast_build_platforms)
116 - }
118 + gobuild_step(fast_build_platforms)
119 }
120 )
121 }
@@ -121,9 +123,7 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
123 stage('Tests') {
124 parallel(
125 'go build (other platforms)': {
124 - timeout(time: build_timeout, unit: 'MINUTES') {
125 - gobuild_step(build_platforms)
126 - }
126 + gobuild_step(build_platforms)
127 },
128 windows: {
129 setupStep('windows') { run ->