|
|
@ -8,17 +8,9 @@ pipeline { |
|
|
|
stages { |
|
|
|
stages { |
|
|
|
stage('Checkout Code') { |
|
|
|
stage('Checkout Code') { |
|
|
|
steps { |
|
|
|
steps { |
|
|
|
// Jenkins Git plugin will handle the clone and checkout automatically |
|
|
|
sh "git pull origin ${BRANCH}" |
|
|
|
// checkout([ |
|
|
|
|
|
|
|
// $class: 'GitSCM', |
|
|
|
|
|
|
|
// branches: [[name: "*/${BRANCH}"]], |
|
|
|
|
|
|
|
// userRemoteConfigs: [[url: GIT_URL]] |
|
|
|
|
|
|
|
// ]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sh "cd /projects" |
|
|
|
|
|
|
|
sh "pwd" |
|
|
|
|
|
|
|
sh "git --version" |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
sh "pwd" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
post { |
|
|
|
post { |
|
|
@ -29,4 +21,4 @@ pipeline { |
|
|
|
echo "Failed to pull code from the repository." |
|
|
|
echo "Failed to pull code from the repository." |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |