Skip to content

Commit

Permalink
Merge branch 'master' into jrivero/conda_configs
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero authored Nov 12, 2024
2 parents 5100e9d + bc90c2a commit 370f8c1
Show file tree
Hide file tree
Showing 20 changed files with 115 additions and 207 deletions.
6 changes: 2 additions & 4 deletions jenkins-scripts/docker/debian-ratt-builder.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ echo '# BEGIN SECTION: setup the testing enviroment'
# Define the name to be used in docker
export DOCKER_JOB_NAME="debian_ratt_builder"
. "${SCRIPT_DIR}/lib/boilerplate_prepare.sh"
. "${SCRIPT_DIR}/lib/_common_scripts.bash"
echo '# END SECTION'

cat > build.sh << DELIM
###################################################
# Make project-specific changes here
#
set -ex
$(generate_buildsh_header)
if ${USE_UNSTABLE}; then
TARGET_DISTRO='unstable'
Expand Down
4 changes: 2 additions & 2 deletions jenkins-scripts/docker/gz-source-generation.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ echo '# BEGIN SECTION: setup the testing enviroment'
# Define the name to be used in docker
export DOCKER_JOB_NAME="source_generation_job"
. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash
echo '# END SECTION'

cat > build.sh << DELIM
#!/bin/bash
set -ex
$(generate_buildsh_header)
PKG_DIR=\$WORKSPACE/pkgs
SOURCES_DIR=\$WORKSPACE/sources
Expand Down
13 changes: 13 additions & 0 deletions jenkins-scripts/docker/lib/_common_scripts.bash
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
export APT_INSTALL="sudo DEBIAN_FRONTEND=noninteractive apt-get install -y"

