Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
32bb4b1
add jenkinsfile
Sep 29, 2023
88a1ce5
add jenkinsfile
Sep 29, 2023
690e2e9
Added Jenkinsfile
ietashish Sep 29, 2023
170d205
add jenkinsfile
Sep 29, 2023
c91f618
add jenkinsfile
Sep 29, 2023
b808791
echo my name
Sep 29, 2023
e0265f3
archiving
ietashish Sep 29, 2023
0f6bf7f
Added Jenkinsfile
ietashish Sep 29, 2023
8b36304
remove tools movan
ietashish Sep 29, 2023
c40ac90
add tools mavn
ietashish Sep 29, 2023
7329cd3
Update Jenkinsfile
ietashish Sep 29, 2023
41a0596
agent is docker
ietashish Sep 29, 2023
8165060
update tocker agent
ietashish Sep 29, 2023
6c8226e
Update Jenkinsfile
ietashish Sep 29, 2023
e33efb4
Update Jenkinsfile
ietashish Sep 29, 2023
13235a8
Update Jenkinsfile
ietashish Sep 29, 2023
7538bf3
Update Jenkinsfile
ietashish Sep 29, 2023
020cf37
editing jspo
Sep 29, 2023
5dc6136
Merge pull request #1 from ietashish/feature
ietashish Sep 29, 2023
a34b424
Update Jenkinsfile
ietashish Sep 29, 2023
b102192
Merge pull request #2 from ietashish/ietashish-patch-1
ietashish Sep 29, 2023
889abad
updating agent
ietashish Sep 29, 2023
dd1b604
Merge pull request #3 from ietashish/mvnagent
ietashish Sep 29, 2023
38ac9f9
sleep
Sep 29, 2023
67c6434
Adding dockerfile
Oct 4, 2023
ab290e8
Added Jenkinsfile
ietashish Oct 4, 2023
1b4dd9a
Update Jenkinsfile
ietashish Oct 4, 2023
34b791b
Update Jenkinsfile
ietashish Oct 4, 2023
9d5bb71
Added Jenkinsfile
ietashish Oct 4, 2023
6a53d7d
Merge pull request #4 from ietashish/dockerpackage
ietashish Oct 4, 2023
691213e
Added Jenkinsfile
ietashish Oct 4, 2023
04f5081
Merge pull request #5 from ietashish/dockerfile2
ietashish Oct 4, 2023
39157e3
Update Jenkinsfile
ietashish Oct 4, 2023
5b707fc
Update Jenkinsfile
ietashish Oct 4, 2023
fd073b5
Update Jenkinsfile
ietashish Oct 4, 2023
a141a79
Update Jenkinsfile
ietashish Oct 4, 2023
45ef8a8
Update Jenkinsfile
ietashish Oct 4, 2023
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
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM maven:3.6.3-jdk-11-slim as build
WORKDIR /opt/demo
COPY . /opt/demo
RUN mvn package -DskipTests

FROM tomcat:jre8-openjdk-slim-buster as run
WORKDIR /usr/local/tomcat
COPY --from=build /opt/demo/target/sysfoo.war webapps/ROOT.war
76 changes: 76 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
pipeline {
agent none
stages {
stage('build') {

agent {
docker {
image 'maven:3.6.3-jdk-11-slim'
}

}
steps {
echo env.BRANCH_NAME
echo 'compile maven app'
echo 'Ashish Gupta 4'
sh 'mvn compile'
}
}

stage('test') {
agent {
docker {
image 'maven:3.6.3-jdk-11-slim'
}

}
steps {
echo 'Testing'
sh 'mvn clean test'
}
}

stage('package war and docker')
{
when {
branch 'master'
}
parallel {
stage('package') {
agent {
docker {
image 'maven:3.6.3-jdk-11-slim'
}

}
steps {
echo 'Packaging'
sh 'mvn package -DskipTests'
archiveArtifacts 'target/*.war'
}
}

stage('Docker BnP') {
when {
branch 'master'
}
agent any
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'dockerlogin') {
def dockerImage = docker.build("ietashish/sysfoo:v${env.BUILD_ID}", "./")
dockerImage.push()
dockerImage.push("latest")
dockerImage.push("dev")
}
}

}
}
}
}
}
tools {
maven 'MyMaven'
}
}
2 changes: 1 addition & 1 deletion src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<article id="about">
<h2 class="major">About</h2>
<span class="image main"><img src="images/sodc_banner.jpg" alt="" /></span>
<p>School of Devops is a leading provider of devops trainings and offers variety of courses which focus on Infrastrucrture as a Code, Container and Docker, Continuous Delivery, Cloud. To learn more visit http://www.schoolofdevops.com.</p>
<p>School of Devops 2 is a leading provider of devops trainings and offers variety of courses which focus on Infrastrucrture as a Code, Container and Docker, Continuous Delivery, Cloud. To learn more visit http://www.schoolofdevops.com.</p>
</article>
</div>

Expand Down