SQL
This commit is contained in:
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -1,7 +1,13 @@
|
|||||||
import groovy.sql.Sql
|
pipeline {
|
||||||
node{
|
agent any
|
||||||
Class.forName("com.mysql.jdbc.Driver")
|
options {
|
||||||
def sql = Sql.newInstance("jdbc:mysql://mysql:3306/test_db", "user","passwd", "com.mysql.jdbc.Driver")
|
skipStagesAfterUnstable()
|
||||||
def rows = sql.execute "select count(*) from test_table;"
|
}
|
||||||
echo rows.dump()
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
getDatabaseConnection 123
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user