Create a script for publishing a set of debian packages to a remote update server

This commit is contained in:
Dan Hawkins 2022-01-09 22:21:37 +00:00
commit b72ddc8a0d

View file

@ -23,8 +23,8 @@ def packagecollection = null
}
*/
def String packagecollection_asJsonText() {
return writeJSON(returnText: true, json: packagecollection, pretty: 1)
def String asJsonText(somejson = packagecollection) {
return writeJSON(returnText: true, json: somejson, pretty: 1)
}
def boolean packagecollection_exists() {
@ -33,7 +33,7 @@ def boolean packagecollection_exists() {
def packagecollection_set(String jsontext) {
packagecollection = readJSON(text: jsontext)
echo "Package collection info:\n${packagecollection_asJsonText()}"
echo "Package collection info:\n${asJsonText(packagecollection)}"
}
def packagecollection_get() {
@ -72,7 +72,7 @@ pipeline {
debpackagecollection.packages.each { debpackageinfo->
def packagekey = debpackageinfo.key
echo "Processing package: ${packagekey}\n${debpackageinfo}"
echo "Processing package: ${packagekey}\n${asJsonText(debpackageinfo)}"
def packagedest = "${PACKAGEDEST}/${packagekey}"
def packageimportoptions = importer.getNewImportOptions()