forked from reverentgeek/node-weight-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile2
More file actions
48 lines (46 loc) · 1.68 KB
/
Copy pathJenkinsfile2
File metadata and controls
48 lines (46 loc) · 1.68 KB
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
pipeline {
agent {label 'appslave'}
stages{
stage('App configuration') {
steps {
script {
def userInput = input(
id: 'userInput', message: 'Enter Application details:',
parameters: [
string(defaultValue: 'None', description: 'Okta domain', name: 'domain'),
string(defaultValue: 'None', description: 'Okta client ID', name: 'clientid'),
string(defaultValue: 'None', description: 'Okta client secret', name: 'secret'),
string(defaultValue: 'None', description: 'postgres password', name: 'password'),
string(defaultValue: 'None', description: 'DB Server name in Azure', name: 'servername'),
])
// Save variables
domain = userInput.domain?:''
clientid = userInput.clientid?:''
secret = userInput.secret?:''
password = userInput.password?:''
servername = userInput.servername?:''
//echo to console
echo ("Your Okta domain: ${domain}")
echo ("Your Okta client ID: ${clientid}")
echo ("Your Okta client secret: ${secret}")
echo ("postgres password: ${password}")
echo ("Your DB Server name in Azure: ${servername}")
// export variables so bash automation script will be able to use them
sh 'export domain clientid secret password servername'
}
}
}
stage('Change permissions to Autoscript') {
steps {
sh 'echo chmod u+x ./AutoWeightTracker/WTAPPLJenkins.sh'
sh 'echo $domain'
}
}
stage('Run Automation script') {
steps {
sh 'echo ./AutoWeightTracker/WTAPPLJenkins.sh'
sh 'echo $domain'
}
}
}
}