-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
43 lines (39 loc) · 977 Bytes
/
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
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env groovy
// Liquibase declarative pipeline
//
//
pipeline {
agent any
environment {
PATH="/usr/local/bin:$PATH"
ENVIRONMENT_STEP="${params.'Pipeline Step'}"
}
stages {
stage ('Precheck docker version') {
steps {
sh '''
docker --version
'''
} // steps
} // stage 'precheck'
stage ('running liquibase with docker') {
steps {
// checkout Liquibase project from CLO repo
sh '''
# setting Environment Variables
. ~/env_var/exp_lb_env_vars_h2.sh &>/dev/null
# running an update
docker run \
--env LIQUIBASE_COMMAND_USERNAME \
--env LIQUIBASE_COMMAND_PASSWORD \
--env LIQUIBASE_COMMAND_URL \
--env LIQUIBASE_PRO_LICENSE_KEY \
--env LIQUIBASE_COMMAND_CHANGELOG_FILE \
--rm \
-v "${cwd}"/changelogs:/liquibase/changelog:z \
liquibase/liquibase:latest --log-level=info update
'''
} // steps for checkout stages
} // stage 'checkout'
} // stages
} // pipeline