From 5082a34697b6bcbfd4c4d80d56fa940432ab3332 Mon Sep 17 00:00:00 2001 From: sundayenglish Date: Tue, 29 Oct 2024 17:01:45 +0700 Subject: [PATCH] add --- pipeline.groovy | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pipeline.groovy diff --git a/pipeline.groovy b/pipeline.groovy new file mode 100644 index 0000000..0811c2d --- /dev/null +++ b/pipeline.groovy @@ -0,0 +1,25 @@ +pipeline { + agent any + environment { + GIT_URL = 'http://git.gkcorp.com.vn:16000/sundayenglish/test-project.git' + BRANCH = 'master' + DEST_DIR = '/projects/test-project' + } + stages { + stage('Checkout Code') { + steps { + sh "cd ${DEST_DIR} && git pull origin ${BRANCH}" + // sh "touch demo.php" + sh "pwd" + } + } + } + post { + success { + echo "Code has been successfully pulled and copied to ${DEST_DIR}" + } + failure { + echo "Failed to pull code from the repository." + } + } +}