Skip to content
Closed
5 changes: 5 additions & 0 deletions create_jenkins_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
sys.exit("Could not import symbol from ros_buildfarm, please update ros_buildfarm.")

DEFAULT_REPOS_URL = 'https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos'
DEFAULT_PIXI_TOML_URL = 'https://raw.githubusercontent.com/ros2/ros2//rolling/pixi.toml'
DEFAULT_MAIL_RECIPIENTS = 'ros2-buildfarm@googlegroups.com'
PERIODIC_JOB_SPEC = '0 4 * * *'

Expand Down Expand Up @@ -108,6 +109,7 @@ def main(argv=None):
'ci_scripts_default_branch': args.ci_scripts_default_branch,
'default_repos_url': DEFAULT_REPOS_URL,
'supplemental_repos_url': '',
'default_pixi_toml_url': DEFAULT_PIXI_TOML_URL,
'time_trigger_spec': '',
'mailer_recipients': '',
'ignore_rmw_default': {'rmw_fastrtps_dynamic_cpp'},
Expand Down Expand Up @@ -446,6 +448,7 @@ def create_job(os_name, job_name, template_file, additional_dict):
create_job(os_name, 'nightly_' + os_name + '_humble_coverage', 'ci_job.xml.em', {
'cmake_build_type': 'Debug',
'default_repos_url': 'https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos',
'default_pixi_toml_url': 'https://raw.githubusercontent.com/ros2/ros2/humble/pixi.toml',
'disabled': True,
'enable_coverage_default': 'true',
'time_trigger_spec': PERIODIC_JOB_SPEC,
Expand All @@ -461,6 +464,7 @@ def create_job(os_name, job_name, template_file, additional_dict):
create_job(os_name, 'nightly_' + os_name + '_jazzy_coverage', 'ci_job.xml.em', {
'cmake_build_type': 'Debug',
'default_repos_url': 'https://raw.githubusercontent.com/ros2/ros2/jazzy/ros2.repos',
'default_pixi_toml_url': 'https://raw.githubusercontent.com/ros2/ros2/jazzy/pixi.toml',
'disabled': True,
'enable_coverage_default': 'true',
'time_trigger_spec': PERIODIC_JOB_SPEC,
Expand All @@ -476,6 +480,7 @@ def create_job(os_name, job_name, template_file, additional_dict):
create_job(os_name, 'nightly_' + os_name + '_kilted_coverage', 'ci_job.xml.em', {
'cmake_build_type': 'Debug',
'default_repos_url': 'https://raw.githubusercontent.com/ros2/ros2/kilted/ros2.repos',
'default_pixi_toml_url': 'https://raw.githubusercontent.com/ros2/ros2/kilted/pixi.toml',
'disabled': True,
'enable_coverage_default': 'true',
'time_trigger_spec': PERIODIC_JOB_SPEC,
Expand Down
4 changes: 3 additions & 1 deletion job_templates/ci_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'property_parameter-definition',
ci_scripts_default_branch=ci_scripts_default_branch,
default_repos_url=default_repos_url,
default_pixi_toml_url=default_pixi_toml_url,
supplemental_repos_url=supplemental_repos_url,
ignore_rmw_default=ignore_rmw_default,
use_connext_debs_default=use_connext_debs_default,
Expand Down Expand Up @@ -98,6 +99,7 @@ use_fastrtps_dynamic: ${build.buildVariableResolver.resolve('CI_USE_FASTRTPS_DYN
ci_branch: ${build.buildVariableResolver.resolve('CI_SCRIPTS_BRANCH')}, <br/>
repos_url: ${build.buildVariableResolver.resolve('CI_ROS2_REPOS_URL')}, <br/>
supplemental_repos_url: ${build.buildVariableResolver.resolve('CI_ROS2_SUPPLEMENTAL_REPOS_URL')}, <br/>
pixi_toml_url: ${build.buildVariableResolver.resolve('CI_PIXI_TOML_URL')}, <br/>
colcon_branch: ${build.buildVariableResolver.resolve('CI_COLCON_BRANCH')}, <br/>
use_whitespace: ${build.buildVariableResolver.resolve('CI_USE_WHITESPACE_IN_PATHS')}, <br/>
isolated: ${build.buildVariableResolver.resolve('CI_ISOLATED')}, <br/>
Expand Down Expand Up @@ -247,7 +249,7 @@ powershell $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentV
set /p RELEASE_VERSION=&lt; release_version.txt
rem "Put current date in Dockerfile to force cache invalidation once per day"
powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@today_str', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"
set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% --build-arg ROS_DISTRO=%CI_ROS_DISTRO%
set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% --build-arg ROS_DISTRO=%CI_ROS_DISTRO% --build-arg PIXI_TOML_URL=%CI_PIXI_TOML_URL%
docker build %BUILD_ARGS% -t %CONTAINER_NAME% -f %DOCKERFILE% windows_docker_resources || exit /b !ERRORLEVEL!
echo "# END SECTION"

Expand Down
1 change: 1 addition & 0 deletions job_templates/ci_launcher_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
ci_scripts_default_branch=ci_scripts_default_branch,
default_repos_url=default_repos_url,
supplemental_repos_url=supplemental_repos_url,
default_pixi_toml_url=default_pixi_toml_url,
ignore_rmw_default=ignore_rmw_default,
use_connext_debs_default=use_connext_debs_default,
use_isolated_default=use_isolated_default,
Expand Down
4 changes: 3 additions & 1 deletion job_templates/packaging_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
ci_scripts_default_branch=ci_scripts_default_branch,
default_repos_url=default_repos_url,
supplemental_repos_url=supplemental_repos_url,
default_pixi_toml_url=default_pixi_toml_url,
ubuntu_distro=ubuntu_distro,
el_release=el_release,
ros_distro=ros_distro,
Expand Down Expand Up @@ -107,6 +108,7 @@ ros_distro: ${build.buildVariableResolver.resolve('CI_ROS_DISTRO')}, <br/>
branch: ${build.buildVariableResolver.resolve('CI_BRANCH_TO_TEST')}, <br/>
ci_branch: ${build.buildVariableResolver.resolve('CI_SCRIPTS_BRANCH')}, <br/>
repos_url: ${build.buildVariableResolver.resolve('CI_ROS2_REPOS_URL')}, <br/>
pixi_toml_url: ${build.buildVariableResolver.resolve('CI_PIXI_TOML_URL')}, <br/>
use_connextdds: ${build.buildVariableResolver.resolve('CI_USE_CONNEXTDDS')}, <br/>
use_connext_debs: ${build.buildVariableResolver.resolve('CI_USE_CONNEXT_DEBS')}, <br/>
use_cyclonedds: ${build.buildVariableResolver.resolve('CI_USE_CYCLONEDDS')}, <br/>
Expand Down Expand Up @@ -243,7 +245,7 @@ powershell $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentV
set /p RELEASE_VERSION=&lt; release_version.txt
rem "Put current date in Dockerfile to force cache invalidation once per day"
powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@today_str', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"
set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% --build-arg ROS_DISTRO=%CI_ROS_DISTRO%
set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% --build-arg ROS_DISTRO=%CI_ROS_DISTRO% --build-arg PIXI_TOML_URL=%CI_PIXI_TOML_URL%
docker build %BUILD_ARGS% -t %CONTAINER_NAME% -f %DOCKERFILE% windows_docker_resources || exit /b !ERRORLEVEL!
echo "# END SECTION"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ci_scripts_default_branch=ci_scripts_default_branch,
default_repos_url=default_repos_url,
supplemental_repos_url=supplemental_repos_url,
default_pixi_toml_url=default_pixi_toml_url,
ubuntu_distro=ubuntu_distro,
el_release=el_release,
ros_distro=ros_distro,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ Use this instead of the Custom .repos file if you want to add to the default rep
<defaultValue>@supplemental_repos_url</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>CI_PIXI_TOML_URL</name>
<description>Custom pixi.toml file URL to use instead of the default pixi.toml file.
For example, copy the content of pixi.toml to use instead of the default (@default_pixi_toml_url). Then pass the raw URL here.
(@default_pixi_toml_url).
The pixi.toml file defines the Pixi environment configuration for the build.</description>
<defaultValue>@default_pixi_toml_url</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>CI_COLCON_BRANCH</name>
<description>Use a specific branch of the colcon repositories.
Expand Down
7 changes: 5 additions & 2 deletions windows_docker_resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ ARG WINDOWS_RELEASE_VERSION=$WINDOWS_RELEASE_ID
# Use --isolation=process if you need to build in a mounted volume
FROM mcr.microsoft.com/windows/server:$WINDOWS_RELEASE_VERSION

# Set ROS distro value and pixi.toml url
ARG ROS_DISTRO=rolling
ARG PIXI_TOML_URL=https://raw.githubusercontent.com/ros2/ros2/refs/heads/%ROS_DISTRO%/pixi.toml

# Enable long paths on folders
RUN powershell -noexit "New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1 -PropertyType DWORD -Force"

Expand Down Expand Up @@ -48,9 +52,8 @@ RUN powershell -noexit "$bindir = Join-Path $Env:USERPROFILE\.pixi 'bin' ; $path
RUN echo "@today_str"

# Install dependencies via pixi
ARG ROS_DISTRO=rolling
WORKDIR C:\pixi_ws
RUN powershell -noexit irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/%ROS_DISTRO%/pixi.toml -OutFile pixi.toml
RUN powershell -noexit irm %PIXI_TOML_URL% -OutFile pixi.toml
RUN pixi --color never --no-progress -q install
RUN pixi --color never --no-progress -q list

Expand Down