-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
28 lines (28 loc) · 774 Bytes
/
Jenkinsfile
File metadata and controls
28 lines (28 loc) · 774 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
pipeline {
agent any
tools { nodejs "NodeJs" }
stages {
stage('Install & Build') {
steps {
sh 'npm install'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Create Image') {
steps {
sh 'docker build -t jojozhuang/file-server-angular .'
sh 'docker push jojozhuang/file-server-angular'
}
}
stage('Deploy') {
steps {
sh 'docker rm $(docker stop $(docker ps -a -q --filter="name=file-server-angular"))'
sh 'docker run --name file-server-angular -p 12021:80 -d jojozhuang/file-server-angular'
}
}
}
}