diff --git a/.classpath b/.classpath
deleted file mode 100644
index eb4c411..0000000
--- a/.classpath
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.project b/.project
deleted file mode 100644
index e2c3574..0000000
--- a/.project
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
- devOpsWeb
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.wst.common.project.facet.core.builder
-
-
-
-
- org.eclipse.wst.validation.validationbuilder
-
-
-
-
- org.eclipse.m2e.core.maven2Builder
-
-
-
-
-
- org.eclipse.jem.workbench.JavaEMFNature
- org.eclipse.wst.common.modulecore.ModuleCoreNature
- org.eclipse.jdt.core.javanature
- org.eclipse.m2e.core.maven2Nature
- org.eclipse.wst.common.project.facet.core.nature
- org.eclipse.wst.jsdt.core.jsNature
-
-
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 88fe618..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM tomcat:8.0
-
-ADD ./target/*.war /usr/local/tomcat/webapps/
-
-EXPOSE 8080
-
-WORKDIR /usr/local/tomcat/webapps/
-
-CMD ["catalina.sh", "run"]
-
diff --git a/Jenkinsfile b/Jenkinsfile
index f722447..0cf59d1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -2,33 +2,43 @@ pipeline {
agent any
tools {
- maven 'local_maven'
+ jdk 'java8'
+ maven 'localMaven'
}
parameters {
- string(name: 'staging_server', defaultValue: '13.232.37.20', description: 'Remote Staging Server')
+ choice(name: 'environ', choices: ['Dev', 'pre-prod', 'prod'], description: 'Environment List')
+ string(name: 'username', defaultValue: 'ranjitkumar', description: 'USer name')
+ password(name: 'PASSWORD', defaultValue: 'SECRET', description: 'Enter a password')
}
-
-stages{
- stage('Build'){
- steps {
- sh 'mvn clean package'
- }
- post {
- success {
- echo 'Archiving the artifacts'
- archiveArtifacts artifacts: '**/target/*.war'
+ environment {
+ fname = "Ranjit"
+ lname = "Swain"
+ version = "1.2"
+ system = "Dev"
+ }
+
+ stages{
+ stage('Build Java Application'){
+ steps {
+ echo "My name is ${fname}"
+ echo "Executed from ${params.environ}"
+ echo "Executed by ${params.username} and password provided as ${params.PASSWORD}"
}
- }
- }
-
- stage ('Deployments'){
- parallel{
- stage ("Deploy to Staging"){
- steps {
- sh "scp -v -o StrictHostKeyChecking=no **/*.war root@${params.staging_server}:/opt/tomcat/webapps/"
+ post {
+ success {
+ echo 'Post section triggered'
}
}
}
+ stage('Deploy'){
+ steps{
+ echo "Deployment Triggered"
+ }
+ }
+ }
+ post {
+ success{
+ echo "Pipeline completed successfully"
}
}
}
diff --git a/Jenkinsfile_1.0 b/Jenkinsfile_1.0
deleted file mode 100644
index d030fb6..0000000
--- a/Jenkinsfile_1.0
+++ /dev/null
@@ -1,45 +0,0 @@
-pipeline {
- agent any
-
- tools {
- maven 'localMaven'
- }
- parameters {
- string(name: 'tomcat_stag', defaultValue: '13.59.108.184', description: 'Node1-Remote Staging Server')
- string(name: 'tomcat_prod', defaultValue: '18.219.228.98', description: 'Node2-Remote Production Server')
- }
-
- triggers {
- pollSCM('* * * * *')
- }
-
-stages{
- stage('Build'){
- steps {
- sh 'mvn clean package'
- }
- post {
- success {
- echo 'Archiving the artifacts'
- archiveArtifacts artifacts: '**/target/*.war'
- }
- }
- }
-
- stage ('Deployments'){
- parallel{
- stage ('Deploy to Staging'){
- steps {
- sh "scp **/*.war jenkins@${params.tomcat_stag}:/usr/share/tomcat/webapps/"
- }
- }
-
- stage ("Deploy to Production"){
- steps {
- sh "scp **/*.war jenkins@${params.tomcat_prod}:/usr/share/tomcat/webapps/"
- }
- }
- }
- }
- }
-}
diff --git a/Jenkinsfile_Docker_Local b/Jenkinsfile_Docker_Local
deleted file mode 100644
index 7f7c1cc..0000000
--- a/Jenkinsfile_Docker_Local
+++ /dev/null
@@ -1,14 +0,0 @@
-pipeline{
- agent any
- tools {
- maven 'localMaven'
- }
- stages{
- stage('Build'){
- steps{
- sh 'mvn clean package'
- sh "docker build . -t tomcatwebapp:${env.BUILD_ID}"
- }
- }
- }
-}
diff --git a/Jenkinsfile_Docker_Remote b/Jenkinsfile_Docker_Remote
deleted file mode 100644
index cf138a7..0000000
--- a/Jenkinsfile_Docker_Remote
+++ /dev/null
@@ -1,15 +0,0 @@
-pipeline{
- agent any
- tools {
- maven 'localMaven'
- }
- stages{
- stage('Build'){
- steps{
- sh 'mvn clean package'
- sh 'scp Dockerfile centos@3.17.61.170'
- sh 'ssh centos@3.17.61.170 "docker build . -t tomcatwebapp:${env.BUILD_ID}"'
- }
- }
- }
-}
diff --git a/build.cnf b/build.cnf
new file mode 100644
index 0000000..036777f
--- /dev/null
+++ b/build.cnf
@@ -0,0 +1,4 @@
+deploy.App.Name=devOpsWeb
+deploy.env=sandBox
+deploy.type=prod
+deploy.version=1.2.2
diff --git a/src/main/webapp/template.xhtml b/src/main/webapp/template.xhtml
index 1b85a5d..6d40fc9 100644
--- a/src/main/webapp/template.xhtml
+++ b/src/main/webapp/template.xhtml
@@ -10,7 +10,7 @@
-DevOps class - Ranjit Swain - Version: 2.0 - Batch4
+DevOps class - Ranjit Swain - Version: 2.8 - Batch B11 Demo Class
Just an example! - Webhook