forked from jenkins-docs/simple-node-js-react-npm-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
36 lines (33 loc) · 941 Bytes
/
Jenkinsfile
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
pipeline {
agent {
docker {
image 'node:20.10.0-alpine3.18'
args '-p 3000:3000'
}
}
stages {
stage('Build') {
steps {
sh 'npm install'
}
}
stage('Dastardly Scanning') {
steps {
sh 'docker run -it -p 4000:4000 -v $(pwd):/app dastardly/dastardly dastardly scan --url http://localhost:3000'
}
}
stage('Test') {
steps {
input message: 'Finished using dastardly scanning? (Click "Proceed" to continue)'
sh './jenkins/scripts/test.sh'
}
}
stage('Deliver') {
steps {
input message: 'Finished using the web site? (Click "Proceed" to continue)'
sh './jenkins/scripts/deliver.sh'
sh './jenkins/scripts/kill.sh'
}
}
}
}