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 1756a94
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
*
*/

import groovy.json.JsonSlurper

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

def getLatestSdkUrl() {
def url = new URL('http://downloads.creatordev.io/openwrt/release.json')
def ci40 = jsonParse(url)
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 +38,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 1756a94

Please sign in to comment.