Skip to content

Feature #426

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

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3134800
Update pom.xml
gozelah3 Mar 30, 2025
8047704
Update pom.xml
gozelah3 Mar 30, 2025
b753869
Update pom.xml
gozelah3 Mar 30, 2025
38967da
Update pom.xml
gozelah3 Mar 30, 2025
9dd8de1
Update pom.xml
gozelah3 Mar 30, 2025
4d6e0b7
Update pom.xml
gozelah3 Mar 30, 2025
4e4c365
Update pom.xml
gozelah3 Mar 30, 2025
a63f790
Update pom.xml
gozelah3 Mar 30, 2025
29516c0
Update pom.xml
gozelah3 Mar 30, 2025
7ab8108
Update pom.xml
gozelah3 Mar 30, 2025
3048c96
Update pom.xml
gozelah3 Mar 30, 2025
ae0120a
Update pom.xml
gozelah3 Mar 30, 2025
1c6112d
Update pom.xml
gozelah3 Mar 30, 2025
77f93a3
Update pom.xml
gozelah3 Mar 30, 2025
61ace5c
Update home.jsp
gozelah3 Mar 30, 2025
6e3800c
Update home.jsp
gozelah3 Mar 30, 2025
90ba342
Update home.jsp
gozelah3 Mar 30, 2025
6fdb031
Update home.jsp
gozelah3 Mar 30, 2025
14571b7
Update home.jsp
gozelah3 Mar 31, 2025
78b56f5
Update home.jsp
gozelah3 Apr 1, 2025
404dcab
Update pom.xml
gozelah3 Apr 7, 2025
e602371
Update pom.xml
gozelah3 Apr 7, 2025
2765166
Update pom.xml
gozelah3 Apr 8, 2025
17daba9
Update pom.xml
gozelah3 Apr 8, 2025
35a93c2
Update pom.xml
gozelah3 Apr 8, 2025
ff8edc8
Update pom.xml
gozelah3 Apr 8, 2025
a4d662f
Update pom.xml
gozelah3 Apr 8, 2025
0507861
Update pom.xml
gozelah3 Apr 8, 2025
b83fc3e
Update pom.xml
gozelah3 Apr 8, 2025
2fc6664
Update home.jsp
gozelah3 Apr 8, 2025
1bc5faf
Create jenkins_tesla
gozelah3 Apr 9, 2025
d2017a2
Update jenkins_tesla
gozelah3 Apr 9, 2025
38cf87d
Rename jenkins_tesla to jenkinsfile_tesla30
gozelah3 Apr 9, 2025
3ada4a3
Update jenkinsfile_tesla30
gozelah3 Apr 9, 2025
ea1774d
Create jenkinsfile_aug30
gozelah3 Apr 9, 2025
d805dab
Update pom.xml
gozelah3 Apr 19, 2025
5931468
Update pom.xml
gozelah3 Apr 19, 2025
a58ea4b
Update pom.xml
gozelah3 Apr 19, 2025
37fef7c
Update home.jsp
gozelah3 Apr 20, 2025
7631933
Update pom.xml
gozelah3 Apr 20, 2025
2d8609e
Create Jenkinsfile-declarative30
gozelah3 Apr 20, 2025
c62a8bb
Delete Jenkinsfile-declarative30
gozelah3 Apr 20, 2025
a705df8
Create Jenkinsfile-declarative30
gozelah3 Apr 20, 2025
92d3196
Update pom.xml
gozelah3 Apr 20, 2025
0d9e3fd
Update pom.xml
gozelah3 Apr 20, 2025
a34a016
Update pom.xml
gozelah3 Apr 20, 2025
d9c673b
Update pom.xml
gozelah3 Apr 20, 2025
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
95 changes: 95 additions & 0 deletions Jenkinsfile-declarative30
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
pipeline {
agent any

tools {
maven 'maven 3.9.9' // This should match the exact Maven name configured in Jenkins
}

environment {
MAVEN_OPTS = '-Dmaven.repo.local=.m2/repository'
}

stages {
stage('1GetCode') {
steps {
echo 'Cloning the latest application version'
git branch: 'feature', url: 'https://github.com/gozelah3/maven-web-application'
}
}

stage('3Test+Build') {
steps {
echo 'Running JUnit test cases'
echo 'Testing must pass to create artifacts'
sh 'mvn clean package'
}
}

stage('4CodeQuality') {
steps {
echo 'Performing Code Quality Analysis'
sh 'mvn sonar:sonar'
}
}

stage('5uploadNexus') {
steps {
withCredentials([usernamePassword(
credentialsId: 'nexus-creds-id', // Replace with your actual Jenkins credentials ID
usernameVariable: 'NEXUS_USER',
passwordVariable: 'NEXUS_PASS'
)]) {
writeFile file: 'settings.xml', text: """
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>nexus</id>
<username>${env.NEXUS_USER}</username>
<password>${env.NEXUS_PASS}</password>
</server>
</servers>
</settings>
"""
sh 'mvn deploy --settings settings.xml'
}
}
}
stage('8deploy2prod') {
steps{
deploy adapters: [tomcat9(credentialsId: 'TomcatDomiCredentials', path: '', url: 'http://44.204.149.155:8080/')], contextPath: null, war: 'target/*war'
}
}
}

post {
always {
emailext body: '''Hey guys,
Please check build status.

Thanks,
Landmark
+1 437 215 2483''', recipientProviders: [buildUser(), developers()], subject: 'Build Notification', to: '[email protected]'
}

success {
emailext body: '''Hey guys,
Good job, build and deployment is successful.

Thanks,
Landmark
+1 437 215 2483''', recipientProviders: [buildUser(), developers()], subject: 'Build SUCCESS', to: '[email protected]'
}

failure {
emailext body: '''Hey guys,
Build failed. Please resolve issues.

Thanks,
Landmark
+1 404 453 4870''', recipientProviders: [buildUser(), developers()], subject: 'Build FAILED', to: '[email protected]'
}
}
}
38 changes: 38 additions & 0 deletions jenkinsfile_aug30
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
node{
def mavenHome = tool name: 'maven 3.9.9'
stage('1cloneCode'){
git "https://github.com/gozelah3/maven-web-application"
}
stage('2Test&Build'){
sh "${mavenHome}/bin/mvn package"
//bat "${mavenHome}/bin/mvn clean package"
}
/*
stage('3codeQuality'){
sh '/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven_3.9.9/bin/mvn sonar:sonar -Dsonar.scanner.force-deploy=true -DargLine="--add-opens java.base/java.lang=ALL-UNNAMED"'
}
stage('4uploadArtifacts'){
sh "${mavenHome}/bin/mvn deploy"
}
stage('5deploy2UAT'){
sh "echo 'deploy to UAT' "
deploy adapters: [tomcat8(credentialsId: 'TomcatDomiCredentials', path: '', url: 'http://184.72.174.131:8080/')], contextPath: null, war: 'target/*war'
}
stage('6approvalGate'){
sh "echo 'ready for review' "
timeout(time:5, unit:'DAYS') {
input message: 'Application ready for deployment, Please review and approve'
}
}
stage('7deploy2Prod'){
sh "sleep 50"
deploy adapters: [tomcat8(credentialsId: 'TomcatDomiCredentials', path: '', url: 'http://184.72.174.131:8080/')], contextPath: null, war: 'target/*war'
}
stage('8emailNotification'){
emailext body: '''Hi all,

Pls Check build status
Chigo Technologies''', recipientProviders: [buildUser(), developers(), upstreamDevelopers(), contributor(), brokenBuildSuspects(), brokenTestsSuspects()], subject: 'build status', to: '[email protected]'
}
*/
}
36 changes: 36 additions & 0 deletions jenkinsfile_tesla30
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
node{
def mavenHome = tool name: 'maven 3.9.9'
stage('1cloneCode'){
git "https://github.com/gozelah3/maven-web-application"
}
stage('2Test&Build'){
sh "${mavenHome}/bin/mvn package"
//bat "${mavenHome}/bin/mvn clean package"
}
stage('3codeQuality'){
sh '/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven_3.9.9/bin/mvn sonar:sonar -Dsonar.scanner.force-deploy=true -DargLine="--add-opens java.base/java.lang=ALL-UNNAMED"'
}
stage('4uploadArtifacts'){
sh "${mavenHome}/bin/mvn deploy"
}
stage('5deploy2UAT'){
sh "echo 'deploy to UAT' "
deploy adapters: [tomcat8(credentialsId: 'TomcatDomiCredentials', path: '', url: 'http://184.72.174.131:8080/')], contextPath: null, war: 'target/*war'
}
stage('6approvalGate'){
sh "echo 'ready for review' "
timeout(time:5, unit:'DAYS') {
input message: 'Application ready for deployment, Please review and approve'
}
}
stage('7deploy2Prod'){
sh "sleep 50"
deploy adapters: [tomcat8(credentialsId: 'TomcatDomiCredentials', path: '', url: 'http://184.72.174.131:8080/')], contextPath: null, war: 'target/*war'
}
stage('8emailNotification'){
emailext body: '''Hi all,

Pls Check build status
Chigo Technologies''', recipientProviders: [buildUser(), developers(), upstreamDevelopers(), contributor(), brokenBuildSuspects(), brokenTestsSuspects()], subject: 'build status', to: '[email protected]'
}
}
27 changes: 15 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>maven-web-application</artifactId>
<packaging>war</packaging>

