Files
jenkins-test-repo/Jenkinsfile
Pavel Kachalouski dbdc838492 SQL
2023-01-22 13:42:18 +01:00

18 lines
491 B
Groovy

pipeline {
agent any
options {
skipStagesAfterUnstable()
}
stages {
stage('Build') {
steps {
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()
}
}
}
}