* VRFS-438 - squirt out BUILD_NUMBER into file and make debian packages reference it when it starts the app so that gem versions can be found
This commit is contained in:
parent
fbb9009fcb
commit
e76fc73595
|
|
@ -19,3 +19,4 @@
|
|||
artifacts
|
||||
*.iml
|
||||
.idea
|
||||
BUILD_NUMBER
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ module JamAdmin
|
|||
end
|
||||
EOF
|
||||
|
||||
echo "$BUILD_NUMBER" > BUILD_NUMBER
|
||||
|
||||
type -P dpkg-architecture > /dev/null
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ EOF
|
|||
bundle exec rake assets:precompile RAILS_ENV=production
|
||||
|
||||
# create debian using fpm
|
||||
bundle exec fpm -s dir -t deb -p target/deb/jam-admin_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "jam-admin" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/jam-admin --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile .bundle config Rakefile script config.ru lib public vendor app
|
||||
bundle exec fpm -s dir -t deb -p target/deb/jam-admin_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "jam-admin" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/jam-admin --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile .bundle config Rakefile script config.ru lib public vendor app BUILD_NUMBER
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# default config values
|
||||
PORT=3000
|
||||
BUILD_NUMBER=1
|
||||
BUILD_NUMBER=`cat /var/lib/jam-admin/BUILD_NUMBER`
|
||||
|
||||
|
||||
CONFIG_FILE="/etc/jam-admin/upstart.conf"
|
||||
|
|
|
|||
|
|
@ -37,3 +37,4 @@ vendor/cache
|
|||
public/assets
|
||||
public/uploads
|
||||
/log/*.out
|
||||
BUILD_NUMBER
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ module JamWeb
|
|||
end
|
||||
EOF
|
||||
|
||||
echo "$BUILD_NUMBER" > BUILD_NUMBER
|
||||
|
||||
type -P dpkg-architecture > /dev/null
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ EOF
|
|||
bundle exec rake assets:precompile RAILS_ENV=production
|
||||
|
||||
# create debian using fpm
|
||||
bundle exec fpm -s dir -t deb -p target/deb/jam-web_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "jam-web" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/jam-web --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile .bundle config Rakefile script config.ru lib public vendor app
|
||||
bundle exec fpm -s dir -t deb -p target/deb/jam-web_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "jam-web" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/jam-web --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile .bundle config Rakefile script config.ru lib public vendor app BUILD_NUMBER
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# default config values
|
||||
PORT=3000
|
||||
BUILD_NUMBER=1
|
||||
BUILD_NUMBER=`cat /var/lib/jam-web/BUILD_NUMBER`
|
||||
|
||||
|
||||
CONFIG_FILE="/etc/jam-web/upstart.conf"
|
||||
|
|
|
|||
|
|
@ -23,3 +23,4 @@ log/*
|
|||
*.iml
|
||||
target
|
||||
vendor
|
||||
BUILD_NUMBER
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ if [ -n "$PACKAGE" ]; then
|
|||
echo "BUILD NUMBER is not defined"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "$BUILD_NUMBER" > BUILD_NUMBER
|
||||
|
||||
type -P dpkg-architecture > /dev/null
|
||||
|
||||
if [ "$?" = "0" ]; then
|
||||
|
|
@ -60,7 +62,7 @@ if [ -n "$PACKAGE" ]; then
|
|||
bundle install --path vendor/bundle --local
|
||||
|
||||
# create debian using fpm
|
||||
bundle exec fpm -s dir -t deb -p target/deb/websocket-gateway_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "websocket-gateway" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/websocket-gateway --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile lib bin vendor .bundle config script
|
||||
bundle exec fpm -s dir -t deb -p target/deb/websocket-gateway_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "websocket-gateway" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/websocket-gateway --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile lib bin vendor .bundle config script BUILD_NUMBER
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash -l
|
||||
|
||||
# default config values
|
||||
BUILD_NUMBER=1
|
||||
BUILD_NUMBER=`cat /var/lib/websocket-gateway/BUILD_NUMBER`
|
||||
|
||||
CONFIG_FILE="/etc/websocket-gateway/upstart.conf"
|
||||
if [ -e "$CONFIG_FILE" ]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue