Skip to content

LiveLive #102

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 64 commits into
base: local
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c25c963
jenkins userdata
devopshydclub Jul 1, 2023
1dc4db6
Update nexus-setup.sh
hkhcoder Jul 1, 2023
c757e03
Update pom.xml
hkhcoder Oct 16, 2023
d98cb9e
Create settings.xml
hkhcoder Oct 16, 2023
0f8fd84
Update pom.xml
hkhcoder Nov 3, 2023
cd14391
Update pom.xml
hkhcoder Nov 3, 2023
55e76b9
Update nexus-setup.sh with jdk17
hkhcoder Aug 19, 2024
6dde3d2
Update jenkins-setup.sh
hkhcoder Jan 16, 2025
32b4f26
Update nexus-setup.sh
hkhcoder Mar 5, 2025
e171762
empty
ajithkumars3131 Apr 18, 2025
da1186c
updated
ajithkumars3131 Apr 18, 2025
014520d
update
ajithkumars3131 Apr 18, 2025
b866059
test
ajithkumars3131 Apr 18, 2025
a2542a6
up
ajithkumars3131 Apr 18, 2025
bc509af
jenkiensfile-updated
ajithkumars3131 Apr 18, 2025
4a362cf
maven
ajithkumars3131 Apr 18, 2025
e5ad2e1
maven
ajithkumars3131 Apr 18, 2025
924312a
updated
ajithkumars3131 Apr 18, 2025
440dece
Jenkines
ajithkumars3131 Apr 18, 2025
5176ce5
new
ajithkumars3131 Apr 18, 2025
547ab65
c
ajithkumars3131 Apr 18, 2025
9c621c4
chejc
ajithkumars3131 Apr 18, 2025
7da3e98
check
ajithkumars3131 Apr 18, 2025
86c51a6
server
ajithkumars3131 Apr 18, 2025
f25a1e8
webhook_impletetion
ajithkumars3131 Apr 19, 2025
a7f67d7
webhook
ajithkumars3131 Apr 19, 2025
146f872
new
ajithkumars3131 Apr 19, 2025
8aede0b
se
ajithkumars3131 Apr 19, 2025
ea4d91f
checkingwebhook
ajithkumars3131 Apr 19, 2025
285af6c
webhook
ajithkumars3131 Apr 19, 2025
9637555
updated
ajithkumars3131 Apr 19, 2025
65e7f34
}
ajithkumars3131 Apr 19, 2025
eb95673
all updated
ajithkumars3131 Apr 19, 2025
4040aab
newversion
ajithkumars3131 Apr 19, 2025
542e3d4
full
ajithkumars3131 Apr 19, 2025
15aec45
JAVA
ajithkumars3131 Apr 19, 2025
85ac14e
c
ajithkumars3131 Apr 19, 2025
46a18dd
checking
ajithkumars3131 Apr 19, 2025
0566858
Quality Gate
ajithkumars3131 Apr 19, 2025
5906075
tets
ajithkumars3131 Apr 19, 2025
9dfddc1
art
ajithkumars3131 Apr 19, 2025
a6cc633
now
ajithkumars3131 Apr 19, 2025
268d34a
now
ajithkumars3131 Apr 19, 2025
7aad7e0
jenkinscicd
ajithkumars3131 Apr 19, 2025
80e6141
jenkinscicd
ajithkumars3131 Apr 19, 2025
dfa3fa0
check
ajithkumars3131 Apr 27, 2025
f0c4520
cici-jenkines
ajithkumars3131 Apr 27, 2025
e792c1f
update
ajithkumars3131 Apr 27, 2025
57e679f
yes
ajithkumars3131 Apr 27, 2025
e66e7a4
yes
ajithkumars3131 Apr 27, 2025
9fe64a6
yes
ajithkumars3131 Apr 27, 2025
3a5d884
c
ajithkumars3131 Apr 27, 2025
720ec22
ce
ajithkumars3131 Apr 27, 2025
d17c927
re-updated
ajithkumars3131 Apr 27, 2025
00de3d3
Deploy to ECS staging
ajithkumars3131 Apr 27, 2025
1ecdcc8
cluster
ajithkumars3131 Apr 27, 2025
56fe94c
oh
ajithkumars3131 Apr 27, 2025
cf622f3
test
ajithkumars3131 Apr 27, 2025
8833773
checkinglease enter the commit message for your changes. Lines starting
ajithkumars3131 Apr 27, 2025
ab4aef1
yes
ajithkumars3131 Apr 27, 2025
89c3f18
Live
ajithkumars3131 Apr 27, 2025
f366186
yes
ajithkumars3131 Apr 27, 2025
55aaa0e
yes
ajithkumars3131 Apr 27, 2025
ffdbf65
yes
ajithkumars3131 Apr 27, 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
11 changes: 11 additions & 0 deletions Docker-files/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM tomcat:10-jdk21
LABEL "Project"="Vprofile"
LABEL "Author"="Imran"

