-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
50 lines (50 loc) · 1.21 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* Requires the Docker Pipeline plugin */
pipeline {
agent {
label 'docker'
}
stages {
stage('Building our image') {
steps {
sh 'docker build -t antonio94c/view -f Dockerfile.dev .'
}
}
stage('Run our Test') {
steps{
sh 'docker run antonio94c/view npm test -- --watchAll=false'
}
}
stage('Go Up') {
steps{
sh 'docker-compose up -d'
}
}
/*
stage('Building our image') {
steps {
script {
dockerImage = docker.build "antonio94c/view:$BUILD_NUMBER"
}
}
}
stage('Run our image') {
steps{
script {
dockerImage.withRun(''){
sh 'npm run test -- --coverage'
}
}
}
}
/*
stage('Deploy image'){
steps{
script {
docker.withRegistry('', 'dockerhub'){
dockerImage.push()
}
}
}
}*/
}
}