Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 13 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,37 @@ pipeline {
stages {
stage('git clone') {
steps {
git 'https://github.com/Kumarbgm16/java-azure-project.git'
git 'https://github.com/coderepo2891/java-azure-project-forked.git'
}
}
stage('maven package') {
steps {
sh 'mvn clean package'
}
}
stage('create the docker image') {
stage('create the docker image') {
steps {
sh 'sudo docker build -t saidevops16/apacheapp:latest .'
sh 'sudo docker build -t aqibdocker2891/web-java-awsb60:v1 .'
}
}
stage('docker push ') {
steps {
withCredentials([string(credentialsId: 'DOCKER_HUB', variable: 'DOCKER_HUB_PASS_CODE')]) {
withCredentials([string(credentialsId: 'DOCKER_HUB_PWD', variable: 'DOCKER_HUB_PASS_CODE')]) {
// some block
sh "sudo docker login -u saidevops16 -p $DOCKER_HUB_PASS_CODE"
sh "sudo docker login -u aqibdocker2891 -p $DOCKER_HUB_PASS_CODE"
}
sh "sudo docker push saidevops16/apacheapp:latest"
sh "sudo docker push aqibdocker2891/web-java-awsb60:v1"
}
}
stage('Deploy to docker Env') {
}
stage('Deploy to docker Env') {
steps {
sh "sudo docker rm -f app3"
sh "sudo docker run -itd --name app3 -p 9000:8080 saidevops16/apacheapp:latest"
sh "sudo docker rm -f mysecureapp"
sh "sudo docker run -itd --name mysecureapp -p 9000:8080 aqibdocker2891/web-java-awsb60:v1"

}
}
}
}



4 changes: 2 additions & 2 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Secret Santa</title>
<title>Aqib santa bant app </title>
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<h2>Welcome to AWS Devops and az104 az400 az500 az700 az204 az900 az305 EMEXO</h2>
<h2>Welcome to AWS Devops and az104 az400 az500 az700 az204 az900 az305 eeeee</h2>
<p>Click to start! Follow the procedure</p>
<a th:href="@{/addpeople}">Start!</a>
</body>
Expand Down