Skip to content
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

Update pom.xml #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
37 changes: 37 additions & 0 deletions jenkinsfile-amzn
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
node{
def mavenHome = tool name: 'maven3.8.5'
stage('1Clone'){
git branch: 'master', credentialsId: 'Git-Credentials', url: 'https://github.com/Temmydayz/maven-web-apps'
}
stage('2MavenBuild'){
sh "${mavenHome}/bin/mvn clean package"
// bat 'mvn package'
}
stage('3CodeQuality'){
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('4UploadArtifact'){
sh "${mavenHome}/bin/mvn deploy"
}
stage ('5Deploy2UAT'){
deploy adapters: [tomcat9(credentialsId: 'Git-Credentials3', path: '', url: 'http://3.90.86.197:8000/')], contextPath: null, war: 'target/*war'
}
stage('7.approval'){
timeout(time:8, unit:'HOURS'){
input message: 'Please approve deployment to Production'
}
}
stage('8.Deploy2prod'){
sshagent(['agent1-credentials']) {
sh "scp -o StrictHostKeyChecking=no target/*.war [email protected]:/opt/tomcat9/webapps/zahra.war"
}
}
stage('9. EmailAlerts'){
emailext body: '''Hi,

Please review build status for amazon app.

Regards,
Temmydayz''', recipientProviders: [developers(), requestor(), contributor()], subject: 'Project Status', to: '[email protected], [email protected]'
}
}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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:3.238.135.186:9000/</sonar.host.url>
<sonar.host.url>http:44.204.50.101:9000/</sonar.host.url>
<sonar.login>admin</sonar.login>
<sonar.password>admin</sonar.password>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -97,13 +97,13 @@
<repository>
<id>nexus</id>
<name>Landmark Technologies Releases Nexus Repository</name>
<url> http://44.192.81.238:8888/mylandmarktech/repository/ebay-java-app-releases/</url>
<url>http://54.84.23.217:8081/repository/pnc-releases/</url>
</repository>

<snapshotRepository>
<id>nexus</id>
<name>Landmark Technologies Snapshot Nexus Repository </name>
<url>http://44.192.81.238:8888/mylandmarktech/repository/ebay-java-app-snapshot/</url>
<url>http://54.84.23.217:8081/repository/pnc_snapshots/</url>
</snapshotRepository>

</distributionManagement>
Expand Down