-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont crash if a pkg is missing a config dir
- BLDR-49
- Loading branch information
Dave Parfitt
committed
Jan 20, 2016
1 parent
ce7c191
commit ae6bcf8
Showing
7 changed files
with
133 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/fixtures/simple_service_without_config/bin/simple_service_without_config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
EXIT_NOW=0 | ||
|
||
set_exit_now() { | ||
EXIT_NOW=1 | ||
} | ||
|
||
trap "set_exit_now" INT TERM HUP | ||
echo Shipping out to Boston | ||
echo "### Configuration file ###" | ||
cat /opt/bldr/srvc/simple_service/config/simple.conf | ||
echo "### End of configuration file ###" | ||
echo "### Running toml data ###" | ||
cat /opt/bldr/srvc/simple_service/config.toml | ||
echo "### End running toml data ###" | ||
|
||
while [ 1 ]; do | ||
if [ $EXIT_NOW = 1 ]; then | ||
echo "Exiting on signal" | ||
exit 0 | ||
fi | ||
sleep 1 | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
ld_library_path="" | ||
for x in `find /opt -name 'lib' -type d`; do | ||
ld_library_path="$ld_library_path:$x:$x/x86_64-linux-gnu" | ||
done | ||
exec env LD_LIBRARY_PATH=$ld_library_path /bin/bldr-debug $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
setting = "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
pkg_name=simple_service_without_config | ||
pkg_derivation=test | ||
pkg_version=0.0.1 | ||
pkg_license=('Apache2') | ||
pkg_maintainer="Adam Jacob <[email protected]>" | ||
pkg_source=http://example.com/releases/${pkg_name}-${pkg_version}.tar.bz2 | ||
pkg_filename=${pkg_name}-${pkg_version}.tar.bz2 | ||
pkg_shasum=0e21be5d7c5e6ab6adcbed257619897db59be9e1ded7ef6fd1582d0cdb5e5bb7 | ||
pkg_gpg_key=3853DA6B | ||
pkg_binary_path=(bin) | ||
pkg_deps=(chef/gpgme chef/libassuan chef/libgpg-error) | ||
pkg_service_run="bin/simple_service_without_config" | ||
pkg_docker_build="auto" | ||
|
||
do_begin() { | ||
tar -cjvf $BLDR_SRC_CACHE/${pkg_name}-${pkg_version}.tar.bz2 --exclude 'plans' --exclude '.git' --exclude '.gitignore' --exclude 'target' --transform "s,^\.,simple_service_without_config-0.0.1," . | ||
pkg_shasum=$(trim $(sha256sum /opt/bldr/cache/src/simple_service_without_config-0.0.1.tar.bz2 | cut -d " " -f 1)) | ||
} | ||
|
||
do_download() { | ||
return 0 | ||
} | ||
|
||
do_build() { | ||
return 0 | ||
} | ||
|
||
do_install() { | ||
cp -r $BLDR_SRC_CACHE/$pkg_dirname/bin $pkg_prefix | ||
chmod 755 $pkg_path/bin | ||
chmod 755 $pkg_path/bin/* | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ae6bcf8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delivery Status: