parent
29aff059fa
commit
8d2a1bc55e
1 changed files with 28 additions and 1 deletions
@ -1 +1,28 @@ |
|||||||
echo 1 |
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." |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
Loading…
Reference in new issue