-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (32 loc) · 885 Bytes
/
Jenkinsfile
File metadata and controls
33 lines (32 loc) · 885 Bytes
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
pipeline {
agent any
stages{
stage ('serviceinstall'){
steps{
sh "docker stop master"
sh "docker rm master"
sh "rm -rf *"
sh " yum install git -y"
sh "yum install docker -y"
sh "systemctl start docker"
}
}
stage ('createconatainer'){
steps{
sh "docker run -itd -p 80:80 --name master httpd"
}
}
stage('deploy') {
agent{
label{
label 'built-in'
customWorkspace "/mnt/psd"
}
}
steps{
sh "chmod -R 777 /mnt/psd/index.html "
sh "docker cp /mnt/psd/index.html master:/usr/local/apache2/htdocs"
}
}
}
}