Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy rosdoc2 sources into docker image instead of bind-mounting them read-only. #1030

Closed
wants to merge 5 commits into from
Closed
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
5 changes: 2 additions & 3 deletions ros_buildfarm/scripts/doc/build_rosdoc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def main(argv=sys.argv[1:]):
'-m',
'pip',
'install',
'--no-warn-script-location',
'--use-deprecated=out-of-tree-build',
'--break-system-packages',
'.'],
cwd=args.rosdoc2_dir)
if pip_rc:
Expand All @@ -64,7 +63,7 @@ def main(argv=sys.argv[1:]):
env['PATH'] = ''
else:
env['PATH'] += ':'
env['PATH'] += '/home/buildfarm/.local/bin'
env['PATH'] += os.path.join(env['HOME'], '.local/bin')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was creating problems for my nuclearsandwich/uid-override patches which are required if your host user id is 1000 as the ubuntu:noble image now has an ubuntu user there.


source_space = os.path.join(args.workspace_root, 'src')
print("Crawling for packages in workspace '%s'" % (source_space))
Expand Down
3 changes: 2 additions & 1 deletion ros_buildfarm/templates/doc/rosdoc2_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ else:
'sleep 1',
'',
'echo "# BEGIN SECTION: Build Dockerfile - doc"',
'# copy rosdoc2 into image build context directory',
'cp -r $WORKSPACE/rosdoc2 $WORKSPACE/docker_doc/rosdoc2',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to be available in the docker context to be copied into the image the rosdoc2 source directory needs to be in the docker context subdirectory.

'# build and run build_and_install Dockerfile',
'cd $WORKSPACE/docker_doc',
'python3 -u $WORKSPACE/ros_buildfarm/scripts/misc/docker_pull_baseimage.py',
Expand All @@ -178,7 +180,6 @@ else:
' --rm ' +
' --cidfile=$WORKSPACE/docker_doc/docker.cid' +
' -v $WORKSPACE/ros_buildfarm:/tmp/ros_buildfarm:ro' +
' -v $WORKSPACE/rosdoc2:/tmp/rosdoc2:ro' +
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mount is no longer useful as we're copying the contents into the image.

' -v $WORKSPACE/ws:/tmp/ws' +
' rosdoc2.%s_%s' % (rosdistro_name, doc_repo_spec.name.lower()),
'echo "# END SECTION"',
Expand Down
1 change: 1 addition & 0 deletions ros_buildfarm/templates/doc/rosdoc2_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ RUN echo "@today_str"

RUN python3 -u /tmp/wrapper_scripts/apt.py update-install-clean -q -y -o Debug::pkgProblemResolver=yes build-essential python3-catkin-pkg-modules doxygen graphviz openssh-client python3 python3-yaml python3-pip rsync

COPY --chown=@uid:@uid rosdoc2 /tmp/rosdoc2
USER buildfarm
ENTRYPOINT ["sh", "-c"]
@{
Expand Down
Loading