RUN rm -rf /usr/local/tomcat/webapps/*
COPY target/vprofile-v2.war /usr/local/tomcat/webapps/ROOT.war

EXPOSE 8080
CMD ["catalina.sh", "run"]
WORKDIR /usr/local/tomcat/
VOLUME /usr/local/tomcat/webapps
13 changes: 13 additions & 0 deletions Docker-files/app/multistage/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM maven:3.9.9-eclipse-temurin-21-jammy AS BUILD_IMAGE
RUN git clone https://github.com/hkhcoder/vprofile-project.git
RUN cd vprofile-project && git checkout docker && mvn install

FROM tomcat:10-jdk21

RUN rm -rf /usr/local/tomcat/webapps/*

COPY --from=BUILD_IMAGE vprofile-project/target/vprofile-v2.war /usr/local/tomcat/webapps/ROOT.war

EXPOSE 8080
CMD ["catalina.sh", "run"]

Empty file added Docker-files/d.txt
Empty file.
9 changes: 9 additions & 0 deletions Docker-files/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM mysql:8.0.33
LABEL "Project"="Vprofile"
LABEL "Author"="Imran"

ENV MYSQL_ROOT_PASSWORD="vprodbpass"
ENV MYSQL_DATABASE="accounts"


ADD db_backup.sql docker-entrypoint-initdb.d/db_backup.sql
133 changes: 133 additions & 0 deletions Docker-files/db/db_backup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: accounts
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.10.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `role`
--

DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `role`
--

LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` VALUES (1,'ROLE_USER');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user`
--

DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`userEmail` varchar(255) DEFAULT NULL,
`profileImg` varchar(255) DEFAULT NULL,
`profileImgPath` varchar(255) DEFAULT NULL,
`dateOfBirth` varchar(255) DEFAULT NULL,
`fatherName` varchar(255) DEFAULT NULL,
`motherName` varchar(255) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL,
`maritalStatus` varchar(255) DEFAULT NULL,
`permanentAddress` varchar(255) DEFAULT NULL,
`tempAddress` varchar(255) DEFAULT NULL,
`primaryOccupation` varchar(255) DEFAULT NULL,
`secondaryOccupation` varchar(255) DEFAULT NULL,
`skills` varchar(255) DEFAULT NULL,
`phoneNumber` varchar(255) DEFAULT NULL,
`secondaryPhoneNumber` varchar(255) DEFAULT NULL,
`nationality` varchar(255) DEFAULT NULL,
`language` varchar(255) DEFAULT NULL,
`workingExperience` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user`
--

LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;

INSERT INTO `user` VALUES (7,'admin_vp','[email protected]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$0a7VdTr4rfCQqtsvpng6GuJnzUmQ7gZiHXgzGPgm5hkRa3avXgBLK')
,(8,'Abrar Nirban','[email protected]',NULL,NULL,'27/01/2002','A nirban','T nirban','male','unMarried','Dubai,UAE','Dubai,UAE','Software Engineer','Software Engineer','Java HTML CSS ','8888888888','8888888888','Indian','english','2 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6JAW'),
(9,'Amayra Fatima','[email protected]',NULL,NULL,'20/06/1993','K','L','female','unMarried','Dubai,UAE','Dubai,UAE','Software Engineer','Software Engineer','Java HTML CSS ','9999999999','9999999999','India','english','5','$2a$11$gwvsvUrFU.YirMM1Yb7NweFudLUM91AzH5BDFnhkNzfzpjG.FplYO'),
(10,'Aron','[email protected]',NULL,NULL,'27/01/2002','M nirban','R nirban','male','unMarried','Dubai,UAE','Dubai,UAE','Software Engineer','Software Engineer','Java HTML CSS ','7777777777','777777777','India','english','7','$2a$11$6oZEgfGGQAH23EaXLVZ2WOSKxcEJFnBSw2N2aghab0s2kcxSQwjhC'),
(11,'Kiran Kumar','[email protected]',NULL,NULL,'8/12/1993','K K','RK','male','unMarried','SanFrancisco','James Street','Software Engineer','Software Engineer','Java HTML CSS ','1010101010','1010101010','India','english','10','$2a$11$EXwpna1MlFFlKW5ut1iVi.AoeIulkPPmcOHFO8pOoQt1IYU9COU0m'),
(12,'Balbir Singh','[email protected]',NULL,NULL,'20/06/1993','balbir RK','balbir AK','male','unMarried','SanFrancisco','US','Software Engineer','Software Engineer','Java HTML CSS AWS','8888888111','8888888111','India','english','8','$2a$11$pzWNzzR.HUkHzz2zhAgqOeCl0WaTgY33NxxJ7n0l.rnEqjB9JO7vy'),
(4,'Hibo Prince','[email protected]',NULL,NULL,'6/09/2000','Abara','Queen','male','unMarried','Electronic City,UAE','Electronic City,UAE','Tester','Freelancing','Python PHP ','9146389863','9146389871','Indian','hindi','3 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6JAR'),
(5,'Aejaaz Habeeb','[email protected]',NULL,NULL,'16/02/2001','Imran','Ziya','male','unMarried','AbuDhabi,UAE','AbuDhabi,UAE','Developer','Developer','Azure Devops ','9566489863','9566489863','Indian','hindi','4 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6JAR'),
(6,'Jackie','[email protected]',NULL,NULL,'28/09/1992','Charles','Chan','male','Married','HongKong,China','HongKong,China','MartialArtist','MartialArtist','KungFu ','9246488863','9246488863','Chinese','Mandrian','1 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6RAR'),
(13,'Srinath Goud','[email protected]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$6BSmYPrT8I8b9yHmx.uTRu/QxnQM2vhZYQa8mR33aReWA4WFihyGK');


/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_role`
--

DROP TABLE IF EXISTS `user_role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_role` (
`user_id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
PRIMARY KEY (`user_id`,`role_id`),
KEY `fk_user_role_roleid_idx` (`role_id`),
CONSTRAINT `fk_user_role_roleid` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_user_role_userid` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_role`
--

LOCK TABLES `user_role` WRITE;
/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
INSERT INTO `user_role` VALUES (4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1);
/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-21-06 05:49:31
6 changes: 6 additions & 0 deletions Docker-files/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM nginx
LABEL "Project"="Vprofile"
LABEL "Author"="Imran"

RUN rm -rf /etc/nginx/conf.d/default.conf
COPY nginvproapp.conf /etc/nginx/conf.d/vproapp.conf
9 changes: 9 additions & 0 deletions Docker-files/web/nginvproapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
upstream vproapp {
server vproapp:8080;
}
server {
listen 80;
location / {
proxy_pass http://vproapp;
}
}
135 changes: 23 additions & 112 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,121 +1,32 @@
def COLOR_MAP = [
'SUCCESS': 'good',
'FAILURE': 'danger',
]

pipeline {

agent any
/*
tools {
maven "maven3"
}
*/
agent any

