Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkinsfile: pull latest SDK from downloads server #47

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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