Skip to content

Commit

Permalink
Merge branch 'master' into jrivero/vendor_gh_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero authored Jun 3, 2024
2 parents 8ed2830 + 82136b3 commit fda1471
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 303 deletions.
35 changes: 24 additions & 11 deletions jenkins-scripts/dsl/dsl_checks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ if [[ -z $(ls -- *.xml) ]]; then
exit 1
fi

not_null=$(grep -3 'null' -- *.xml || true)
# Some XML generated files include valid Groovy code using null
# like the _outdated_jobs job. Do not search for null unconditionally
not_null=$(grep -3 '>.*null.*<' -- *.xml || true)
if [[ -n ${not_null} ]]; then
echo "Found a null value in a configuration file:"
echo "${not_null}"
Expand Down Expand Up @@ -50,16 +52,27 @@ if [[ -n ${non_github_orgs} ]]; then
exit 1
fi

# Check that whiteListedTargetBranches are non empty in all generated gazebo_libs
# see https://github.com/gazebo-tooling/release-tools/pull/1144
# For other jobs the use case is valid since pr can be enabled on all branches
empty_branches_on_github_triggered=$(grep '<whiteListTargetBranches></whiteListTargetBranches>' \
-- {gz_,sdformat}*{-abichecker-,-pr_any-}*.xml || true)
if [[ -n ${empty_branches_on_github_triggered} ]]; then
echo "Unexpected whiteListTargetBranches without values. It will trigger all branches:"
echo "${empty_branches_on_github_triggered}"
exit 1
fi

# re-enable after https://github.com/gazebo-tooling/release-tools/issues/1095