environment {
NEXUS_VERSION = "nexus3"
NEXUS_PROTOCOL = "http"
NEXUS_URL = "172.31.40.209:8081"
NEXUS_REPOSITORY = "vprofile-release"
NEXUS_REPO_ID = "vprofile-release"
NEXUS_CREDENTIAL_ID = "nexuslogin"
ARTVERSION = "${env.BUILD_ID}"
cluster = "vprofilelive"
service = "vprofile-live-service-ddrygy2s"
}

stages{

stage('BUILD'){
steps {
sh 'mvn clean install -DskipTests'
}
post {
success {
echo 'Now Archiving...'
archiveArtifacts artifacts: '**/target/*.war'
}
}
}

stage('UNIT TEST'){
steps {
sh 'mvn test'
}
}

stage('INTEGRATION TEST'){
steps {
sh 'mvn verify -DskipUnitTests'
}
}

stage ('CODE ANALYSIS WITH CHECKSTYLE'){
steps {
sh 'mvn checkstyle:checkstyle'
}
post {
success {
echo 'Generated Analysis Result'
}
}
}

stage('CODE ANALYSIS with SONARQUBE') {

environment {
scannerHome = tool 'sonarscanner4'
}

stages {
stage('Deploy to Prod ecs') {
steps {
withSonarQubeEnv('sonar-pro') {
sh '''${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=vprofile \
-Dsonar.projectName=vprofile-repo \
-Dsonar.projectVersion=1.0 \
-Dsonar.sources=src/ \
-Dsonar.java.binaries=target/test-classes/com/visualpathit/account/controllerTest/ \
-Dsonar.junit.reportsPath=target/surefire-reports/ \
-Dsonar.jacoco.reportsPath=target/jacoco.exec \
-Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml'''
}

timeout(time: 10, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
withAWS(credentials: 'awscreds', region: 'us-west-1') {
sh 'aws ecs update-service --cluster ${cluster} --service ${service} --force-new-deployment'
}
}
}

stage("Publish to Nexus Repository Manager") {
steps {
script {
pom = readMavenPom file: "pom.xml";
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
artifactPath = filesByGlob[0].path;
artifactExists = fileExists artifactPath;
if(artifactExists) {
echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version} ARTVERSION";
nexusArtifactUploader(
nexusVersion: NEXUS_VERSION,
protocol: NEXUS_PROTOCOL,
nexusUrl: NEXUS_URL,
groupId: pom.groupId,
version: ARTVERSION,
repository: NEXUS_REPOSITORY,
credentialsId: NEXUS_CREDENTIAL_ID,
artifacts: [
[artifactId: pom.artifactId,
classifier: '',
file: artifactPath,
type: pom.packaging],
[artifactId: pom.artifactId,
classifier: '',
file: "pom.xml",
type: "pom"]
]
);
}
else {
error "*** File: ${artifactPath}, could not be found";
}
}
}
}
post {
always {
echo 'Slack Notifications.'
slackSend channel: '#jenkinscicd',
color: COLOR_MAP[currentBuild.currentResult],
message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} \n More info available at: ${env.BUILD_URL}"
}


}


}
}
Loading