From d8e315483d77a7bbdcb416ad00c47c6658777540 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 17 Jan 2020 15:59:10 +0000 Subject: [PATCH 1/2] java,xml added --- hello.java | 16 ++++++++++++++++ pom.xml | 28 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 hello.java create mode 100644 pom.xml diff --git a/hello.java b/hello.java new file mode 100644 index 0000000..61007ec --- /dev/null +++ b/hello.java @@ -0,0 +1,16 @@ + package com.mkyong.common; + + /** + * * Spring bean + * * + * */ + public class hello { + private String name; + + public void setName(String name) { + this.name = name; + } + + public void printHello() { + System.out.println("Hello ! " + name); + } diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a3b7c39 --- /dev/null +++ b/pom.xml @@ -0,0 +1,28 @@ + + 4.0.0 + com.mkyong.common + SpringExamples + jar + 1.0-SNAPSHOT + SpringExamples + http://maven.apache.org + + + + + + + org.springframework + + spring + + 2.5.6 + + + + + + From c5c51afcfc22085939177aa1bbe7caf6f6765fbf Mon Sep 17 00:00:00 2001 From: Cloud User Date: Fri, 17 Jan 2020 18:17:03 +0000 Subject: [PATCH 2/2] sh added --- deploy.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..56d5097 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +cd /var/lib/jenkins + +ls -a | grep -w .git + +if [ $? -ne 0 ];then +git init +fi + +touch .gitignore +echo workspace >> .gitignore +git add * +git commit -m "Jenkins_Backup on `date`" +git push https://github.com/kiransurya035/Test-1.git master + +if [ $? -eq 0 ];then + + x=`echo -e "hi, Jenkins Backup \n thank you"` + echo $x | mail -s "Jenkins backup success on `date`" kirankrishnaiah705@gmail.com +else + echo $x | mail -s "Jenkins backup failed on `date`" kirankrishnaiah705@gmail.com + +fi