-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
35 lines (30 loc) · 1.01 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
node {
stage('Initialize') {
def jdk = tool name: 'openjdk-13'
env.JAVA_HOME = "${jdk}"
def dockerHome = tool 'Docker'
def mavenHome = tool 'Maven'
env.PATH = "${dockerHome}/bin:${mavenHome}/bin:${env.PATH}"
}
stage('Project Checkout') {
echo 'Doing Project Checkout..'
checkout([$class : 'GitSCM',
branches : [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions : [],
submoduleCfg : [],
userRemoteConfigs : [[url: 'https://github.com/Nahuel92/to-doList']]
])
}
stage('Project Build') {
echo 'Building..'
sh 'mvn clean package'
}
stage('Docker Image Build') {
docker.build('todo-list')
}
stage('Deploy') {
echo 'Deploying to Docker...'
sh 'docker-compose up'
}
}