From 48e5ca7cd4c7691870ef21b3169e9e23e6dde855 Mon Sep 17 00:00:00 2001 From: student Date: Sat, 20 Aug 2022 11:57:06 +0000 Subject: [PATCH 01/10] helloworld --- HelloWorld.class | Bin 0 -> 426 bytes HelloWorld.java | 5 + history.txt | 170 ------------------ index.html | 1 - pom.xml | 75 -------- src/main/java/com/mycompany/app/App.java | 13 -- src/test/java/com/mycompany/app/AppTest.java | 20 --- target/classes/com/mycompany/app/App.class | Bin 549 -> 0 bytes target/maven-archiver/pom.properties | 4 - .../compile/default-compile/createdFiles.lst | 1 - .../compile/default-compile/inputFiles.lst | 1 - .../default-testCompile/createdFiles.lst | 1 - .../default-testCompile/inputFiles.lst | 1 - target/my-app-1.0-SNAPSHOT.jar | Bin 2749 -> 0 bytes .../TEST-com.mycompany.app.AppTest.xml | 60 ------- .../com.mycompany.app.AppTest.txt | 4 - .../com/mycompany/app/AppTest.class | Bin 481 -> 0 bytes 17 files changed, 5 insertions(+), 351 deletions(-) create mode 100644 HelloWorld.class create mode 100644 HelloWorld.java delete mode 100644 history.txt delete mode 100644 index.html delete mode 100644 pom.xml delete mode 100644 src/main/java/com/mycompany/app/App.java delete mode 100644 src/test/java/com/mycompany/app/AppTest.java delete mode 100644 target/classes/com/mycompany/app/App.class delete mode 100644 target/maven-archiver/pom.properties delete mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst delete mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst delete mode 100644 target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst delete mode 100644 target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst delete mode 100644 target/my-app-1.0-SNAPSHOT.jar delete mode 100644 target/surefire-reports/TEST-com.mycompany.app.AppTest.xml delete mode 100644 target/surefire-reports/com.mycompany.app.AppTest.txt delete mode 100644 target/test-classes/com/mycompany/app/AppTest.class diff --git a/HelloWorld.class b/HelloWorld.class new file mode 100644 index 0000000000000000000000000000000000000000..57d2ca557ddd6b3a123119cbd11576b4dd5ebf2a GIT binary patch literal 426 zcmZvYO-sW-5Qg7P(tH_BZB6|w=s}1g=IEi~MGy}~g@_(JCGAqSY!Zoy;Lp;7f(L(q zKT4d9hfr`2GqW?#%)YbVKc8O!PB3&~!gtWcs*RqDKGrM*76uIFsmMij#-N7>cMQgP zG35;YSmgYw&Qf09CaI*1ktHH$7=#bwdGee@GRbFAT$Li9jZ~u>7j-$|7ec}QC6}_e zFG@K*RS!PwHd%*mL-LG#=kNpUl>(AX l)@+grS%OEgLid|izO?P%M@!^`2~vRS6%=B literal 0 HcmV?d00001 diff --git a/HelloWorld.java b/HelloWorld.java new file mode 100644 index 0000000..4d8e373 --- /dev/null +++ b/HelloWorld.java @@ -0,0 +1,5 @@ +public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World"); + } +} diff --git a/history.txt b/history.txt deleted file mode 100644 index 850e06e..0000000 --- a/history.txt +++ /dev/null @@ -1,170 +0,0 @@ - 1 clear - 2 pwd - 3 apt udate - 4 apt update - 5 sudo apt update - 6 cat /etc/os-release - 7 ping fb.com - 8 mkdir demom - 9 mkdir demo - 10 cd demo - 11 git - 12 git -version - 13 git --version - 14 ls -a - 15 ll -a - 16 git init - 17 ll -a - 18 git status - 19 vim index.html - 20 git status - 21 git add . - 22 git status - 23 git commit -am"first file" - 24 git status - 25 git log - 26 vim index.html - 27 cat index.html - 28 git status - 29 git add . - 30 git status - 31 git commit -am"first file 1" - 32 git log - 33 cd .. - 34 ssh-keygen - 35 cd ~/.ssh/ - 36 ll - 37 cat id_rsa.pub - 38 cd - - 39 git clone git@github.com:manikcloud/Jenkins-cicd.git - 40 cat ~/.ssh/id_rsa.pub - 41 git clone git@github.com:manikcloud/Jenkins-cicd.git - 42 history - 43 history | cut -c 8- - 44 cd Jenkins-cicd/ - 45 vim README.md - 46 nano README.md - 47 git status - 48 git add . && git commit -am"adding readme" && git push - 49 nano README.md - 50 git add . && git commit -am"adding readme" && git push - 51 ll ~/.ssh/ - 52 cat ~/.ssh/id_rsa.pub - 53 ssh-keygen - 54 ll ~/.ssh/ - 55 ll - 56 rm varun * - 57 rm varun* - 58 ll - 59 git pull - 60 git status - 61 git rm . - 62 git status - 63 git rm README.md - 64 git status - 65 git rm pom.xml - 66 ll - 67 git status - 68 git restore --staged pom.xml - 69 ll - 70 cd .. - 71 rm -rf Jenkins-cicd/ - 72 git clone git@github.com:manikcloud/Jenkins-cicd.git - 73 cd Jenkins-cicd/ - 74 ll - 75 vi index.html - 76 git staus - 77 git status - 78 git add . - 79 git status - 80 git commit -am"adding index.html" - 81 git push - 82 vi README.md - 83 git pull - 84 vi README.md - 85 sudo apt install openjdk-8-jdk - 86 sudo wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - 87 sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' - 88 sudo apt-get update - 89 sudo apt install jenkins - 90 sudo /etc/init.d/jenkins start - 91 service jenkins stgatus - 92 service jenkins status - 93 cat /var/lib/jenkins/secrets/initialAdminPassword - 94 sudo cat /var/lib/jenkins/secrets/initialAdminPassword - 95 history | cut -c 8- - 96 cd Jenkins-cicd/ - 97 vi README.md - 98 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 99 vi README.md - 100 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 101 git pull - 102 vi README.md - 103 ll -a - 104 rm .README.md.swp - 105 ll -a - 106 vim README.md - 107 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 108 vim README.md - 109 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 110 sudo cat /var/lib/jenkins/secrets/initialAdminPassword - 111 echo "varun" - 112 vim README.md - 113 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 114 git config --global --edit - 115 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 116 git push - 117 git pull - 118 vim README.md - 119 git add . && git commit -am"adding jenkins installtion step in readme" && git push - 120 git pull - 121 vim README.md - 122 mvn --version - 123 sudo apt install maven - 124 apt install tree - 125 sudo apt install tree - 126 which mvn - 127 mvn --version - 128 cd .. - 129 mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false - 130 ll - 131 rm -rf my-app/ - 132 ll - 133 mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false - 134 ll - 135 cd my-app/ - 136 ll - 137 tree - 138 mvn ppackage - 139 mvn package - 140 ll - 141 tree - 142 ll - 143 ll target/ - 144 java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App - 145 vim src/main/java/com/mycompany/app/App.java - 146 java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App - 147 mvn clean install - 148 java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App - 149 cd .. - 150 ll - 151 rm -rf Jenkins-cicd/ - 152 git clone git@github.com:manikcloud/Jenkins-cicd.git - 153 cd Jenkins-cicd/ - 154 ll - 155 whereis mvn - 156 cd .. - 157 wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz - 158 ll - 159 tar -xvzf apache-maven-3.8.6-bin.tar.gz - 160 ll - 161 cd apache-maven-3.8.6/ - 162 ll - 163 pwd - 164 whereis java - 165 whereis git - 166 which git - 167 which mvn - 168 pwd - 169 ll - 170 history > ../Jenkins-cicd/history.txt diff --git a/index.html b/index.html deleted file mode 100644 index b14df64..0000000 --- a/index.html +++ /dev/null @@ -1 +0,0 @@ -Hi diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 8671f90..0000000 --- a/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - 4.0.0 - - com.mycompany.app - my-app - 1.0-SNAPSHOT - - my-app - - http://www.example.com - - - UTF-8 - 1.7 - 1.7 - - - - - junit - junit - 4.11 - test - - - - - - - - - maven-clean-plugin - 3.1.0 - - - - maven-resources-plugin - 3.0.2 - - - maven-compiler-plugin - 3.8.0 - - - maven-surefire-plugin - 2.22.1 - - - maven-jar-plugin - 3.0.2 - - - maven-install-plugin - 2.5.2 - - - maven-deploy-plugin - 2.8.2 - - - - maven-site-plugin - 3.7.1 - - - maven-project-info-reports-plugin - 3.0.0 - - - - - diff --git a/src/main/java/com/mycompany/app/App.java b/src/main/java/com/mycompany/app/App.java deleted file mode 100644 index 77cf3e0..0000000 --- a/src/main/java/com/mycompany/app/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mycompany.app; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/src/test/java/com/mycompany/app/AppTest.java b/src/test/java/com/mycompany/app/AppTest.java deleted file mode 100644 index 81ac345..0000000 --- a/src/test/java/com/mycompany/app/AppTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.mycompany.app; - -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -/** - * Unit test for simple App. - */ -public class AppTest -{ - /** - * Rigorous Test :-) - */ - @Test - public void shouldAnswerWithTrue() - { - assertTrue( true ); - } -} diff --git a/target/classes/com/mycompany/app/App.class b/target/classes/com/mycompany/app/App.class deleted file mode 100644 index 5cc43ee6a3229b8408a888df0219676fe161b008..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 549 zcmZuuO;5r=5Pi#6Kdgda!EeD6dawr%9xx`x#CT}b1cL`pOWDAZw%e3q!q3u!CLa6& z{wU+Lm=F^7FthV!=FOYkpWm-<0OvS1QNor18+9EG6WiF)u&ZH@p>!!jnOrgC+b2DS z!i^dThO#R|aX$_EB7Wk1pOC7nJnr{+EYtWOEF>d2VQ9FX3Y=g@HsayT;ZfvVM^T69 z0xm;_di%v4^H=WpJRCaRB$nZ@la1r?kO*ok(hO!-O=C~o%5=U?gl8#-1r54}eG3OT zWU%gp@2lpsiv2-L!;yt1S`79|MGTdNjEDYMc*zpfolO!E&|9b}CG5Foshmd=oRDn6 z16rz*`(P_14uocjo-&AcHH$51tljojs#@v2@jzAdOS!^&dVh()04w@$_Zvwh&WM zOJAb(Lv7m9XPOePXCAz={6*E$l;$tdFC>ph&zAUD^s$JMA;6oR1KIWfu)7#I7{KlV zIt30mfh@SY5Xue$oex(7WUv5na(=EpZWVk`6}go_bp?rem3Y(&VW>?kC_qvV3Ot|^ zIN%4e;Ev2qEKAM9qgWABG0;VNaChn9w@ZT z(z^Qgm!N#lBIj9Le|2Itc6?y|qft0XtZRbKGlTTBb8}Aq{rUG7TS1qzuxO6NhKpA& z8g1;<<-ILcCZQ#6H07kK^Tz5c=^C-C7bdLOWh7F5IYHr(yWNM*mAg+puA6_{=&X2( zX5~cTwrQ_d9^gz9QIo$!Dlz>M&+=le&hyfG-YBE`#QQ@-jcHK^o35Af{B>J*R~}!~Y_!+u zm*{~@${JErEL(au)coQ6Hf^eJ*VLXX8=NlAG8b4UBo*OYYFIO^Q}BDA)7~GAmx2zc zu=Kt**(PEbaM((5Z^pHoKbS!YA2}W%=@k@1bAT~))@q{pQ()}GaxpOIlMv4Z!1Pm* zn{zZQ+W)qJNZtGOA9l6pUP{`YD$LQkz_!7xlTYQwk?5yZ%QFvbRKET4>HYI%b0#=# zXKmXuUCZvd_4W5MyFb2M_8^1R>v_-|p5qlJE($YziYLzHslPMF-Tm<86oU?L)%OjO zDG#0I^GrWB<#>xo2`kg(Nt;v?RvHzRTB^?faAN1j6OVh(MSrQ7N<(~!DcCpM>$w&|8o?~sZzGz;OuJ+LfI%k|7xhtyGAGwm3 z#TB!2l-RCF3Qz?v7suw^UfQC zmse$9F(pm+;g8z7*jTQ-gD2{2PFyErZtv^&R+5`$`#!%j?LqYIfJ3Ww#Dldm*jPCx z|0sMg>F(l?b*!tt?utx!tJb_OW!@sMXtxVjO8J&ja2&CCbOcmH|xW7^*TS1SI`DZ01+!};}+cjGc+@_w`1zmmSQ zc1iuSxSxDQcK@Gp6@B|V)2`;MB=`G`sWpmk_e~F)nVwrczcl;Y*=DbKd%XUsa=#Dz zEw3o~hY6H}kn;&52Z2iE{b$%7!~%0p0uY;#n1c$6@(WUnN-|T6gUcY*S)j+NkOCbK zpK~6eAAEJZ&juS@Grny6Knq$GnqD!!!27M3hvVA^{)b-rr}T9{_-yn&cmC?>wJeiZ zJ1eJFb+WR?bh@g}%TvRoSL_51aNURO%m8mjCJ|;4oV7C07htfY5k$eO8KgQI zVgj(tz)^of^b0V&b)1200(hNuBzW{Gmpk4+BZXgr}I&lg+hz9_(ZLDSh diff --git a/target/surefire-reports/TEST-com.mycompany.app.AppTest.xml b/target/surefire-reports/TEST-com.mycompany.app.AppTest.xml deleted file mode 100644 index 4b9c2b4..0000000 --- a/target/surefire-reports/TEST-com.mycompany.app.AppTest.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/target/surefire-reports/com.mycompany.app.AppTest.txt b/target/surefire-reports/com.mycompany.app.AppTest.txt deleted file mode 100644 index be9d8d3..0000000 --- a/target/surefire-reports/com.mycompany.app.AppTest.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: com.mycompany.app.AppTest -------------------------------------------------------------------------------- -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.115 s - in com.mycompany.app.AppTest diff --git a/target/test-classes/com/mycompany/app/AppTest.class b/target/test-classes/com/mycompany/app/AppTest.class deleted file mode 100644 index 197784caacf093d7a854e6c960a248ae77a17dab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 481 zcmZ{hy-ve06orq|lt2iywB@H_Vrv=5&=G_bAu&ZDK@}u6H?>+lsE@@2V&DOI zD8x-#sS9|x&bi0;^HKc$^Z5l}guV+K2QE73I_Nn#WZ1frN}6ki#$XsR*f)AA7+RrJ z;;u|5A|LZfLY+>iW1d7jmz7>OZ8Mhz!)X}n)K8aGGp?3C&oV#Avau-4B}1>6>oS=J zs(2OolQi>jUJ|hXP%0x+5y?UlF;GeyZlqQOY==6Z`HPa0`D=>%sLMPSx3UW3t?3sF z{=z*pvE|^%!!b^X`)?NFR_FbMtC@d4S%}zBYjaaj6e6dV%j=I-OndM=jBthq{kdvc zVAXw89a28+jP~aFJJ?%oZ&R&oz{L(#Z*_pwE-A`Ru2m0@NY%sk2dvGoOE&0-s)hD1(8yz4 From 0d57587f4457d8b87aa8a22cd629f8f4fa751179 Mon Sep 17 00:00:00 2001 From: student Date: Sat, 20 Aug 2022 12:02:22 +0000 Subject: [PATCH 02/10] helloworld --- .gitignore | 33 ++++++++++++++++++++ README.md | 89 +++--------------------------------------------------- 2 files changed, 37 insertions(+), 85 deletions(-) diff --git a/.gitignore b/.gitignore index 7a3e2fd..63fb63b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ # Crash log files crash.log + + # Ignore any .tfvars files that are generated automatically for each Terraform run. Most # .tfvars files are managed as part of configuration and so should be included in # version control. @@ -27,3 +29,34 @@ override.tf.json # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan # example: *tfplan* + +# Created by https://www.toptal.com/developers/gitignore/api/java +# Edit at https://www.toptal.com/developers/gitignore?templates=java + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +# End of https://www.toptal.com/developers/gitignore/api/java diff --git a/README.md b/README.md index a6b49c4..f2c088d 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,6 @@ -# Jenkins-cicd -PG DO - CI/CD Pipeline with Jenkins Simplilearn - -# AWS Ubuntu VM Provisioning steps -- Step 1: Click on Launch Instance -- Step 2 : Click on Software Image (AMI) -- Select Ubuntu -- Step 4: Key pair name – required -- Click on Create new key pair -- Put key pair name Jenkins-sl -- & Download it -- Step 5 : Click on Launch Instance -- Step 6 : Select your VM and Click connect -- Step 7 : You can see the terminal -- Step: Showing Github example - -# Git Status -``` -git --version -``` -## cretae Dir -``` -mkdir demo -cd demo -``` -## GIT & Ubuntu SSH connection -``` -ssh-keygen - -"Hit enter button 3 time" - -cat ~/.ssh/id_rsa.pub -git clone git@github.com:manikcloud/Jenkins-cicd.git -history -history | cut -c 8- -``` - -# JENKINS INSTALLATION on UBUNTU 18.04, for Ubunt 22.04 please skip the step 3 & 4 -``` -sudo apt-get update -sudo apt install openjdk-8-jdk -sudo wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' -sudo apt-get update -sudo apt install jenkins -sudo /etc/init.d/jenkins start -service jenkins status -sudo cat /var/lib/jenkins/secrets/initialAdminPassword -history | cut -c 8- - +# Java ``` -# Jenkins URL with port 8080 -- http://x.x.x.x:8080/ - -replace x with your ip - -# Change Security group rule for Jenkins -``` -- Select your instance -- Down below select your security tab -- Click on the Security groups sg-0c51908b5fa4abf75 (launch-wizard-2) -- Click on the action -- Click on EDIT INBOUND RULE -- Select custom TCP and put port 8080 -- Custom ip should be 0.0.0.0/0 -- Click on Save the rule -``` - -# common error - -``` -getting "E: Unable to locate package openjdk-8-jdk" message on java update -``` - -# Resolution -Run this command - -``` -sudo apt update -``` -# Plugin Installation -dashboard>manage>jenkins>manage plugins>maven integration - +javac HelloWorld.java -# References: -1. https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html -2. https://maven.apache.org/download.cgi +java HelloWorld +``` \ No newline at end of file From 7dd916c4cfd2c53909d57c3d5b6fa9fac58d995e Mon Sep 17 00:00:00 2001 From: student Date: Sat, 20 Aug 2022 16:20:54 +0000 Subject: [PATCH 03/10] adding name in java file --- .project | 17 +++++++++++++++++ HelloWorld.java | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .project diff --git a/.project b/.project new file mode 100644 index 0000000..ded0d85 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + my-app + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/HelloWorld.java b/HelloWorld.java index 4d8e373..c204a95 100644 --- a/HelloWorld.java +++ b/HelloWorld.java @@ -1,5 +1,5 @@ public class HelloWorld { public static void main(String[] args) { - System.out.println("Hello, World"); + System.out.println("Hello, World From Varun Manik"); } } From 49d207c52cde3f52ecb63b30dacf40ea1c9cf043 Mon Sep 17 00:00:00 2001 From: Varun Date: Tue, 31 Jan 2023 16:27:32 +0800 Subject: [PATCH 04/10] changing branch name --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f2c088d..3c0c15f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Java + +## Build +## Simple Java command for linux terminal in Jenkins ``` javac HelloWorld.java From fb6b821f6bbc8b9f93ce1b255ca68202f1248857 Mon Sep 17 00:00:00 2001 From: Varun Date: Tue, 31 Jan 2023 16:29:38 +0800 Subject: [PATCH 05/10] changing branch name --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3c0c15f..c166deb 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ## Build ## Simple Java command for linux terminal in Jenkins + ``` javac HelloWorld.java From 162fb20db5b85e266fdfe51e0deab6b34705d9be Mon Sep 17 00:00:00 2001 From: VARUN KUMAR MANIK Date: Sun, 5 Feb 2023 11:43:42 +0530 Subject: [PATCH 06/10] Create history.txt --- history.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 history.txt diff --git a/history.txt b/history.txt new file mode 100644 index 0000000..f3ba590 --- /dev/null +++ b/history.txt @@ -0,0 +1,31 @@ +1. JENKINS installation +2. git integation with Jenkins +3. java integration with Jenkins + + + +git clone https://github.com/manikcloud/Jenkins-cicd.git +cd Jenkins-cicd/ +ll +git switch create_ec2_tf +chmod 755 jenkins-installation-ubuntu.sh +sh jenkins-installation-ubuntu.sh + +cat jenkins-installation-ubuntu.sh +sudo cat /var/lib/jenkins/secrets/initialAdminPassword + + +sudo apt install maven +mvn --version +mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false +sudo apt install tree -y + +cd my-app/ + +tree +mvn install + +tree +java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App + +history | cut -c 8- From 1fbe384656db0a005ccf275a979f440faf6cdefa Mon Sep 17 00:00:00 2001 From: Sanjeev-g-d <117637820+Sanjeev-g-d@users.noreply.github.com> Date: Sat, 18 Mar 2023 11:20:14 +0530 Subject: [PATCH 07/10] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c166deb..f1f18ea 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Java - + ## Build ## Simple Java command for linux terminal in Jenkins @@ -7,4 +7,4 @@ javac HelloWorld.java java HelloWorld -``` \ No newline at end of file +``` From 5592bf92bcdb2e9196837ff7cbb34e60b868d83f Mon Sep 17 00:00:00 2001 From: Sanjeev-g-d <117637820+Sanjeev-g-d@users.noreply.github.com> Date: Sat, 18 Mar 2023 11:22:42 +0530 Subject: [PATCH 08/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1f18ea..eb81aa1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Java - + ## Build ## Simple Java command for linux terminal in Jenkins From 91935b46ebfac768f5f377858be1aa17a1a8515b Mon Sep 17 00:00:00 2001 From: Sanjeev-g-d <117637820+Sanjeev-g-d@users.noreply.github.com> Date: Sat, 18 Mar 2023 11:23:48 +0530 Subject: [PATCH 09/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb81aa1..f1f18ea 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Java - + ## Build ## Simple Java command for linux terminal in Jenkins From 18fd84c827c1ba986e8d0b82c88cb33a335a771b Mon Sep 17 00:00:00 2001 From: Sanjeev-g-d <117637820+Sanjeev-g-d@users.noreply.github.com> Date: Sat, 18 Mar 2023 11:25:00 +0530 Subject: [PATCH 10/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1f18ea..eb81aa1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Java - + ## Build ## Simple Java command for linux terminal in Jenkins