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

12
Jenkinsfile vendored
View File

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