-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
41 lines (36 loc) · 986 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
37
38
39
40
41
pipeline {
agent any
tools {nodejs "Node"}
stages {
stage('Checkout') {
steps {
// Clone the Git repository
git 'https://github.com/namwebdev/dribbble-api.git'
}
}
stage('Install Dependencies') {
steps {
// Install app dependencies
sh 'npm install'
}
}
stage('Run Tests') {
steps {
// Run your test suite
sh 'npm run test'
}
}
stage('Build Docker Image') {
steps {
// Build Docker image using the Dockerfile in your app directory
sh 'docker build -t dribbble-api'
}
}
stage('Run app') {
steps {
// Tag the Docker image with a unique identifier (optional)
sh 'docker-compose up -d'
}
}
}
}