diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 00000000..93caa96e --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,15 @@ +node('maven'){ + stage('checkout'){ + echo "cloning the repo" + git credentialsId: 'Agent1-ssh-key', url: 'https://github.com/Nyuyfoni13/sample-java-project.git' + + } + stage('runningscript'){ + echo " Running the script" + sh "sh test.sh" + } + stage('Final'){ + echo " This job is completed and successfully saved" + } +} + diff --git a/test.sh b/test.sh new file mode 100644 index 00000000..c1b0521c --- /dev/null +++ b/test.sh @@ -0,0 +1,4 @@ +#!/bin/bash +echo "first line of code" +echo "second line of code" +echo " third line of code"