-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
executable file
·59 lines (53 loc) · 1.6 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
51
52
53
54
55
56
57
58
59
pipeline {
agent {
docker {
image 'node:18-alpine'
args '-u root:root'
}
}
environment {
PATH = "/bin:/usr/bin:usr/local/bin"
}
stages {
stage('Build') {
steps {
sh 'npm install'
}
}
stage('Test') {
parallel {
stage('Unit') {
steps {
sh 'NODE_ENV=STAGE npm run unit-test'
}
}
stage('Integration') {
steps {
sh 'NODE_ENV=STAGE npm run integration-test'
}
}
}
}
stage('Deploy to production') {
steps {
echo 'Deploying to production....'
}
}
stage('Build image') {
agent any
steps {
script {
dockerImage = docker.build("jonmunm/pacientes-api:latest")
}
//sh 'docker build -t jonmunm/pacientes-api:latest .'
}
}
/*stage('Push image') {
steps {
withDockerRegistry([ credentialsId: "jonmunm_id", url: "" ]) {
dockerImage.push()
}
}
}*/
}
}