-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pipeline-with-single-node
34 lines (33 loc) · 1.19 KB
/
Pipeline-with-single-node
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
pipeline {
agent none
stages{
stage('AD Group Creation') {
agent {label "Linux-node"}
steps {
sh '''
adcli create-group --description=<your-choice> --domain=example.com --domain-ou="OU=example,DC=com" $Group_name --login-user=test-user --stdin-password < /root/password.txt
'''
}
}
stage('Project Creation') {
agent {label "Linux-node"}
steps {
dir('/root/') {
sh '''
. ./auth.sh
openstack project create --domain test-domain $Project_name --property cost_center=$Cost_center
openstack role add --group $Group_name --group-domain test-domain --project-domain Test-domain --project $Project_name _member_
'''
}
}
}
stage('Adding User to Group') {
agent {label "Linux-node"}
steps {
dir('/root/') {
sh "adcli add-member --domain=example.com $Group_name $User_name --login-user=test-user --stdin-password < /root/password.txt"
}
}
}
}
}