diff --git a/Jenkinsfile b/Jenkinsfile index 889c8e62..de41fc22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,69 +1,15 @@ pipeline { - - agent { - node { - label 'master' - } - } - - options { - buildDiscarder logRotator( - daysToKeepStr: '16', - numToKeepStr: '10' - ) - } + agent any stages { - - stage('Cleanup Workspace') { - steps { - cleanWs() - sh """ - echo "Cleaned Up Workspace For Project" - """ - } - } - - stage('Code Checkout') { - steps { - checkout([ - $class: 'GitSCM', - branches: [[name: '*/main']], - userRemoteConfigs: [[url: 'https://github.com/spring-projects/spring-petclinic.git']] - ]) - } - } - - stage(' Unit Testing') { + stage('Print Value') { steps { - sh """ - echo "Running Unit Tests" - """ + script { + def myValue = "Hello, Jenkins!" + echo "My value is in develop-test branch: ${myValue}" + } } } - - stage('Code Analysis') { - steps { - sh """ - echo "Running Code Analysis" - """ - } - } - - stage('Build Deploy Code') { - when { - branch 'develop' - } - steps { - sh """ - echo "Building Artifact" - """ - - sh """ - echo "Deploying Code" - """ - } - } - - } + // Add more stages as needed + } } diff --git a/README.md b/README.md index 384308a8..eb6bdb65 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # multibranch-pipeline-demo -Jenkins Multibranch Pipeline Example Repo +Jenkins Multibranch Pipeline Example Repo 1