Skip to content

Commit

Permalink
Add support for not building some workspaces (#62)
Browse files Browse the repository at this point in the history
* Add support for not building some workspaces
Update README for SOURCE_ONLY_WORKSPACES
  • Loading branch information
ryanewel authored Dec 11, 2019
1 parent 63a100e commit 41bd968
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Configuration is done via environment variables. When adding a new option, make
### Sample Applications

* `WORKSPACES`: which workspaces should be built.
* `SOURCE_ONLY_WORKSPACES`: workspaces which shouldn't be be built, but the source files will be included in the source upload
* `SA_PACKAGE_NAME`: controls which package's manifest file would determine the version of the application bundle that's going to be uploaded to S3.
* `UPLOAD_SOURCES`: by default, the source files for `${WORKSPACES}` will be uploaded (along with LICENSE, NOTICE, README and roboMakerSettings.json files). You may override the default behavior.
* `UPLOAD_SOURCES=false`: Skip source upload
Expand Down
1 change: 1 addition & 0 deletions ce_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ docker run -v "${PWD}/shared:/shared" \
-e GAZEBO_VERSION="${GAZEBO_VERSION:-7}" \
-e DOCKER_BUILD_SCRIPT="${DOCKER_BUILD_SCRIPT}" \
-e WORKSPACES="${WORKSPACES}" \
-e SOURCE_ONLY_WORKSPACES="${SOURCE_ONLY_WORKSPACES}" \
-e UPLOAD_SOURCES="${UPLOAD_SOURCES}" \
--name "${ROS_DISTRO}-container" \
--network=host \
Expand Down
6 changes: 4 additions & 2 deletions common_sa_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ if [ -z "$WORKSPACES" ]; then
WORKSPACES="robot_ws simulation_ws"
fi

SOURCE_WORKSPACES="${WORKSPACES} ${SOURCE_ONLY_WORKSPACES}"

# Run ROSWS update in each workspace before creating archive
for WS in $WORKSPACES
for WS in $SOURCE_WORKSPACES
do
WS_DIR="/${ROS_DISTRO}_ws/src/${BUILD_DIR_NAME}/${WS}"
echo "looking for ${WS}, $WS_DIR"
Expand All @@ -30,7 +32,7 @@ done
if [ ! -z "$UPLOAD_SOURCES" ] && [ "$UPLOAD_SOURCES" == "false" ]; then
echo "Skipping source upload for this build job"
else
SOURCES_INCLUDES="${WORKSPACES} LICENSE* NOTICE* README* roboMakerSettings.json"
SOURCES_INCLUDES="${SOURCE_WORKSPACES} LICENSE* NOTICE* README* roboMakerSettings.json"
cd /${ROS_DISTRO}_ws/src/${BUILD_DIR_NAME}/
/usr/bin/zip -r /shared/sources.zip $SOURCES_INCLUDES
tar cvzf /shared/sources.tar.gz $SOURCES_INCLUDES
Expand Down

0 comments on commit 41bd968

Please sign in to comment.