-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
22 lines (22 loc) · 828 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
node {
stage('Validate') {
checkout([$class: 'GitSCM', branches: [[name: '**']], extensions: [], userRemoteConfigs: [[url: 'http://gitlab.local:90XX/sketch/lbpostgresshared.git']]])
sh '''liquibase tag $BUILD_NUMBER
liquibase status --verbose'''
}
stage('Update') {
sh '''liquibase updateSQL
liquibase update'''
}
stage('Rollback') {
sh '''liquibase rollbackSQL $BUILD_NUMBER
liquibase rollback $BUILD_NUMBER'''
}
stage('Finalize') {
sh '''liquibase update'''
}
stage('Snapshot') {
sh '''liquibase --outputFile=snapshot_$BUILD_NUMBER.json snapshot --snapshotFormat=json
mv snapshot_$BUILD_NUMBER.json /usr/share/jenkins/ref/snapshots/snapshot_$BUILD_NUMBER.json'''
}
}