Skip to content

Commit

Permalink
update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fallen committed Apr 12, 2020
1 parent 95ec00c commit ddc5157
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ password = pytition
default-character-set = utf8
ENDOFFILE
echo "Updating settings to use your my.cnf"
echo "Generating a basic config file"
echo "SECRET_KEY = '$(python3 -c "from django.core.management.utils import get_random_secret_key as g; print(g())")'" > pytition/pytition/settings/config.py
cat <<EOT >> pytition/pytition/settings/config.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': '$PWD/my.cnf',
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
},
}
}
EOT
sed -i -e "s@/home/petition/www/@$PWD/@" pytition/pytition/settings/base.py
export DJANGO_SETTINGS_MODULE=pytition.settings.config
echo "Running database migrations"
Expand Down

0 comments on commit ddc5157

Please sign in to comment.