New files
This commit is contained in:
parent
e5d8c38bad
commit
2c6a90d2e1
2 changed files with 78 additions and 5 deletions
|
|
@ -51,11 +51,17 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
def productcollection = get()
|
||||
def productreleaseinfo = []
|
||||
for (productrepo in productcollection.ProductReleaseRepos) {
|
||||
def query_product_job = build job: QUERY_PRODUCT_REPO_JOB,
|
||||
parameters: [
|
||||
string(name: 'PRODUCT_RELEASE_REPO', value: productrepo),
|
||||
string(name: 'OUTPUT_ROOT_URL', value: OUTPUT_ROOT_URL),
|
||||
booleanParam(name: 'CLEAN_WORKSPACE', value: CLEAN_WORKSPACE),
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PRODUCT_COLLECTION
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
67
product/gatherreleases.groovy
Normal file
67
product/gatherreleases.groovy
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
def productcollectionstore = null
|
||||
|
||||
/* Example expected JSON
|
||||
{
|
||||
"ProductReleaseRepos": [
|
||||
"git@hydra:print-server-releases/print_server_whole.git"
|
||||
]
|
||||
}*/
|
||||
|
||||
def String asJsonText() {
|
||||
return writeJSON(returnText: true, json: productcollectionstore, pretty: 1)
|
||||
}
|
||||
|
||||
def boolean exists() {
|
||||
return (productcollectionstore != null)
|
||||
}
|
||||
|
||||
def set(String jsontext) {
|
||||
productcollectionstore = readJSON(text: jsontext)
|
||||
echo "Product collection:\n${asJsonText()}"
|
||||
}
|
||||
|
||||
def get() {
|
||||
return productcollectionstore
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent { label AGENT_LABEL }
|
||||
stages {
|
||||
stage('Initial setup') {
|
||||
steps {
|
||||
script {
|
||||
autobuilderscript = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy")
|
||||
meta = autobuilderscript.startnonbuild(this)
|
||||
|
||||
set(PRODUCT_COLLECTION)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Clean folders') {
|
||||
steps {
|
||||
script {
|
||||
cleanfolders = [
|
||||
]
|
||||
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
||||
cleaner.clean(cleanfolders)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Iterate product collection') {
|
||||
steps {
|
||||
script {
|
||||
def productcollection = get()
|
||||
def productreleaseinfo = []
|
||||
for (productrepo in productcollection.ProductReleaseRepos) {
|
||||
def query_product_job = build job: QUERY_PRODUCT_REPO_JOB,
|
||||
parameters: [
|
||||
string(name: 'PRODUCT_RELEASE_REPO', value: productrepo),
|
||||
string(name: 'OUTPUT_ROOT_URL', value: OUTPUT_ROOT_URL),
|
||||
booleanParam(name: 'CLEAN_WORKSPACE', value: CLEAN_WORKSPACE),
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue