-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest
72 lines (61 loc) · 2.47 KB
/
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pipeline {
agent any
stages {
stage('User Input') {
steps {
script {
// Prompt the user for the CSV file name and store it in a variable
def csvFileName = input(message: 'Enter the CSV file name:', parameters: [string(defaultValue: '', description: 'CSV file name', name: 'CSVFileName')])
// Pass the CSV file name as an argument to the Java program
bat "javac -cp lib/json-simple-1.1.1.jar implement2Payload.java"
bat "java -cp .;lib/json-simple-1.1.1.jar implement2Payload ${csvFileName}"
}
}
}
}
}
C:\Docs\Git\NewRepo\ConnectionDetails.csv
#166 -- but not updating in the connections(instance)
import groovy.json.JsonSlurper
pipeline {
agent any
stages {
stage('Build') {
steps {
script {
// Input step to get CSV file name from the user
def csvFileName = input(
id: 'userInput',
message: 'Enter the CSV file name:',
parameters: [string(name: 'CSVFileName', defaultValue: '', description: 'Path to the CSV file')]
)
// Build the Java code with the required classpath
bat 'javac -cp lib/json-simple-1.1.1.jar ConUpdate.java'
// Execute the Java code with the CSV file name as an argument and the classpath
bat "java -cp .;lib/json-simple-1.1.1.jar ConUpdate ${csvFileName}"
}
}
}
}
}
pipeline {
agent any
stages {
stage('Build') {
steps {
script {
// Input step to get CSV file name from the user
def csvFileName = input(
id: 'userInput',
message: 'Enter the CSV file name:',
parameters: [string(name: 'CSVFileName', defaultValue: '', description: 'Path to the CSV file')]
)
// Build the Java code with the required classpath
bat 'javac -cp lib/json-simple-1.1.1.jar ConUpdate.java'
// Execute the Java code with the CSV file name as an argument and the classpath
bat "java -cp .;lib/json-simple-1.1.1.jar ConUpdate ${csvFileName}"
}
}
}
}
}