This commit is contained in:
Pavel Kachalouski
2023-01-22 13:42:18 +01:00
parent 39e0952107
commit dbdc838492

7
Jenkinsfile vendored
View File

@@ -6,9 +6,12 @@ pipeline {
stages {
stage('Build') {
steps {
sql 'select * from test;'
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()
}
}
}
}