Skip to content

Commit

Permalink
ci(jenkins): support windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Sep 25, 2019
1 parent 00e09e4 commit 816c0a4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ pipeline {
parallelTasks['linting'] = linting()
}

// Windows
parallelTasks['Windows-Node.js-10'] = generateStepForWindows(version: '10')

parallel(parallelTasks)
}
}
Expand Down Expand Up @@ -429,3 +432,33 @@ def getSmartTAVContext() {
}
}
}

def generateStepForWindows(Map params = [:]){
def version = params?.version
def edge = params.containsKey('edge') ? params.edge : false
def disableAsyncHooks = params.get('disableAsyncHooks', false)
return {
node('windows-2019-immutable'){
try {
env.HOME = "${WORKSPACE}"
if (disableAsyncHooks) {
env.ELASTIC_APM_ASYNC_HOOKS = 'false'
}
deleteDir()
unstash 'source'
dir(BASE_DIR){
powershell label: 'Install tools', script: """
.\\test\\script\\appveyor\\install-redis.ps1
.\\test\\script\\appveyor\\install-elasticsearch.ps1
.\\test\\script\\appveyor\\install-cassandra.ps1
Install-Product node ${version}
"""
bat 'npm install'
bat 'node test/test.js'
}
} catch(e){
error(e.toString())
}
}
}
}

0 comments on commit 816c0a4

Please sign in to comment.