From a710a025c93a7e89cec299c4f5a00c80fad23d97 Mon Sep 17 00:00:00 2001
From: Pavel Kachalouski
Date: Sun, 22 Jan 2023 13:45:49 +0100
Subject: [PATCH] SQL
---
Jenkinsfile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 1f5f36c..8b50deb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -6,11 +6,13 @@ pipeline {
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()
+ node {
+ 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()
+ }
}
}
}