Skip to content

Commit

Permalink
Implement the gz_*-install jobs for Garden (#838)
Browse files Browse the repository at this point in the history
* Implement the gz_*-install jobs for Garden

Signed-off-by: Jose Luis Rivero <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
j-rivero and scpeters authored Oct 28, 2022
1 parent f32e9ce commit 6cdea0c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
36 changes: 25 additions & 11 deletions jenkins-scripts/dsl/ignition.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gz_software = [ 'cmake',
'plugin',
'rendering',
'sensors',
'sim',
'tools',
'transport',
'utils' ]
Expand Down Expand Up @@ -161,6 +162,10 @@ Map merge_maps(Map[] sources) {
// -dev package.
ArrayList supported_ign_branches(String ign_software)
{
// sim was not used in ignition
if (ign_software == 'sim')
return ['']

major_versions_registered = ignition_branches["${ign_software}"]

if (major_versions_registered == null)
Expand All @@ -173,6 +178,10 @@ ArrayList supported_ign_branches(String ign_software)
// -dev package.
ArrayList supported_gz_branches(String gz_software)
{
// sim was not used in ignition
if (gz_software == 'gazebo')
return ['']

major_versions_registered = gz_branches["${gz_software}"]

if (major_versions_registered == null)
Expand Down Expand Up @@ -255,7 +264,6 @@ ArrayList all_debbuilders()
// return all ci branch names
// Map with the form of: major versions as keys.
// Lists of distros supported as values
// @TODO[scpeters] update this to support gz_branches after garden release
Map supported_install_pkg_branches(String gz_software)
{
major_versions_prerelease = gz_prerelease_pkgs["${gz_software}"]
Expand All @@ -264,14 +272,16 @@ Map supported_install_pkg_branches(String gz_software)
// all_supported_distros
map_of_stable_versions = [:]
map_of_stable_versions[gz_software] = [:]
supported_ign_branches(gz_software).each { major_version ->
(supported_ign_branches(gz_software) + supported_gz_branches(gz_software)).each { major_version ->
if (! major_version)
return false // keep looping
new_relation = [:]
new_relation[major_version] = all_supported_distros
map_of_stable_versions[gz_software] << new_relation
}

if (major_versions_prerelease == null)
return map_of_stable_versions[gz_software];
return map_of_stable_versions[gz_software]

return merge_maps(map_of_stable_versions[gz_software],
major_versions_prerelease)
Expand Down Expand Up @@ -417,7 +427,8 @@ gz_software.each { gz_sw ->
} // end of ci_any_job

// add ci-pr_any to the list for CIWorkflow
ci_pr_any_list[software_name] << gz_ci_job_name
if (gz_sw != 'sim')
ci_pr_any_list[software_name] << gz_ci_job_name
}
}

Expand Down Expand Up @@ -469,15 +480,16 @@ gz_software.each { gz_sw ->

// No 1-dev or 0-dev packages (except special cases see
// gz_debbuild variable), unversioned
major_version_in_pkgname = major_version
if ("${major_version}" == "0" || "${major_version}" == "1")
major_version = ""
major_version_in_pkgname = ""

// --------------------------------------------------------------
// ignition_ prefix packages:
generate_install_job("ignition", gz_sw, major_version, distro, arch)
// --------------------------------------------------------------
// gz_ prefix packages:
// 1. gz_ prefix packages. All but not gazebo (replaced by sim)
generate_install_job("gz", gz_sw.replace('gazebo', 'sim'), major_version, distro, arch)

// 2. ignition_ prefix packages. gz software does not have ignition packages
if (major_version in supported_ign_branches(gz_sw))
generate_install_job("ignition", gz_sw, major_version_in_pkgname, distro, arch)
}
}
}
Expand Down Expand Up @@ -632,8 +644,10 @@ gz_software.each { gz_sw ->
}
}

// do not add gazebo twice
// add ci-pr_any to the list for CIWorkflow
ci_pr_any_list[software_name] << gz_brew_ci_any_job_name
if (gz_sw != 'sim')
ci_pr_any_list[software_name] << gz_brew_ci_any_job_name

// 2. main, release branches
all_branches("${software_name}").each { branch ->
Expand Down
30 changes: 15 additions & 15 deletions jenkins-scripts/dsl/ignition_collection.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,22 @@ gz_collection_jobs =
'sdformat-sdf-12-win.xml'
],
'garden' : [
'gz_cmake2-install-pkg-focal-amd64',
'gz_common4-install-pkg-focal-amd64',
'gz_fuel-tools7-install-pkg-focal-amd64',
'gz_cmake3-install-pkg-focal-amd64',
'gz_common5-install-pkg-focal-amd64',
'gz_fuel-tools8-install-pkg-focal-amd64',
'gz_garden-install-pkg-focal-amd64',
'gz_gazebo6-install-pkg-focal-amd64',
'gz_gui6-install-pkg-focal-amd64',
'gz_launch5-install-pkg-focal-amd64',
'gz_math6-install-pkg-focal-amd64',
'gz_msgs8-install-pkg-focal-amd64',
'gz_physics5-install-pkg-focal-amd64',
'gz_plugin-install-pkg-focal-amd64',
'gz_rendering6-install-pkg-focal-amd64',
'gz_sensors6-install-pkg-focal-amd64',
'gz_tools-install-pkg-focal-amd64',
'gz_transport11-install-pkg-focal-amd64',
'gz_utils-install-pkg-focal-amd64',
'gz_gazebo7-install-pkg-focal-amd64',
'gz_gui7-install-pkg-focal-amd64',
'gz_launch6-install-pkg-focal-amd64',
'gz_math7-install-pkg-focal-amd64',
'gz_msgs9-install-pkg-focal-amd64',
'gz_physics6-install-pkg-focal-amd64',
'gz_plugin2-install-pkg-focal-amd64',
'gz_rendering7-install-pkg-focal-amd64',
'gz_sensors7-install-pkg-focal-amd64',
'gz_tools2-install-pkg-focal-amd64',
'gz_transport12-install-pkg-focal-amd64',
'gz_utils2-install-pkg-focal-amd64',
'ign_cmake-gz-3-win',
'ign_common-gz-5-win',
'ign_fuel-tools-gz-8-win',
Expand Down

0 comments on commit 6cdea0c

Please sign in to comment.