Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update deploy stage #52

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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'
}
}
}
}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.efsavage</groupId>

<groupId>com.helloworld.app</groupId>
<artifactId>hello-world-war</artifactId>
<version>1.0.0</version>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Hello World Web Application Repository</name>
<description>Simplest possible Java Webapp</description>
Expand All @@ -26,4 +27,4 @@
</plugins>
</build>

</project>
</project>
22 changes: 16 additions & 6 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
<html>
<head>
<title>Hello World!</title>
<title>Hello DevOps people! from Atos_DevSecOps team</title>
</head>
<body>
<h1>Hello World!</h1>
<p><h1>Hello DevOps people this is L&D program</h1></p>
<p>This is DevOps class</p>
<b><h2>CI/CD</h2></b>
<p>
It is now
Today is
<%= new java.util.Date() %></p>
<p>Continuous integration and continuous delivery</p>
<p>Continuous delivery is a software development methodology where the release process is automated....</p>
<p>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.</p>
<p><h2>This is testing line for CICD</p><h2>
<p>Test 2</p>
<p><h2>This is testing line for DevSecOps</p><h2>
<p>Test 3</p>
<p>
You are coming from
<%= request.getRemoteAddr() %></p>
</body>
Today is
<%= new java.util.Date() %></p>
<p>Continuous integration and continuous delivery to Nexus artifact repository</p>
</body>