diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index fd8510f..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,87 +0,0 @@ -@Library('my-maven-library')_ -pipeline{ - - agent { - label 'slave' - } - - tools { - jdk 'jdk' - maven 'Maven' - } - - environment { - image_built='' - image_tag='rishiray/hello-world:1.0' - dockerhub=credentials('dockerhub') - } - - stages{ - stage('Build') - { - steps { - mavenBuild() - } - } - - stage('test') - { - steps - { - runTests() - } - } - - stage('"Packaging, pushing to DockerHub') - { - when { - branch "Production" - } - stages - { - stage("Packaging the application into executable jar") - - { - steps - { - mavenPackage() - } - } - - stage("Building the docker image") - { - - steps - { - script - { - image_built=docker.build image_tag - - } - } - } - stage("Push the Image to DockerHub") - { - steps - { - script - { - docker.withRegistry('', 'dockerhub') - { - image_built.push() - image_built.push('latest') - } - } - } - } - } - } - } - post { - - always - { - emailext attachLog: true, body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'rishirai.iimt@gmail.com' - } - } - } diff --git a/README.md b/README.md index f89c320..b3731d2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Building and running locally +## Building and running locally here Once you clone the project to your local system, you can build and test locally by running: `mvn clean test` - for unit testing