Skip to content

Commit

Permalink
Add --ros-distro batch job argument from CI parameter.
Browse files Browse the repository at this point in the history
Expands on the work from #450 to expose the CI parameter as a batch job
argument. This is needed in order to install different Python wheels
when running in the Windows debug configuration.
  • Loading branch information
nuclearsandwich committed May 20, 2020
1 parent 37ba0ec commit cbeb609
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions job_templates/ci_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ fi
@[ if os_name in ['linux', 'linux-aarch64', 'linux-armhf'] and turtlebot_demo]@
export CI_ARGS="$CI_ARGS --ros1-path /opt/ros/$CI_ROS1_DISTRO"
@[ end if]@
if [ -n "${CI_ROS_DISTRO+x}" ]; then
export CI_ARGS="$CI_ARGS --ros-distro $CI_ROS_DISTRO"
fi
if [ -n "${CI_BUILD_ARGS+x}" ]; then
export CI_ARGS="$CI_ARGS --build-args $CI_BUILD_ARGS"
fi
Expand Down Expand Up @@ -286,6 +289,9 @@ if "!CI_BRANCH_TO_TEST!" NEQ "" (
if "!CI_COLCON_BRANCH!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --colcon-branch !CI_COLCON_BRANCH!"
)
if "!CI_ROS_DISTRO!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --ros-distro !CI_ROS_DISTRO!"
)
if "!CI_USE_WHITESPACE_IN_PATHS!" == "true" (
set "CI_ARGS=!CI_ARGS! --white-space-in sourcespace buildspace installspace workspace"
)
Expand Down
6 changes: 6 additions & 0 deletions job_templates/packaging_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ export CI_ARGS="$CI_ARGS --ros1-path /opt/ros/$CI_ROS1_DISTRO"
echo "not building/testing the ros1_bridge on MacOS"
# export CI_ARGS="$CI_ARGS --ros1-path /Users/osrf/melodic/install_isolated"
@[ end if]@
if [ -n "${CI_ROS_DISTRO+x}" ]; then
export CI_ARGS="$CI_ARGS --ros-distro $CI_ROS_DISTRO"
fi
if [ -n "${CI_COLCON_MIXIN_URL+x}" ]; then
export CI_ARGS="$CI_ARGS --colcon-mixin-url $CI_COLCON_MIXIN_URL"
fi
Expand Down Expand Up @@ -370,6 +373,9 @@ if "!CI_BRANCH_TO_TEST!" NEQ "" (
if "!CI_COLCON_BRANCH!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --colcon-branch !CI_COLCON_BRANCH!"
)
if "!CI_ROS_DISTRO!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --ros-distro !CI_ROS_DISTRO!"
)
set "CI_ARGS=!CI_ARGS! --ignore-rmw"
if "!CI_USE_CONNEXT_STATIC!" == "false" (
set "CI_ARGS=!CI_ARGS! rmw_connext_cpp"
Expand Down
3 changes: 3 additions & 0 deletions ros2_batch_job/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def get_args(sysargv=None):
parser.add_argument(
'--force-ansi-color', default=False, action='store_true',
help="forces this program to output ansi color")
parser.add_argument(
'--ros-distro', default='foxy',
help="The ROS distribution being built")
parser.add_argument(
'--ros1-path', default=None,
help="path of ROS 1 workspace to be sourced")
Expand Down

0 comments on commit cbeb609

Please sign in to comment.