From 20e124bb3411b7a37f362bd75b1e608267449eb2 Mon Sep 17 00:00:00 2001 From: Emanuele Zattin Date: Tue, 10 Oct 2017 10:12:51 +0200 Subject: [PATCH 1/3] Use the official Node image --- Jenkinsfile | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9848c78f..7925dd71 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -175,11 +175,33 @@ def doAndroidBuild(target, postStep = null) { def doDockerBuild(target, postStep = null) { return { node('docker') { - doDockerInside("./scripts/docker-wrapper.sh ./scripts/test.sh", target, postStep) + try { + reportStatus(target, 'PENDING', 'Build has started') + + docker.image('node:6').inside('-e HOME=/tmp') { + sh "scripts/test.sh ${target}" + if(postStep) { + postStep.call() + } + deleteDir() + reportStatus(target, 'SUCCESS', 'Success!') + } + } catch(Exception e) { + reportStatus(target, 'FAILURE', e.toString()) + throw e + } } } } +// def doDockerBuild(target, postStep = null) { +// return { +// node('docker') { +// doDockerInside("./scripts/docker-wrapper.sh ./scripts/test.sh", target, postStep) +// } +// } +// } + def doMacBuild(target, postStep = null) { return { node('osx_vegas') { From bdb59bec8e1984361c3933e8e21ea5ebcca1d3be Mon Sep 17 00:00:00 2001 From: Emanuele Zattin Date: Tue, 10 Oct 2017 10:25:56 +0200 Subject: [PATCH 2/3] Get the source files --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7925dd71..6d45415a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -175,6 +175,9 @@ def doAndroidBuild(target, postStep = null) { def doDockerBuild(target, postStep = null) { return { node('docker') { + deleteDir() + unstash 'source' + try { reportStatus(target, 'PENDING', 'Build has started') From 162fb9fc2b3e8e5836f3c3a9149a66dfa371aeb6 Mon Sep 17 00:00:00 2001 From: Emanuele Zattin Date: Tue, 10 Oct 2017 10:37:44 +0200 Subject: [PATCH 3/3] Remove unused code --- Jenkinsfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6d45415a..6099988a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -197,14 +197,6 @@ def doDockerBuild(target, postStep = null) { } } -// def doDockerBuild(target, postStep = null) { -// return { -// node('docker') { -// doDockerInside("./scripts/docker-wrapper.sh ./scripts/test.sh", target, postStep) -// } -// } -// } - def doMacBuild(target, postStep = null) { return { node('osx_vegas') {