parent
c6c2f434dc
commit
5082a34697
1 changed files with 25 additions and 0 deletions
@ -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." |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue