This commit is contained in:
Pavel Kachalouski
2023-01-22 14:00:23 +01:00
parent 4aef88b8d7
commit 77833e1619

18
Jenkinsfile vendored
View File

@@ -1,7 +1,13 @@
import groovy.sql.Sql
node{
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()
pipeline {
agent any
options {
skipStagesAfterUnstable()
}
stages {
stage('Build') {
steps {
getDatabaseConnection 123
}
}
}
}