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

Add CI jobs for garden branches #787

Merged
merged 14 commits into from
Aug 12, 2022
47 changes: 42 additions & 5 deletions jenkins-scripts/dsl/ignition.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ ignition_branches = [ 'cmake' : [ '2' ],
'tools' : [ '1' ],
'transport' : [ '4', '8', '11' ],
'utils' : [ '1' ]]
gz_branches = [ 'cmake' : [ '3' ],
'common' : [ '5' ],
'fuel-tools' : [ '8' ],
'gui' : [ '7' ],
'launch' : [ '6' ],
'math' : [ '7' ],
'msgs' : [ '9' ],
'physics' : [ '6' ],
'plugin' : [ '2' ],
'rendering' : [ '7' ],
'sensors' : [ '7' ],
'sim' : [ '7' ],
'tools' : [ '2' ],
'transport' : [ '12' ],
'utils' : [ '2' ]]
// DESC: prerelease branches are managed as any other supported branches for
// special cases different to major branches: get compilation CI on the branch
// physics/sensors don't need to be included since they use main for gz11
Expand Down Expand Up @@ -156,7 +171,7 @@ Map merge_maps(Map[] sources) {

// return major versions supported or empty if just 0,1 series under
// -dev package.
ArrayList supported_branches(String ign_software)
ArrayList supported_ign_branches(String ign_software)
{
major_versions_registered = ignition_branches["${ign_software}"]

Expand All @@ -165,6 +180,15 @@ ArrayList supported_branches(String ign_software)

return major_versions_registered
}
ArrayList supported_gz_branches(String gz_software)
{
major_versions_registered = gzition_branches["${gz_software}"]

if (major_versions_registered == null)
return [ '' ]

return major_versions_registered
}

// return prerelease branch names
ArrayList prerelease_branches(String ign_software)
Expand All @@ -181,11 +205,16 @@ ArrayList prerelease_branches(String ign_software)
ArrayList all_branches(String ign_software)
{
List<String> branches = new ArrayList<String>();
supported_branches("${ign_software}").each { major_version ->
supported_ign_branches("${ign_software}").each { major_version ->
if ("${major_version}") {
branches.add("ign-${ign_software}${major_version}")
}
}
supported_gz_branches("${gz_software}").each { major_version ->
if ("${major_version}") {
branches.add("gz-${gz_software}${major_version}")
}
}
branches.add('main')
prerelease_branches("${ign_software}").each { branch ->
if ("${branch}") {
Expand All @@ -201,14 +230,22 @@ ArrayList all_debbuilders()
List<String> branches = new ArrayList<String>();
// add all supported branches
ignition_software.each { ign_software ->
supported_branches("${ign_software}").each { major_version ->
supported_ign_branches("${ign_software}").each { major_version ->
if (major_version) {
// No 1-debbuild versions, they use the unversioned job
if ("${major_version}" == "0" || "${major_version}" == "1" )
major_version = ""
branches.add("ign-${ign_software}${major_version}")
}
}
supported_gz_branches("${gz_software}").each { major_version ->
if (major_version) {
// No 1-debbuild versions, they use the unversioned job
if ("${major_version}" == "0" || "${major_version}" == "1" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any libraries in this situation, but I imagine it could happen in the future if we add a new library

major_version = ""
branches.add("gz-${gz_software}${major_version}")
}
}
}
// add all extra debbuilders
ignition_extra_debbuild.each { ign_name ->
Expand All @@ -225,11 +262,11 @@ Map supported_install_pkg_branches(String ign_software)
{
major_versions_prerelease = ignition_prerelease_pkgs["${ign_software}"]

// construct a map of stable packages based on supported_branches and
// construct a map of stable packages based on supported_ign_branches and
// all_supported_distros
map_of_stable_versions = [:]
map_of_stable_versions[ign_software] = [:]
supported_branches(ign_software).each { major_version ->
supported_ign_branches(ign_software).each { major_version ->
new_relation = [:]
new_relation[major_version] = all_supported_distros
map_of_stable_versions[ign_software] << new_relation
Expand Down
6 changes: 3 additions & 3 deletions jenkins-scripts/dsl/sdformat.dsl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import _configs_.*
import javaposse.jobdsl.dsl.Job

def sdformat_supported_branches = [ 'sdformat6' , 'sdformat9', 'sdformat12' ]
def sdformat_gz11_branches = [ 'sdformat9', 'sdformat10', 'sdformat12', 'main' ]
def sdformat_supported_branches = [ 'sdformat6' , 'sdformat9', 'sdformat12', 'sdformat13' ]
def sdformat_gz11_branches = [ 'sdformat9', 'sdformat12', 'sdformat13', 'main' ]
// nightly and prereleases
def extra_sdformat_debbuilder = [ 'sdformat13' ]
def extra_sdformat_debbuilder = [ ]

// Main platform using for quick CI
def ci_distro = Globals.get_ci_distro()
Expand Down