-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
32 lines (28 loc) · 1.32 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env groovy
/*
This script runs both the sandbox and stage migrations from production
*/
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
args '-e PROD_DB_CONN_STRING=$PROD_DB_CONN_STRING -e SANDBOX_DB_USER=$SANDBOX_DB_USER -e SANDBOX_DB_PASSWORD=$SANDBOX_DB_PASSWORD -e SANDBOX_ADMIN_DB_CONN_STRING=$SANDBOX_ADMIN_DB_CONN_STRING -e SANDBOX_TARGET_DB=$SANDBOX_TARGET_DB -e SANDBOX_TARGET_DB_CONN_STRING=$SANDBOX_TARGET_DB_CONN_STRING -e STG_ADMIN_DB_CONN_STRING=$STG_ADMIN_DB_CONN_STRING -e STG_TARGET_DB=$STG_TARGET_DB -e STG_TARGET_DB_CONN_STRING=$STG_TARGET_DB_CONN_STRING -e STG_DB_USER=$STG_DB_USER -e STG_DB_PASSWORD=$STG_DB_PASSWORD -e SANDBOX_DEV_USER=$SANDBOX_DEV_USER -e SANDBOX_DEV_PASSWORD=$SANDBOX_DEV_PASSWORD -e TEST_APP_USER_EMAIL=$TEST_APP_USER_EMAIL -e TEST_APP_USER_PASSWORD=$TEST_APP_USER_PASSWORD'
}
}
stages {
stage('Migrate Prod to Sandbox') {
steps {
echo 'Migrating Prod to Sandbox...'
sh 'chmod +x *'
sh './sandbox_migration_runner.sh'
}
}
stage('Migrate Prod to Stage') {
steps {
echo 'Migrating Prod to Stage...'
sh 'chmod +x *'
sh './stage_migration_runner.sh'
}
}
}
}