diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..3b8be902d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + agent any + + stages { + stage('Checkout src') { + steps { + echo 'Java-Maven-war-project ' + echo "Branch_Name: ${env.GIT_BRANCH}" + //echo "${env.BRANCH_NAME}" + //echo "${env.GIT_BRANCH}"//This will give me the Branch name + git 'https://github.com/rranjith406/hello-world-war.git' + sh 'ls -lrt' + dir('dist') { + //sh 'mvn clean install -DskipTests' + echo 'cd to dist folder' + sh 'ls -lrt' + } + } + } + stage('Build Stage') { + steps { + sh 'mvn clean install' + } + } + stage('Test Stage') { + steps { + sh 'mvn clean test' + } + } + stage('Deploy Stage') { + steps { + echo 'This is Deploy stage (TBD)' + sh 'echo Build ${BUILD_NUMBER}' + deploy adapters: [tomcat9(credentialsId: 'Tomcat_ID', path: '', url: 'http://15.206.151.178:8090/')], contextPath: 'HelloWorld_Pipeline', war: '**/*.war' + } + } + } +} diff --git a/README.md b/README.md index 2d4e291f5..5167b41ae 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,16 @@ Hello World! (WAR-style) =============== This is the simplest possible Java webapp for testing servlet container deployments. It should work on any container and requires no other dependencies or configuration. + +test CICD for Jenkins Pipeline job + + + + +New commit in new branch + + + + + +Issure fix commit diff --git a/pom.xml b/pom.xml index 85f2e2e2a..0179ff371 100644 --- a/pom.xml +++ b/pom.xml @@ -1,9 +1,10 @@ 4.0.0 - com.efsavage + + com.helloworld.app hello-world-war - 1.0.0 + 1.0-SNAPSHOT war Hello World Web Application Repository Simplest possible Java Webapp @@ -26,4 +27,4 @@ - \ No newline at end of file + diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index ead0e510f..7bf88fc54 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,13 +1,23 @@ -Hello World! +Hello DevOps people! from Atos_DevSecOps team -

Hello World!

+

Hello DevOps people this is L&D program

+

This is DevOps class

+

CI/CD

- It is now + Today is <%= new java.util.Date() %>

+

Continuous integration and continuous delivery

+

Continuous delivery is a software development methodology where the release process is automated....

+

Continuous integration is a software development practice where members of a team use a version control system and frequently integrate their work to the same location, such as a main branch.

+

This is testing line for CICD

+

Test 2

+

This is testing line for DevSecOps

+

Test 3

- You are coming from - <%= request.getRemoteAddr() %>

- \ No newline at end of file + Today is + <%= new java.util.Date() %>

+

Continuous integration and continuous delivery to Nexus artifact repository

+