forked from lerndevops/samplejavaapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfilescript
More file actions
38 lines (38 loc) · 784 Bytes
/
Copy pathJenkinsfilescript
File metadata and controls
38 lines (38 loc) · 784 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-3.9.16"
}
triggers
{
cron '* * * * *'
}
stages
{
stage('gitsource code')
{
steps
{
git credentialsId: '66fbca19-14f0-4e78-9e2c-394d17762f5f', url: 'https://github.com/MSivaP/samplejavaapp.git'
}
}
stage('Build-stage')
{
steps
{
sh "mvn clean package "
}
}
stage('Deploy-war-tomcat')
{
steps
{
sshagent(['f355d8f9-c636-42a1-af0d-2420456c052a']) {
sh "scp -o StrictHostKeyChecking=no target/sampleapp.war ec2-user@98.92.160.46:/opt/tomcat/webapps"
}
}
}
}
}