-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJenkinsfile
More file actions
executable file
·39 lines (38 loc) · 931 Bytes
/
Jenkinsfile
File metadata and controls
executable file
·39 lines (38 loc) · 931 Bytes
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 any
tools{
maven 'maven'
}
stages {
stage('checkout ') {
steps {
git branch: 'master', url: 'https://github.com/alluredduhcl/java-web-app-docker.git'
}
}
stage ('build the code'){
steps {
sh "mvn clean package"
}
}
stage ('build the docker image'){
steps {
sh "docker build -t allureddy/new ."
}
}
stage ('push the docker image'){
steps {
sh "docker login -u allureddy -p ....."
sh "docker push allureddy/new"
}
}
stage ('deply to the K8S'){
steps {
kubernetesDeploy(
configs: 'deployment.yml',
kubeconfigId: 'kubernetes',
enableConfigSubstitution: true
)
}
}
}
}