This commit is contained in:
Pavel Kachalouski
2023-01-22 13:49:13 +01:00
parent a710a025c9
commit 4aef88b8d7

24
Jenkinsfile vendored
View File

@@ -1,19 +1,7 @@
pipeline { import groovy.sql.Sql
agent any node{
options { Class.forName("com.mysql.jdbc.Driver")
skipStagesAfterUnstable() def sql = Sql.newInstance("jdbc:mysql://mysql:3306/test_db", "user","passwd", "com.mysql.jdbc.Driver")
} def rows = sql.execute "select count(*) from test_table;"
stages { echo rows.dump()
stage('Build') {
steps {
node {
import groovy.sql.Sql
Class.forName("com.mysql.jdbc.Driver")
def sql = Sql.newInstance("jdbc:mysql://mysql:3306/test_db", "user","passwd", "com.mysql.jdbc.Driver")
def rows = sql.execute "select count(*) from test_table;"
echo rows.dump()
}
}
}
}
} }