Skip to content

Commit 0e145ee

Browse files
committed
Add Test stage
1 parent 8c2f485 commit 0e145ee

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Jenkinsfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
node {
2-
stage('Build') {
3-
docker.image('node:16-buster-slim').withRun('-p 3000:3000') {
4-
sh 'npm install'
1+
pipeline {
2+
agent {
3+
docker {
4+
image 'node:16-buster-slim'
5+
args '-p 3000:3000'
56
}
67
}
7-
stage('Test') {
8-
docker.image('node:16-buster-slim').inside('-p 3000:3000') {
9-
sh './jenkins/scripts/test.sh'
8+
stages {
9+
stage('Build') {
10+
steps {
11+
sh 'npm install'
12+
}
13+
}
14+
stage('Test') {
15+
steps {
16+
sh './jenkins/scripts/test.sh'
17+
}
1018
}
1119
}
12-
}
20+
}

0 commit comments

Comments
 (0)