Skip to content
Open

Prod #133

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 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
d7eecca
upgrade of jdk17And21
Feb 5, 2025
6d7db82
Update pom.xml
hkhcoder Feb 25, 2025
0a3a37e
Update sonar-setup.sh
hkhcoder Feb 25, 2025
eafa623
Update nexus-setup.sh
hkhcoder Mar 5, 2025
18ee151
Test commit 2
pacifique-commits Jul 19, 2025
9e92a51
Jenkins file for pipeline code
pacifique-commits Jul 19, 2025
8b94a29
Fixed maven version in jenkins pipeline
pacifique-commits Jul 19, 2025
0979574
Jenkinsfile updated to use Maven 3.9
pacifique-commits Jul 19, 2025
e0d9f3c
Updated setting.xml file to use the correct Maven version.
pacifique-commits Jul 19, 2025
89093b8
Updated maven -u option in Jenkinsfile to ensure the latest dependenc…
pacifique-commits Jul 19, 2025
3504e4b
update Jenkinsfile for Test pipeline
pacifique-commits Jul 19, 2025
547f6bf
Corrected ERROR of spelling in Jenkinsfile
pacifique-commits Jul 19, 2025
db8cb85
Fix indentation in post-build steps of Jenkinsfile
pacifique-commits Jul 19, 2025
10db67f
Jenkinsfile modified
pacifique-commits Jul 19, 2025
cde5c8f
updated Jenkinsfile to download the artifact from nexus
pacifique-commits Jul 19, 2025
cac07e0
Updated sonarqube configurtion in Jenkinsfile
pacifique-commits Jul 20, 2025
e6d6a7e
README file update
pacifique-commits Jul 20, 2025
f0ad3fb
Jenkinsfile adjustments
pacifique-commits Jul 20, 2025
bca949e
Update
pacifique-commits Jul 20, 2025
f2a26c9
Quality Gate update
pacifique-commits Jul 20, 2025
b3f5863
Upload artifact to Nexus
pacifique-commits Jul 20, 2025
50ca0a7
Nexus loging update
pacifique-commits Jul 20, 2025
aaf7f91
Nexus Artifact Uploader Configuration
pacifique-commits Jul 20, 2025
2396eec
nexusArtifactUploader(
pacifique-commits Jul 20, 2025
e5585d9
Slack update
pacifique-commits Jul 20, 2025
abc7511
slack update
pacifique-commits Jul 20, 2025
0a0e8d6
syntax test slack
pacifique-commits Jul 20, 2025
92f3770
Slack test failure on purpose
pacifique-commits Jul 20, 2025
f242e51
slack test
pacifique-commits Jul 20, 2025
d587ba7
DockerFile included
pacifique-commits Aug 10, 2025
1242b1f
added .gitignore file
pacifique-commits Aug 10, 2025
1718ddd
Pipeline Updated
pacifique-commits Aug 11, 2025
ca90e34
App build update
pacifique-commits Aug 11, 2025
53e2a47
App build update
pacifique-commits Aug 11, 2025
7c89cbf
Pipeline Updated
pacifique-commits Aug 11, 2025
805c325
Pipeline Updated
pacifique-commits Aug 11, 2025
9344fdb
Slack Notification
pacifique-commits Aug 11, 2025
fbe497b
ECS staging
pacifique-commits Aug 13, 2025
74ae947
ECS staging
pacifique-commits Aug 13, 2025
d450a34
Automatic-reset
pacifique-commits Aug 15, 2025
262370e
Automatic-reset
pacifique-commits Aug 15, 2025
9559f8a
Syntax error correction
pacifique-commits Aug 15, 2025
13d8b65
Syntax error correction
pacifique-commits Aug 15, 2025
bd03949
gitgnore removed
pacifique-commits Aug 15, 2025
81fc342
Promote to Prod
pacifique-commits Aug 15, 2025
c64d006
sysnatax fix
pacifique-commits Aug 15, 2025
d352919
commented out slack noti
pacifique-commits Aug 15, 2025
a0cad49
Missing bracket haha
pacifique-commits Aug 15, 2025
350a332
test
pacifique-commits Aug 15, 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
12 changes: 12 additions & 0 deletions Docker-files/app/multistage/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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','admin@hkhinfo.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$0a7VdTr4rfCQqtsvpng6GuJnzUmQ7gZiHXgzGPgm5hkRa3avXgBLK')
,(8,'Abrar Nirban','abrar.nirban74@gmail.com',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','amayra@gmail.com',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','aron.DSilva@gmail.com',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','kiran@gmail.com',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','balbir@gmail.com',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','hibo.prince@gmail.com',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','aejaaz.habeeb@gmail.com',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','jackie.chan@gmail.com',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','sgoud@gmail.com',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;
}
}
121 changes: 0 additions & 121 deletions Jenkinsfile

This file was deleted.

50 changes: 50 additions & 0 deletions ProdPipeline/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
pipeline {
agent any
tools {
maven "MAVEN3.9"
jdk "JDK17"
}

environment {
cluster = "vproappprod"
service = "vproapp-task-service-3tql50m4"
}

stages {
stage('Deploy to Prod ecs') {
steps {
withAWS(credentials: 'awscreds', region: 'us-west-1') {
sh 'aws ecs update-service --cluster ${cluster} --service ${service} --force-new-deployment'
}
}
}
}

post {
// success {
// slackSend(
// channel: "${env.SLACK_CHANNEL}",
// color: 'good',
// message: "✅ Job *${env.JOB_NAME}* #${env.BUILD_NUMBER} succeeded.\nCheck: ${env.BUILD_URL}",
// tokenCredentialId: "${env.SLACK_CREDENTIAL_ID}",
// baseUrl: 'https://slack.com/api/',
// botUser: true
// )
// }

// failure {
// slackSend(
// channel: "${env.SLACK_CHANNEL}",
// color: 'danger',
// message: "❌ Job *${env.JOB_NAME}* #${env.BUILD_NUMBER} failed!\nCheck: ${env.BUILD_URL}",
// tokenCredentialId: "${env.SLACK_CREDENTIAL_ID}",
// baseUrl: 'https://slack.com/api/',
// botUser: true
// )
// }

always {
echo 'Pipeline completed.'
}
}
}
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Prerequisites
#
- JDK 11
- Maven 3

# Cawabanga

- JDK 17 or 21
- Maven 3.9
- MySQL 8
-test

# cawabanga again Test

# Technologies

# Technologies
- Spring MVC
- Spring Security
- Spring Data JPA
Expand All @@ -15,11 +21,12 @@
- Memcached
- Rabbitmq
- ElasticSearch

# Database
Here,we used Mysql DB

Here,we used Mysql DB
sql dump file:

- /src/main/resources/db_backup.sql
- db_backup.sql file is a mysql dump file.we have to import this dump to mysql db server
- > mysql -u <user_name> -p accounts < db_backup.sql


Loading