Run staging migrations after deploy
This commit is contained in:
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@@ -152,6 +152,19 @@ PY
|
|||||||
parameters: [string(name: 'PROJECT_NAME', value: 'mandelstudio')]
|
parameters: [string(name: 'PROJECT_NAME', value: 'mandelstudio')]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Migrate Staging Database') {
|
||||||
|
agent { label 'built-in' }
|
||||||
|
options {
|
||||||
|
timeout(time: 10, unit: 'MINUTES')
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
set -e
|
||||||
|
REMOTE_CMD="cd '${STAGING_AUDIT_PROJECT_DIR}' && '${STAGING_AUDIT_MANAGE}' migrate --no-input --skip-checks"
|
||||||
|
sudo -n -u mandel -g www-data /srv/apps/mandel-dashboard/.venv/bin/python /srv/apps/mandel-dashboard/bin/deploy_stg_from_jenkins.py "${STAGING_AUDIT_PROJECT_NAME}" --command "$REMOTE_CMD"
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Normalize Services Menu') {
|
stage('Normalize Services Menu') {
|
||||||
agent { label 'built-in' }
|
agent { label 'built-in' }
|
||||||
options {
|
options {
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ _ensure_required_app(
|
|||||||
"ocyan.plugin.coyote.coyote",
|
"ocyan.plugin.coyote.coyote",
|
||||||
"ocyan.plugin.coyote",
|
"ocyan.plugin.coyote",
|
||||||
)
|
)
|
||||||
|
_ensure_required_app(
|
||||||
|
"ocyan.plugin.wordspinner",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _ensure_installed_app(app_label: str, *, before: str | None = None) -> None:
|
def _ensure_installed_app(app_label: str, *, before: str | None = None) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user