[JIRA] (OVIRT-1109) Create jobs parameter in manual system tests

Barak Korren (oVirt JIRA) jira at ovirt-jira.atlassian.net
Mon Feb 6 14:20:56 UTC 2017


     [ https://ovirt-jira.atlassian.net/browse/OVIRT-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barak Korren updated OVIRT-1109:
--------------------------------
    Description: 
You should do that by adding a dynamic parameter that'll have a groovy script such as:
{code}
import jenkins.model.*

def list = []

def matchedJobs = Jenkins.instance.items.findAll { job ->
    job.name =~ /build-artifacts/
}

matchedJobs.each { job ->
    if (!job.name.contains("archived_for_deletion")) {
        list << job.name.split('_')[0]
    }
}

return list.unique()
{code}

With the above script you'll have all project names. From the project name and the other parameters you can build any job's name:
{code}
{project}_{ovirt_version}_build-artifacts-{distro}-{arch}
{code}

  was:
You should do that by adding a dynamic parameter that'll have a groovy script such as:
{code}
import jenkins.model.*

def list = []

def matchedJobs = Jenkins.instance.items.findAll { job ->
    job.name =~ /build-artifacts/
}

matchedJobs.each { job ->
    if (!job.name.contains("archived_for_deletion")) {
        list << job.name.split('_')[0]
    }
}

return list.unique()
{code}

With the above script you'll have all project names. From the project name and the other parameters you can build any job's name:
{project}_{ovirt_version}_build-artifacts-{distro}-{arch}


> Create jobs parameter in manual system tests
> --------------------------------------------
>
>                 Key: OVIRT-1109
>                 URL: https://ovirt-jira.atlassian.net/browse/OVIRT-1109
>             Project: oVirt - virtualization made easy
>          Issue Type: Task
>            Reporter: Gil Shinar
>            Assignee: infra
>
> You should do that by adding a dynamic parameter that'll have a groovy script such as:
> {code}
> import jenkins.model.*
> def list = []
> def matchedJobs = Jenkins.instance.items.findAll { job ->
>     job.name =~ /build-artifacts/
> }
> matchedJobs.each { job ->
>     if (!job.name.contains("archived_for_deletion")) {
>         list << job.name.split('_')[0]
>     }
> }
> return list.unique()
> {code}
> With the above script you'll have all project names. From the project name and the other parameters you can build any job's name:
> {code}
> {project}_{ovirt_version}_build-artifacts-{distro}-{arch}
> {code}



--
This message was sent by Atlassian JIRA
(v1000.718.6#100026)


More information about the Infra mailing list