-
Notifications
You must be signed in to change notification settings - Fork 13
/
Jenkinsfile-sanquest
38 lines (37 loc) · 940 Bytes
/
Jenkinsfile-sanquest
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
pipeline {
agent {
label 'docker'
}
options { skipDefaultCheckout() }
environment {
DOCKER_LOGINS = credentials('docker-login')
}
stages {
stage('Checkout') {
steps {
deleteDir()
git 'https://github.com/lokeshkamalay/tomcat_maven_app'
}
}
stage('Build') {
agent {
docker {
image 'maven'
label 'docker'
}
}
steps {
sh "mvn --version"
}
}
stage('Build Docker image') {
steps {
sh """
docker login -u $DOCKER_LOGINS_USR -p $DOCKER_LOGINS_PSW
docker build -t lokeshkamalay/sanquest:v1 -f Dockerfile1 .
docker push lokeshkamalay/sanquest:v1
"""
}
}
}
}