some rework on database config, packager.io & cleanup scripts

This commit is contained in:
André Bauer 2018-05-10 12:51:19 +02:00
parent 54a72907a7
commit 45854246da
7 changed files with 30 additions and 15 deletions

View file

@ -41,11 +41,7 @@ targets:
- nginx
- postgresql-server
before:
- uname -a
- ruby -v
- env
- "cat Gemfile.lock"
- contrib/cleanup.sh
- contrib/packager.io/before.sh
after:
- contrib/packager.io/after.sh
env:

View file

@ -1,22 +1,28 @@
# this is a database config sample for zammad ready to use with a postgresql db
# copy or symlink this file to zammads config/database.yml directory to use it
default: &default
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 50
timeout: 5000
encoding: utf8
# postgresql -----------------------------------------------------------------
##### postgresql config #####
adapter: postgresql
# username: <username>
# password: <password>
# mysql ----------------------------------------------------------------------
username: zammad
password:
#### mysql config #####
# adapter: mysql2
# host: localhost
# username: <username>
# password: <password>
# username: zammad
# password: <Password>
production:
<<: *default
database: zammad_prod
database: zammad_production
development:
<<: *default

View file

@ -0,0 +1,13 @@
#!/bin/bash
#
# packager.io before script
#
# print environemnt
uname -a
ruby -v
env
cat Gemfile.lock
# cleanup
script/build/cleanup.sh

View file

@ -180,7 +180,7 @@ function update_database_yml () {
sed -e "s/.*adapter:.*/ adapter: ${ADAPTER}/" \
-e "s/.*username:.*/ username: ${DB_USER}/" \
-e "s/.*password:.*/ password: ${DB_PASS}/" \
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/contrib/packager.io/database.yml.pkgr > ${ZAMMAD_DIR}/config/database.yml
}
function initialise_database () {

View file

@ -8,7 +8,7 @@ if [ "$CI_BUILD_REF_NAME" != "$CI_BUILD_TAG" ]; then
fi
# cleanup
contrib/cleanup.sh
cleanup.sh
( find . -type d -name ".git" \
&& find . -name ".gitignore" \