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

feat(ci,docker): change vcs import to COPY src #4738

Merged
merged 29 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e03a150
introduce src-imported stage
youtalk May 13, 2024
e5aead0
empty
youtalk May 14, 2024
2d70277
generate install package lists
youtalk May 17, 2024
05d35ae
append || true
youtalk May 17, 2024
a390066
cat packages
youtalk May 17, 2024
99cd9bf
chore(docker): separate `rosdep install` and `colcon build` RUN comma…
youtalk May 15, 2024
bcc6509
wip
youtalk May 17, 2024
a50e7e5
wip
youtalk May 17, 2024
0fec259
Update Dockerfile
youtalk May 17, 2024
0c65eae
Update Dockerfile
youtalk May 18, 2024
f209622
install pacmod
youtalk May 18, 2024
af11db7
rename
youtalk May 18, 2024
3990ff0
Revert "install pacmod"
youtalk May 18, 2024
3dd8d57
install pacmod3
youtalk May 18, 2024
00d2e3b
register pamod3 repos
youtalk May 18, 2024
35366de
ignore hadolint
youtalk May 18, 2024
3eb3913
revert
youtalk May 18, 2024
b693322
run set-dev-env.sh
youtalk May 18, 2024
99fd7ea
pip install
youtalk May 18, 2024
bdc1316
copy
youtalk May 18, 2024
be49c85
rosdep update
youtalk May 19, 2024
d7effac
Merge branch 'main' into src-imported
youtalk May 19, 2024
92d85cf
vcs import outside dockerfile
youtalk May 20, 2024
3c3edf6
Merge remote-tracking branch 'upstream/main' into upstream-vcs-import…
youtalk May 20, 2024
ae37e00
refine order and remove /autoware/src at last
youtalk May 21, 2024
8c54707
fix hadolint
youtalk May 21, 2024
6a9398d
remove tar files
youtalk May 22, 2024
fbca7d7
shell: bash
youtalk May 22, 2024
da2960b
Merge remote-tracking branch 'upstream/main' into upstream-vcs-import…
youtalk May 23, 2024
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
16 changes: 16 additions & 0 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
on:
push:
tags:
- adkit-v*.*.*

Check warning on line 12 in .github/workflows/docker-build-and-push-main-self-hosted.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (adkit)
branches:
- main
schedule:
Expand Down Expand Up @@ -56,9 +56,25 @@
- name: Check out repository
uses: actions/checkout@v4

- name: Install vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pip install --no-cache-dir vcstool

- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos

- name: Build 'autoware-openadk'
uses: ./.github/actions/docker-build-and-push
with:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
on:
push:
tags:
- adkit-v*.*.*

Check warning on line 12 in .github/workflows/docker-build-and-push-main.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (adkit)
branches:
- main
schedule:
Expand Down Expand Up @@ -51,9 +51,25 @@
- name: Check out repository
uses: actions/checkout@v4

- name: Install vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pip install --no-cache-dir vcstool

- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos

- name: Build 'autoware-openadk'
uses: ./.github/actions/docker-build-and-push
with:
Expand Down
10 changes: 3 additions & 7 deletions docker/autoware-openadk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@ WORKDIR /autoware
RUN --mount=type=ssh \
./setup-dev-env.sh -y rosdep \
&& pip uninstall -y ansible ansible-core \
&& pip install --no-cache-dir vcstool \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache

WORKDIR /autoware
COPY autoware.repos /autoware/
RUN --mount=type=ssh \
mkdir src \
&& vcs import src < autoware.repos
# Copy repository files
COPY src /autoware/src

# Generate install package lists
RUN rosdep update && rosdep keys --ignore-src --from-paths src \
Expand Down Expand Up @@ -93,7 +89,6 @@ RUN --mount=type=ssh \
&& find / -name 'libnv*.a' -delete

# Install rosdep dependencies
COPY --from=src-imported /autoware/src /autoware/src
COPY --from=src-imported /rosdep-all-depend-packages.txt /tmp/rosdep-all-depend-packages.txt
# hadolint ignore=SC2002
RUN --mount=type=ssh \
Expand All @@ -102,6 +97,7 @@ RUN --mount=type=ssh \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache

# Build Autoware
COPY --from=src-imported /autoware/src /autoware/src
RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --cmake-args \
" -Wno-dev" \
Expand Down
Loading