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 { git branch: "${BRANCH}", url: "${GIT_URL}" } } stage('Copy Code to Server Directory') { steps { sh "cp -R * ${DEST_DIR}/" } } } post { success { echo "Code has been successfully pulled and copied to ${DEST_DIR}" } failure { echo "Failed to pull code from the repository." } } }