# Filter out the previous auto jobs
# filtered_dir=$(mktemp -d)
# cp -- *-abichecker-*.xml "${filtered_dir}"
# rm -f "${filtered_dir}"/*-ubuntu_auto*.xml
# repeated=$(grep '\<branch>' "${filtered_dir}"/*-abichecker-*.xml | awk '{ print $2 }' | sort | uniq -d)
# if [[ -n ${repeated} ]]; then
# echo "Found a duplicate in an abichecker branch:"
# echo "${repeated}"
# echo "please exclude one of the versions in the yaml file to reduce the server workload"
# exit 1
# fi
filtered_dir=$(mktemp -d)
cp -- *-abichecker-*.xml "${filtered_dir}"
rm -f "${filtered_dir}"/*-ubuntu_auto*.xml
repeated=$(grep '\<branch>' "${filtered_dir}"/*-abichecker-*.xml | awk '{ print $2 }' | sort | uniq -d)
if [[ -n ${repeated} ]]; then
echo "Found a duplicate in an abichecker branch:"
echo "${repeated}"
echo "please exclude one of the versions in the yaml file to reduce the server workload"
exit 1
fi
3 changes: 2 additions & 1 deletion jenkins-scripts/dsl/gazebo_libs.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ gz_collections_yaml.collections.each { collection ->
branch_index[lib_name][platform]['pr'] << [branch: branch_name, ci_name: config_name]
}
if (categories_enabled.contains('pr_abichecker') &&
(branch_name != 'main') &&
(! ci_config.exclude.abichecker?.contains(lib_name)))
{
branch_index[lib_name][platform]['pr_abichecker'].contains(branch_name) ?:
Expand Down Expand Up @@ -482,7 +483,7 @@ branch_index.each { lib_name, distro_configs ->
OSRFLinuxABIGitHub.create(abi_job)
GenericAnyJobGitHub.create(abi_job,
"gazebosim/${lib_name}",
branch_names - [ 'main'])
branch_names)
generate_label_by_requirements(abi_job, lib_name, ci_config.requirements)
abi_job.with
{
Expand Down
46 changes: 44 additions & 2 deletions jenkins-scripts/dsl/gz-collections.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#

# SPEC: not yet approved, used as draft
#
#---
Expand Down Expand Up @@ -256,7 +256,7 @@ collections:
current_branch: main
ci:
configs:
- focal
- focal_exclude_harmonic_abi_dups
- brew
- win
packaging:
Expand Down Expand Up @@ -413,6 +413,10 @@ collections:
major_version: 8
repo:
current_branch: main
- name: gz-ionic
major_version: 1
repo:
current_branch: main
ci:
configs:
- noble
Expand Down Expand Up @@ -503,6 +507,43 @@ ci_configs:
- pr_abichecker
- stable_branches
- stable_branches_asan
- name: focal_exclude_harmonic_abi_dups
system:
so: linux
distribution: ubuntu
version: focal
arch: amd64
requirements:
large_memory:
- gz-physics
nvidia_gpu:
- gz-sim
- gz-gui
- gz-rendering
- gz-sensors
exclude:
all:
- gz-citadel
- gz-fortress
- gz-garden
abichecker:
- gz-cmake
- gz-tools
# Exclude the abichecker that are duplicate with Harmonic
# The ones on Harmonic run on jammy
- gz-common
- gz-math
- gz-plugin
- gz-utils
pre_setup_script_hook:
gz-physics:
- "export MAKE_JOBS=1"
tests_disabled:
ci_categories_enabled:
- pr
- pr_abichecker
- stable_branches
- stable_branches_asan
- name: noble
system:
so: linux
Expand All @@ -520,6 +561,7 @@ ci_configs:
exclude:
all:
- gz-harmonic
- gz-ionic
- __upcoming__
abichecker:
- gz-cmake
Expand Down
87 changes: 0 additions & 87 deletions jenkins-scripts/dsl/ignition_collection.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,6 @@ void generate_install_job(prefix, gz_collection_name, distro, arch)
// Testing compilation from source
gz_collections_yaml.collections.each { collection ->
gz_collection_name = collection.name

if (! collection.packaging.exclude?.contains(gz_collection_name)) {
// DEBBUILD: linux package builder
// --------------------------------------------------------------
def build_pkg_job = job("gz-${gz_collection_name}-debbuilder")
OSRFLinuxBuildPkg.create(build_pkg_job)
build_pkg_job.with
{
steps {
shell("""\
#!/bin/bash -xe

/bin/bash -x ./scripts/jenkins-scripts/docker/multidistribution-ignition-debbuild.bash
""".stripIndent())
}
}
}


collection.ci.configs.each { ci_config_name ->
ci_config = gz_collections_yaml.ci_configs.find { it.name == ci_config_name }
distro = ci_config.system.version
Expand Down Expand Up @@ -153,74 +134,6 @@ gz_collections_yaml.collections.each { collection ->
""".stripIndent())
}
}

// COLCON - Windows
Globals.gazebodistro_branch = true
def gz_win_ci_job = job("ign_${gz_collection_name}-ci-win")
OSRFWinCompilation.create(gz_win_ci_job, false)
gz_win_ci_job.with
{
steps {
batchFile("""\
set IGNITION_COLLECTION=${gz_collection_name}
call "./scripts/jenkins-scripts/lib/ign_collection-base.bat"
""".stripIndent())
}
}
Globals.gazebodistro_branch = false

// MAC Brew CI job
// --------------------------------------------------------------
def gz_brew_ci_job = job("ignition_${gz_collection_name}-ci-main-homebrew-amd64")
OSRFBrewCompilation.create(gz_brew_ci_job, DISABLE_TESTS)
OSRFGitHub.create(gz_brew_ci_job,
"gazebosim/gz-${gz_collection_name}",
"main",
"ign-${gz_collection_name}")
gz_brew_ci_job.with
{
steps {
shell("""\
#!/bin/bash -xe

/bin/bash -xe
"./scripts/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash" "gz-${gz_collection_name}"
""".stripIndent())
}
}

// MAC Brew bottle install job
// --------------------------------------------------------------
def gz_brew_install_bottle_job = job("ignition_${gz_collection_name}-install_bottle-homebrew-amd64")
OSRFBrewInstall.create(gz_brew_install_bottle_job)

gz_brew_install_bottle_job.with
{
triggers {
cron('@daily')
}

def bottle_name = "ignition-${gz_collection_name}"

steps {
shell("""\
#!/bin/bash -xe

/bin/bash -x ./scripts/jenkins-scripts/lib/project-install-homebrew.bash ${bottle_name}
""".stripIndent())
}

publishers
{
configure { project ->
project / publishers << 'hudson.plugins.logparser.LogParserPublisher' {
unstableOnWarning true
failBuildOnError false
parsingRulesPath('/var/lib/jenkins/logparser_warn_on_mark_unstable')
}
}
}
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions jenkins-scripts/dsl/logs/generated_jobs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ install_ci ionic gz_fuel_tools10-install-pkg-jammy-amd64
install_ci ionic gz_fuel_tools10-install_bottle-homebrew-amd64
install_ci ionic gz_gui9-install-pkg-jammy-amd64
install_ci ionic gz_gui9-install_bottle-homebrew-amd64
install_ci ionic gz_ionic-install-pkg-jammy-amd64
install_ci ionic gz_ionic-install_bottle-homebrew-amd64
install_ci ionic gz_launch8-install-pkg-jammy-amd64
install_ci ionic gz_launch8-install_bottle-homebrew-amd64
install_ci ionic gz_math8-install-pkg-jammy-amd64
Expand Down
Loading

0 comments on commit fda1471

Please sign in to comment.