Skip to content

Commit

Permalink
Jenkinsfile: pull latest SDK from downloads server
Browse files Browse the repository at this point in the history
Signed-off-by: Nikhil Zinjurde <[email protected]>
  • Loading branch information
nikhil-zinjurde-imgtec committed Mar 23, 2017
1 parent 3d17aba commit 4b41152
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
*
*/

import groovy.json.JsonSlurper

@NonCPS
def jsonParse(def jsonUrl) {
def result = new JsonSlurper().parse(jsonUrl)
return result
}

def getLatestSdkUrl() {
def ci40 = jsonParse(new URL('http://downloads.creatordev.io/openwrt/release.json'))
def latestSdkUrl = "http://downloads.creatordev.io/openwrt/latest/pistachio/marduk/OpenWrt-SDK-${ci40.versions.openwrt}-${ci40.board}_${ci40.versions.toolchain}.tar.bz2"
return latestSdkUrl
}

def creatorPackages = [
'awalwm2m',
'bit-bang-gpio',
Expand All @@ -23,7 +37,7 @@ def creatorPackages = [
properties([
buildDiscarder(logRotator(numToKeepStr: '30')),
parameters([
stringParam(defaultValue: 'http://downloads.creatordev.io/openwrt/ci40-v1.1.1/pistachio/marduk/OpenWrt-SDK-ci40-v1.1.1-pistachio_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2',
stringParam(defaultValue: getLatestSdkUrl(),
description: 'OpenWrt SDK tarball to use', name: "SDK_TARBALL"),
])
])
Expand Down

0 comments on commit 4b41152

Please sign in to comment.