-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
45 lines (45 loc) · 1.37 KB
/
Jenkinsfile
File metadata and controls
45 lines (45 loc) · 1.37 KB
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
44
45
pipeline {
options {
timeout(time: 1, unit: 'HOURS')
}
agent {
docker {
image 'hashmapinc/sqitch:jenkins'
args "-u root -v /var/run/docker.sock:/var/run/docker.sock --entrypoint=''"
}
}
stages {
stage('Moving .snowsql to workspace and replacing snowsql in /bin') {
steps {
sh '''
rm /bin/snowsql
mv /var/snowsql /bin/
mv /var/.snowsql ./
'''
}
}
stage('Deploy changes') {
steps {
withCredentials(bindings: [usernamePassword(credentialsId: 'snowflake_creds', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh '''
sqitch deploy "db:snowflake://$USERNAME:$PASSWORD@@moffitt.us-east-1.privatelink.snowflakecomputing.com/mcap_dev?Driver=SnowflakeDSIIDriver;warehouse=ETL_DEV"
'''
}
}
}
stage('Verify changes') {
steps {
withCredentials(bindings: [usernamePassword(credentialsId: 'snowflake_creds', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh '''
sqitch verify "db:snowflake://$USERNAME:$PASSWORD@@moffitt.us-east-1.privatelink.snowflakecomputing.com/mcap_dev?Driver=SnowflakeDSIIDriver;warehouse=ETL_DEV"
'''
}
}
}
}
post {
always {
sh 'chmod -R 777 .'
}
}
}