From 8d2a1bc55e71f9c0aec988665fad5037abf21026 Mon Sep 17 00:00:00 2001 From: sundayenglish Date: Tue, 29 Oct 2024 11:44:46 +0700 Subject: [PATCH] first commit --- Jenkinsfile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 22a9efc..808b470 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,28 @@ -echo 1 \ No newline at end of file +pipeline { + agent any + environment { + GIT_URL = 'https://github.com/username/repository.git' + BRANCH = 'main' + DEST_DIR = '/path/to/your/deployment/folder' + } + 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." + } + } +}