We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f79aba8 commit 705ebc8Copy full SHA for 705ebc8
1 file changed
jenkinsfile.declarative
@@ -0,0 +1,33 @@
1
+pipeline{
2
+ agent {label 'java'}
3
+ environment{
4
+ PATH= "/opt/apache-maven-3.9.9/bin/:$PATH"
5
+ }
6
+
7
+ stages{
8
+ stage('checkout'){
9
+ steps{
10
+ git branch: 'main', url: 'https://github.com/BinduPrivate/java-example.git'
11
12
13
14
+ stage(‘Test’){
15
16
+ echo ‘running unit and integration test’
17
18
19
20
+ stage('Build'){
21
22
+ sh 'mvn clean package'
23
24
25
+ stage('Deploy'){
26
27
+ sh 'sudo rsync -av /home/ubuntu/jenkins/workspace/artifact-deployment/target/works-with-heroku-1.0.war /opt/apache-tomcat-9.0.96/webapps'
28
+ echo 'deployed successfully'
29
30
31
32
+}
33
0 commit comments