Improve container build: GRN2-156 (#582)

* Cache gems

* Remove debug statement

* Use postgress by default

* Update sample.env
This commit is contained in:
shawn-higgins1
2019-06-26 10:15:53 -04:00
committed by Jesus Federico
parent 18214037c3
commit ccbd46f045
4 changed files with 39 additions and 23 deletions

View File

@ -56,7 +56,12 @@ if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && ( [
fi
# Include sqlite for production
sed -i "/^group :production do/a\ \ gem 'sqlite3', '~> 1.3.6'" Gemfile
sqliteCount="$(grep "gem 'sqlite3'" Gemfile | wc -l)"
if [ $sqliteCount -lt 2 ]; then
sed -i "/^group :production do/a\ \ gem 'sqlite3', '~> 1.3.6'" Gemfile
fi
# Set the version tag when it is a release or the commit sha was included.
if [[ "$CD_REF_NAME" == *"release"* ]]; then
export CD_VERSION_CODE=${CD_REF_NAME:8}