Skip to content

Commit

Permalink
Merge pull request #13 from tiiuae/use_fog_ros_baseimage
Browse files Browse the repository at this point in the history
Use fog ros baseimage
  • Loading branch information
maseabunikie authored Aug 3, 2022
2 parents 0f07b25 + 6c58b45 commit f42f283
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 327 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
jobs:
tii-px4-msgs-deb:
runs-on: ubuntu-latest
strategy:
matrix:
ros2_distro: [foxy, galactic]
steps:
- name: Checkout PX4-msgs
uses: actions/checkout@v2
Expand All @@ -22,8 +19,6 @@ jobs:
set -eux
mkdir bin
pushd PX4-msgs
export ROS=1
export ROS_DISTRO=${{ matrix.ros2_distro }}
./build.sh ../bin/
popd
- name: Upload build
Expand Down
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ghcr.io/tiiuae/fog-ros-baseimage:builder-3dcb78d

ARG BUILD_NUMBER

COPY . /main_ws/src/

# this:
# 1) builds the application
# 2) packages the application as .deb in /main_ws/

RUN /packaging/build.sh -b ${BUILD_NUMBER}

RUN mkdir -p /output_dir
RUN cp /main_ws/ros-*-px4-msgs_*_amd64.deb /output_dir/
49 changes: 0 additions & 49 deletions Dockerfile.build_env

This file was deleted.

34 changes: 5 additions & 29 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,14 @@
set -euxo pipefail

output_dir=$1

git_commit_hash=${2:-$(git rev-parse HEAD)}

git_version_string=${3:-$(git log --date=format:%Y%m%d --pretty=~git%cd.%h -n 1)}

build_number=${GITHUB_RUN_NUMBER:=0}

ros_distro=${ROS_DISTRO:=foxy}

iname=${PACKAGE_NAME:=px4-msgs}

iversion=${PACKAGE_VERSION:=latest}

docker build \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--build-arg ROS_DISTRO=${ros_distro} \
--build-arg PACKAGE_NAME=${iname} \
--pull \
-f Dockerfile.build_env -t "${iname}_build:${iversion}" .

docker run \
--rm \
-v $(pwd):/${iname}/sources \
${iname}_build:${iversion} \
./packaging/package.sh \
-b ${build_number} \
-g ${git_commit_hash} \
-v ${git_version_string}
--build-arg BUILD_NUMBER=${build_number} \
-t "tii-px4-msgs:px4-msgs" .

mkdir -p ${output_dir}
cp *.deb *.ddeb ${output_dir}
rm -Rf *.deb *.ddeb
container_id=$(docker create tii-px4-msgs:px4-msgs)
docker cp ${container_id}:/output_dir/. ${output_dir}
docker rm -v ${container_id}

exit 0
43 changes: 0 additions & 43 deletions packaging/build_deps.sh

This file was deleted.

129 changes: 0 additions & 129 deletions packaging/package.sh

This file was deleted.

36 changes: 0 additions & 36 deletions packaging/rosdep.sh

This file was deleted.

3 changes: 0 additions & 3 deletions packaging/rosdep.yaml

This file was deleted.

Empty file removed underlay.repos
Empty file.

0 comments on commit f42f283

Please sign in to comment.