Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions create_jenkins_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def main(argv=None):
'ci_scripts_default_branch': args.ci_scripts_default_branch,
'default_repos_url': DEFAULT_REPOS_URL,
'supplemental_repos_url': '',
'pixi_toml_url': '',
'time_trigger_spec': '',
'mailer_recipients': '',
'ignore_rmw_default': {'rmw_fastrtps_dynamic_cpp'},
Expand Down
5 changes: 5 additions & 0 deletions job_templates/ci_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
ci_scripts_default_branch=ci_scripts_default_branch,
default_repos_url=default_repos_url,
supplemental_repos_url=supplemental_repos_url,
pixi_toml_url=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 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 @@ -248,6 +250,9 @@ 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%
if "!CI_PIXI_TOML_URL!" NEQ "" (
set "BUILD_ARGS=!BUILD_ARGS! --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,
pixi_toml_url=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
5 changes: 5 additions & 0 deletions 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,
pixi_toml_url=pixi_toml_url,
ubuntu_distro=ubuntu_distro,
el_release=el_release,
ros_distro=ros_distro,
Expand Down Expand Up @@ -104,6 +105,7 @@ ubuntu_distro: ${build.buildVariableResolver.resolve('CI_UBUNTU_DISTRO')}, <br/>
el_release: ${build.buildVariableResolver.resolve('CI_EL_RELEASE')}, <br/>
@[end if]@
ros_distro: ${build.buildVariableResolver.resolve('CI_ROS_DISTRO')}, <br/>
pixi_toml_url: ${build.buildVariableResolver.resolve('CI_PIXI_TOML_URL')}, <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/>
Expand Down Expand Up @@ -244,6 +246,9 @@ 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%
if "!CI_PIXI_TOML_URL!" NEQ "" (
set "BUILD_ARGS=!BUILD_ARGS! --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,
pixi_toml_url=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,14 @@ 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 in a gist, then pass the raw URL here.
The pixi.toml file defines the Pixi environment configuration for the build.</description>
<defaultValue>@(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
8 changes: 6 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,9 @@ 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 -Command "if (-not $env:PIXI_TOML_URL.StartsWith('https://')) { Write-Error 'PIXI_TOML_URL must use HTTPS protocol'; exit 1 }"
ADD ${PIXI_TOML_URL} pixi.toml
RUN pixi --color never --no-progress -q install
RUN pixi --color never --no-progress -q list

Expand Down