generate_buildsh_header()
{
SHELL_ON_ERRORS=${SHELL_ON_ERRORS:-false}
echo "#!/bin/bash"
echo "set -ex"
if ${SHELL_ON_ERRORS}; then
echo 'trap "/bin/bash" 0 INT QUIT ABRT PIPE TERM'
fi
if $GENERIC_ENABLE_TIMING; then
echo "source ${TIMING_DIR}/_time_lib.sh ${WORKSPACE}"
fi
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ fi
[[ -z $GENERIC_ENABLE_CPPCHECK ]] && GENERIC_ENABLE_CPPCHECK=true
[[ -z $GENERIC_ENABLE_TESTS ]] && GENERIC_ENABLE_TESTS=true

cat > build.sh << DELIM_HEADER
#!/bin/bash
set -ex
. ${SCRIPT_DIR}/lib/_common_scripts.bash

if $GENERIC_ENABLE_TIMING; then
source ${TIMING_DIR}/_time_lib.sh ${WORKSPACE}
fi
cat > build.sh << DELIM_HEADER
$(generate_buildsh_header)
DELIM_HEADER

# Process the source build of dependencies if needed
Expand Down
4 changes: 4 additions & 0 deletions jenkins-scripts/docker/lib/boilerplate_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ source ${SCRIPT_DIR}/../lib/boilerplate_timing_prepare.sh
init_stopwatch TOTAL_TIME
init_stopwatch CREATE_TESTING_ENVIROMENT

# Enable shell on errors is designed to help debuging but never
# to be run on Jenkins.
SHELL_ON_ERRORS=${SHELL_ON_ERRORS:-false}

# Default values - Provide them is prefered
if [ -z ${DISTRO} ]; then
DISTRO=bionic
Expand Down
7 changes: 2 additions & 5 deletions jenkins-scripts/docker/lib/debbuild-backport.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ fi
export ENABLE_REAPER=false

. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash

cat > build.sh << DELIM
###################################################
# Make project-specific changes here
#
#!/usr/bin/env bash
set -ex
$(generate_buildsh_header)
cd $WORKSPACE/build
Expand Down
7 changes: 2 additions & 5 deletions jenkins-scripts/docker/lib/debbuild-base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ fi
export ENABLE_REAPER=false

. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash
. ${SCRIPT_DIR}/lib/_gazebo_utils.sh

cat > build.sh << DELIM
###################################################
# Make project-specific changes here
#
#!/usr/bin/env bash
set -ex
$(generate_buildsh_header)
cd $WORKSPACE/build
Expand Down
7 changes: 2 additions & 5 deletions jenkins-scripts/docker/lib/debbuild-bloom-base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ export ENABLE_REAPER=false
PACKAGE_UNDERSCORE_NAME=${PACKAGE//-/_}

. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash
. ${SCRIPT_DIR}/lib/_gazebo_utils.sh

cat > build.sh << DELIM
###################################################
# Make project-specific changes here
#
#!/usr/bin/env bash
set -ex
$(generate_buildsh_header)
cd $WORKSPACE/build
Expand Down
7 changes: 2 additions & 5 deletions jenkins-scripts/docker/lib/debian-git-repo-base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
export ENABLE_REAPER=false

. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash
. ${SCRIPT_DIR}/lib/_gazebo_utils.sh

# The git plugin leaves a repository copy with a detached HEAD
Expand All @@ -26,11 +27,7 @@ if [[ -z ${BRANCH} ]]; then
fi

cat > build.sh << DELIM
###################################################
# Make project-specific changes here
#
#!/usr/bin/env bash
set -ex
$(generate_buildsh_header)
if ${CLONE_NEEDED}; then
echo '# BEGIN SECTION: clone the git repo'
Expand Down
20 changes: 6 additions & 14 deletions jenkins-scripts/docker/lib/docker_generate_dockerfile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ if [[ -z ${OSRF_REPOS_TO_USE} ]]; then
fi
fi

# Enable shell on errors is designed to help debuging but never
# to be run on Jenkins.
SHELL_ON_ERRORS=${SHELL_ON_ERRORS:-false}

echo '# BEGIN SECTION: create the Dockerfile'
cat > Dockerfile << DELIM_DOCKER
#!/bin/bash
#######################################################
# Docker file to run build.sh
Expand Down Expand Up @@ -174,8 +177,8 @@ fi
# The redirection fails too many times using us ftp
if [[ ${LINUX_DISTRO} == 'debian' ]]; then
cat >> Dockerfile << DELIM_DEBIAN_APT
RUN sed -i -e 's:httpredir:ftp.us:g' /etc/apt/sources.list
RUN echo "deb-src ${SOURCE_LIST_URL} ${DISTRO} main" >> /etc/apt/sources.list
RUN sed -i -e 's/URIs: .*/URIs: http:\/\/ftp.us.debian.org\/debian/g' /etc/apt/sources.list.d/debian.sources
RUN sed -i -e 's/Types: deb/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources
DELIM_DEBIAN_APT
fi

Expand Down Expand Up @@ -331,17 +334,6 @@ RUN (apt-get update || (rm -rf /var/lib/apt/lists/* && apt-get update)) \
RUN mkdir -p ${WORKSPACE}
DELIM_DOCKER31

# Beware of moving this code since it needs to run update-alternative after
# installing the default compiler in PACKAGES_CACHE_AND_CHECK_UPDATES
if ${INSTALL_C17_COMPILER}; then
cat >> Dockerfile << DELIM_GCC8
RUN apt-get update \\
&& apt-get install -y g++-8 \\
&& rm -rf /var/lib/apt/lists/* \\
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
DELIM_GCC8
fi

if ${USE_SQUID}; then
cat >> Dockerfile << DELIM_DOCKER_SQUID
# If host is running squid-deb-proxy on port 8000, populate /etc/apt/apt.conf.d/30proxy
Expand Down
9 changes: 4 additions & 5 deletions jenkins-scripts/docker/lib/gazebo_ros_pkgs-check-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export ENABLE_REAPER=false

DOCKER_JOB_NAME="gazebo_ros_pkgs_ci"
. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash
. ${SCRIPT_DIR}/lib/_gazebo_utils.sh

ROS_SETUP_PREINSTALL_HOOK="""
Expand All @@ -20,7 +21,8 @@ ${GAZEBO_MODEL_INSTALLATION}

if ${ROS2}; then
cat > build.sh << DELIM_CHECKOUT
set -ex
$(generate_buildsh_header)
source /opt/ros/${ROS_DISTRO}/setup.bash
TEST_TIMEOUT=90
Expand All @@ -36,10 +38,7 @@ fi
DELIM_CHECKOUT
else
cat > build.sh << DELIM_CHECKOUT
###################################################
# Make project-specific changes here
#
set -ex
$(generate_buildsh_header)
[[ -d ${WORKSPACE}/gazebo_ros_demos ]] && rm -fr ${WORKSPACE}/gazebo_ros_demos
git clone https://github.com/ros-simulation/gazebo_ros_demos ${WORKSPACE}/gazebo_ros_demos
Expand Down
8 changes: 2 additions & 6 deletions jenkins-scripts/docker/lib/generic-abi-base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ echo '# BEGIN SECTION: setup the testing enviroment'
# Define the name to be used in docker
DOCKER_JOB_NAME="abi_job"
. ${SCRIPT_DIR}/lib/boilerplate_prepare.sh
. ${SCRIPT_DIR}/lib/_common_scripts.bash
echo '# END SECTION'

# Could be empty, just fine
Expand All @@ -44,12 +45,7 @@ if [[ "${NEED_C17_COMPILER}" == "true" ]]; then
fi

cat > build.sh << DELIM
#!/bin/bash
###################################################
# Make project-specific changes here
#
set -ex
$(generate_buildsh_header)
if [ `expr length "${ABI_JOB_PRECHECKER_HOOK} "` -gt 1 ]; then
echo '# BEGIN SECTION: running pre ABI hook'
Expand Down
7 changes: 1 addition & 6 deletions jenkins-scripts/docker/lib/generic-install-base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ DOCKER_JOB_NAME="install_job"
echo '# END SECTION'

cat > build.sh << DELIM
#!/bin/bash
###################################################
# Make project-specific changes here
#
set -ex
$(generate_buildsh_header)
if [ `expr length "${INSTALL_JOB_PREINSTALL_HOOK} "` -gt 1 ]; then
echo '# BEGIN SECTION: running pre install hook'
Expand Down
8 changes: 3 additions & 5 deletions jenkins-scripts/docker/lib/gzdev-base-linux.bash
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
echo '# BEGIN SECTION: setup the testing enviroment'
export DOCKER_JOB_NAME="gzdev"
. "${SCRIPT_DIR}/lib/boilerplate_prepare.sh"
. "${SCRIPT_DIR}/lib/_common_scripts.bash"
. "${SCRIPT_DIR}/lib/_install_nvidia_docker.sh"
echo '# END SECTION'

. ${SCRIPT_DIR}/lib/_install_nvidia_docker.sh

cat > build.sh << DELIM
###################################################
#
set -ex
$(generate_buildsh_header)
export MAKE_JOBS=${MAKE_JOBS}
export DISPLAY=${DISPLAY}
Expand Down
81 changes: 0 additions & 81 deletions jenkins-scripts/dsl/debian.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,6 @@ import _configs_.*
import javaposse.jobdsl.dsl.Job

Globals.default_emails = "[email protected]"

packages = [:]
packages['science-team'] = ['console-bridge',
'gazebo',
'fcl',
'ignition-cmake',
'ignition-common',
'ignition-math2',
'ignition-math4',
'ignition-msgs',
'ignition-tools',
'ignition-transport', // version 4
'dart',
'libccd',
'octomap',
'sdformat', // version 6
'simbody',
'urdfdom',
'urdfdom-headers' ]

packages['jrivero-guest'] = ['empy']


packages.each { repo_name, pkgs ->
pkgs.each { pkg ->

// --------------------------------------------------------------
// 2. Create the job that tries to build the package and run lintian
def ci_job = job("${pkg}-pkg_builder-master-debian_sid-amd64")
OSRFLinuxBuildPkgBase.create(ci_job)
ci_job.with
{
scm {
git {
remote {
url("https://salsa.debian.org/${repo_name}/${pkg}.git")
}
extensions {
cleanBeforeCheckout()
relativeTargetDirectory('repo')
}

branch('refs/heads/master')
}
}

properties {
priority 350
}

parameters {
textParam("RELEASE_VERSION", null, "osrfX, OSRF postix version")
textParam("RELEASE_ARCH_VERSION", null, "~ARCH-X, release version")
}

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

export LINUX_DISTRO=debian
export DISTRO=sid

/bin/bash -xe ./scripts/jenkins-scripts/docker/debian-git-debbuild.bash
""".stripIndent())
}

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

// ratt package to help during transition
def ratt_pkg_job = job("debian-ratt-builder")
OSRFLinuxBase.create(ratt_pkg_job)
Expand Down
Loading

0 comments on commit 370f8c1

Please sign in to comment.