<version>0.0.2-SNAPSHOT</version>
<version>0.0.3</version>

<name>maven-web-application</name>

Expand All @@ -22,7 +22,7 @@
<spring.version>5.1.2.RELEASE</spring.version>
<junit.version>4.11</junit.version>
<log4j.version>1.2.17</log4j.version>
<sonar.host.url>http://10.0.5.201:9000/</sonar.host.url>
<sonar.host.url>http://172.31.24.240:9000/</sonar.host.url>
<sonar.login>admin</sonar.login>
<sonar.password>admin123</sonar.password>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -84,31 +84,25 @@

<!-- provided dependencies -->

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>nexus</id>
<name>Landmark Technologies Releases Nexus Repository</name>
<url>http://98.81.159.237:8081/repository/tesla-releases/</url>
<url>http://34.202.163.242:8181/mylandmarktech/repository/boafeature-releases/</url>
</repository>

<snapshotRepository>
<id>nexus</id>
<name>Landmark Technologies Snapshot Nexus Repository </name>
<url>http://98.81.159.237:8081/repository/tesla-snapshots/</url>
<url>http://34.202.163.242:8181/mylandmarktech/repository/boafeature-snapshots/</url>
</snapshotRepository>

</distributionManagement>

<build>
<finalName>tesla</finalName>
<finalName>fintech-boa</finalName>

<plugins>
<plugin>
Expand Down Expand Up @@ -144,7 +138,16 @@
<wtpContextName>maven-web-application</wtpContextName>
</configuration>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
12 changes: 4 additions & 8 deletions src/main/webapp/jsps/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
</head>
</head>
<body>
<h1 align="center">Welcome to Tesla Web application Project.</h1>
<h1 align="center">Landmark Software Solutions (LSS) are developing and supporting quality Software Solutions to millions of clients globally.
We are raising billionaires IT professionals accross the nations of the World.
Landmark Software Solutions (LSS) offers Training for DevOps with Linux, Kubernetes and Cloud, equipping IT Engineers for best performance.
Landmark Technologies, the Pride of Africa.
Class37 DevOps MasterClass started on July 13, 2024.
Class38 DevOps MasterClass will start on Oct 19, 2024.
Please invite all your contacts and friends for this life changing course.
<h1 align="center">Welcome to Tesla Web-application Project30 Automation.</h1>
<h1 align="center">Landmark Software Solutions (LSS) are developing and supporting quality Software Solutions to millions of clients globally.
We are raising senior IT professionals who will become billionaires, across the nations of the World.
Landmark Technologies, the Pride of Africa.
</h1>
<hr>
<br>
Expand Down