diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..966fcde3 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,33 @@ +node { + def mavenHome = tool name: 'maven_3.9.11', type:'maven' + + try { + + stage('checkout') { + git branch: 'deployement', url: 'https://github.com/Nandeesh94/jenkins-java-project.git' + } + stage('build') { + sh "${mavenHome}/bin/mvn clean package" + } + stage('sonarqube report') { + sh "${mavenHome}/bin/mvn clean sonar:sonar" + } + stage('upload to nexus') { + sh "${mavenHome}/bin/mvn clean deploy" + } + stage('upload to tomcat') { + withCredentials([usernamePassword(credentialsId:'tomcat-deployer',usernameVariable: 'DEPLOY_USER',passwordVariable: 'DEPLOY_PASS')]) { + sh """ + curl -u $DEPLOY_USER:$DEPLOY_PASS \ + --upload-file /var/lib/jenkins/workspace/jio-declarative-pipeline/target/netflix-clone.war \ + "http://3.129.52.3:8080/manager/text/deploy?path=/netflix-clone&update=true" + """ + } + } + stage('verify deployment') { + sh "curl -I http://3.129.52.3:8080/netflix-clone/" + } + } catch (err) { + error "Pipeline failed: ${err}" + } + } diff --git a/JenkinsfileDLP b/JenkinsfileDLP new file mode 100644 index 00000000..1fd58d89 --- /dev/null +++ b/JenkinsfileDLP @@ -0,0 +1,89 @@ +pipeline { + agent any + + tools { + maven 'maven_3.9.11' + } + + environment { + BUILD_STATUS = 'SUCCESS' + } + + stages { + stage('checkout') { + steps { + git branch: 'deployement', url: 'https://github.com/Nandeesh94/jenkins-java-project.git' + } + } + stage('build') { + steps { + sh "mvn clean package" + } + } + stage('sonarqube report') { + steps { + sh "mvn clean sonar:sonar" + } + } + stage('upload nexus') { + steps { + sh "mvn clean deploy" + } + } + stage('deploy tomcat') { + steps { + withCredentials([usernamePassword(credentialsId:'tomcat-deployer',usernameVariable:'DEPLOY_USER',passwordVariable:'DEPLOY_PASS')]) { + sh """ + curl -u $DEPLOY_USER:$DEPLOY_PASS \ + --upload-file target/netflix-clone.war \ + "http://18.218.177.248:8080/manager/text/deploy?path=/netflix-clone&update=true" + """ + } + } + } + stage('verify deployment') { + steps { + catchError(buildResult:'FAILURE',stageResult:'FAILURE') { + sh "curl -I http://18.218.177.248:8080/netflix-clone/" + } + } + } + stage('jenkins backup') { + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') { + sh 'sudo /opt/scripts/jenkins_backup.sh' + } + } + } + } + post { + always { + echo "cleaning up workspace.." + deleteDir() + } + success { + slackSend( + color: '#00FF00', + message: "✅ SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})", + channel: '#bsnl-test' + ) + } + + failure { + slackSend( + color: '#FF0000', + message: "❌ FAILURE: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})", + channel: '#bsnl-test' + ) + } + + aborted { + slackSend( + color: '#FFFF00', + message: "🛑 ABORTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})", + channel: '#bsnl-test' + ) + } + } +} + diff --git a/assets/css/app.css b/assets/css/app.css new file mode 100644 index 00000000..aff303b3 --- /dev/null +++ b/assets/css/app.css @@ -0,0 +1,113 @@ +:root{ + --bg:#0b0b0f; + --bg-soft:#12121a; + --text:#eaeaea; + --muted:#a5a5a5; + --primary:#e50914; + --primary-700:#b00710; + --accent:#3ea6ff; + --card:#1a1a24; + --ring: 0 0 0 2px color-mix(in srgb, var(--text) 10%, transparent); +} + +* { box-sizing: border-box; } +html,body { height:100%; } +body{ + margin:0; + font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; + background: radial-gradient(1000px 600px at 80% -10%, #1a1a2e44, transparent), var(--bg); + color: var(--text); +} + +.container{ width:min(1200px, 92%); margin-inline:auto; } + +.nav{ + position:sticky; top:0; z-index:10; + display:flex; align-items:center; justify-content:space-between; + padding:14px min(4vw,28px); + background: linear-gradient(180deg, #0b0b0fcc 0%, #0b0b0f00 100%); + backdrop-filter: saturate(1.2) blur(6px); + border-bottom: 1px solid #ffffff10; +} +.nav__brand{ display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:0.3px; } +.logo{ display:inline-grid; place-items:center; width:28px; height:28px; border-radius:6px; background:var(--primary); color:white; } +.brand{ font-weight:700; } +.nav__links a{ color:var(--muted); margin:0 10px; text-decoration:none; } +.nav__links a.active, .nav__links a:hover{ color:var(--text); } +.nav__actions{ display:flex; align-items:center; gap:12px; } +.search{ + padding:8px 10px; border-radius:8px; border:1px solid #ffffff22; background:#0f0f15; color:var(--text); +} +.avatar{ width:32px; height:32px; border-radius:50%; } + +.hero{ + position:relative; min-height:58vh; display:grid; align-items:end; + background: center/cover no-repeat; + background-image: var(--bg); +} +.hero::before{ + content:""; position:absolute; inset:0; + background: linear-gradient(180deg, transparent 0%, #0b0b0f 80%); +} +.hero__overlay{ + position:absolute; inset:0; + background: linear-gradient(90deg, #0b0b0f 0%, #0b0b0fbb 35%, transparent 60%); +} +.hero__content{ position:relative; padding:60px 0; } +.hero__title{ font-size: clamp(28px, 6vw, 56px); margin:0 0 8px; } +.hero__meta{ color:var(--muted); margin:0 0 16px; } +.hero__desc{ color:#d6d6d6; max-width:60ch; margin:0 0 24px; } +.btn{ + display:inline-flex; align-items:center; gap:8px; + padding:10px 16px; border-radius:10px; border:1px solid #ffffff22; background:#ffffff10; color:var(--text); + cursor:pointer; transition:.2s ease; box-shadow: var(--ring); +} +.btn:hover{ transform: translateY(-1px); } +.btn--primary{ background:var(--primary); border-color:var(--primary); } +.btn--primary:hover{ background:var(--primary-700); } + +.row{ margin: 28px auto 10px; } +.row__title{ font-size:20px; font-weight:700; margin:12px 0 10px; } + +.cards{ + display:grid; gap:14px; + grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); +} +.cards--scroll{ + display:flex; gap:14px; overflow:auto; padding-bottom:6px; + scroll-snap-type:x mandatory; +} +.cards--scroll .card{ scroll-snap-align:start; } + +.card{ + position:relative; overflow:hidden; border-radius:12px; background:var(--card); + box-shadow: 0 6px 16px #00000055; isolation:isolate; +} +.card img{ width:100%; height:240px; object-fit:cover; display:block; filter:saturate(1.05) contrast(1.02); } +.card__overlay{ + position:absolute; inset:auto 0 0 0; padding:10px; display:grid; gap:8px; + background: linear-gradient(180deg, #00000000, #000000cc 60%); + transform: translateY(40%); transition: .25s ease; +} +.card:hover .card__overlay{ transform: translateY(0); } +.badge{ + align-self:start; justify-self:start; + background:#000000aa; color:#fff; border:1px solid #ffffff22; font-size:12px; + padding:2px 6px; border-radius:6px; +} +.controls{ display:flex; align-items:center; gap:10px; color:#ddd; } +.icon{ + width:34px; height:34px; border-radius:999px; border:1px solid #ffffff33; background:#ffffff10; + display:inline-grid; place-items:center; cursor:pointer; +} +.icon.play::before{ content:"▶"; margin-left:2px; font-size:13px; } +.icon.add::before{ content:"+"; font-size:14px; } +.meta{ margin-left:auto; font-size:12px; color:#bdbdbd; } + +.footer{ border-top:1px solid #ffffff10; margin-top:30px; padding:20px 0 60px; color:var(--muted); } +.footer .links{ display:flex; flex-wrap:wrap; gap:16px; margin-bottom:8px; } +.footer a{ color:#bdbdbd; text-decoration:none; } +.footer a:hover{ color:#ffffff; } + +/* Small utility */ +.theme-dark { color-scheme: dark; } diff --git a/assets/js/app.js b/assets/js/app.js new file mode 100644 index 00000000..85c90fb9 --- /dev/null +++ b/assets/js/app.js @@ -0,0 +1,25 @@ +// Simple interactivity hooks (expandable for real data) +document.addEventListener('DOMContentLoaded', () => { + // Smooth scroll for horizontal rows + document.querySelectorAll('.cards--scroll').forEach(row => { + let isDown = false, startX = 0, scrollLeft = 0; + row.addEventListener('mousedown', e => { isDown = true; startX = e.pageX - row.offsetLeft; scrollLeft = row.scrollLeft; }); + row.addEventListener('mouseleave', () => isDown = false); + row.addEventListener('mouseup', () => isDown = false); + row.addEventListener('mousemove', e => { + if (!isDown) return; + e.preventDefault(); + const x = e.pageX - row.offsetLeft; + row.scrollLeft = scrollLeft - (x - startX) * 1.4; + }); + }); + + // Card button demos + document.body.addEventListener('click', (e) => { + if (e.target.closest('.icon.play')) { + alert('Play clicked'); + } else if (e.target.closest('.icon.add')) { + alert('Added to your list'); + } + }); +}); diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 00000000..2d861758 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,18 @@ +version: 0.2 + +phases: + install: + commands: + - echo "Installing dependencies..." + build: + commands: + - echo "Building project..." + - mvn package + post_build: + commands: + - echo "Build completed successfully" + +artifacts: + files: + - target/*.war + - target/*.jar diff --git a/index.html b/index.html new file mode 100644 index 00000000..800386ee --- /dev/null +++ b/index.html @@ -0,0 +1,303 @@ + + + + + Prime Series — Spotlight + + + + + + + + + + + +
+ +
+
+ Prime Original + 4K + Dolby Atmos +
+

The Meridian Protocol

+

+ Season 1 • Thriller • 8 Episodes • IMDb 8.6 +

+

+ A gifted cryptanalyst uncovers a pattern in global outages that points to a shadow network controlling the world’s data. +

+
+ + +
+
+
+ + +
+

Amazon Originals

+
+ +
+
+ + +
+

Top 10 in India Today

+
+
+ + +
+

Because you like Sci‑Fi

+
+
+ + + + + + + diff --git a/index.jsp (or index.html) b/index.jsp (or index.html) new file mode 100644 index 00000000..9902ea09 --- /dev/null +++ b/index.jsp (or index.html) @@ -0,0 +1,116 @@ + + + + + Netflix Clone + + + + + + + + + + +
+ +
+
+
+

Edge of Tomorrow

+

Sci‑Fi • 2h • 4K • IMDB 8.0

+

A soldier relives a fatal day in a war against aliens, learning with each cycle.

+
+ + +
+
+
+ + +
+

Trending Now

+ +
+ +
+

Because you watched Sci‑Fi

+
+ +
+
+
+ + + + + + diff --git a/pom.xml b/pom.xml index 01e0d5a2..92056da7 100644 --- a/pom.xml +++ b/pom.xml @@ -1,51 +1,114 @@ - - 4.0.0 - in.RAHAM - NETFLIX - war - 1.2.2 - Java Home myweb - http://maven.apache.org - - - kammana - - - - com.oracle.bedrock - bedrock-runtime-maven - 5.1.2 - - - - junit - junit - 3.8.1 - test - - - - - - - nexusRepo - http://13.233.230.166:8081/repository/maven-snapshots/ - - - - nexusRepo - http://13.233.230.166:8081/repository/maven-releases/ - - - - - - maven1 - Maven.org - http://repo1.maven.org/maven2 - - - - + + + 4.0.0 + + in.nandeesh + netflix-clone + 1.2.2-SNAPSHOT + war + + Netflix Clone WebApp + Netflix Clone Java Web Application with SonarQube + Nexus Integration + + + 17 + 17 + UTF-8 + UTF-8 + + + in.nandeesh.netflix.clone + Netflix Clone + http://18.216.33.184:9000/ + admin + 90199652 + + + + + + nexus + http://18.188.101.4:8081/repository/jio-release/ + + + nexus + http://18.188.101.4:8081/repository/jio-snapshot/ + + + + + + + com.oracle.bedrock + bedrock-runtime-maven + 5.1.2 + + + + + junit + junit + 4.13.2 + test + + + + + org.mockito + mockito-core + 5.12.0 + test + + + + + javax.servlet + javax.servlet-api + 4.0.1 + provided + + + + + netflix-clone + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + false + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.10.0.2594 + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.1 + + + diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 9da52dbc..7cc98eae 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -13,7 +13,7 @@
-

NETFLIX SIGN IN V-5.0

+

Netflix sign in V-9.0

@@ -23,7 +23,7 @@
- +