| Server IP : 13.126.101.145 / Your IP : 216.73.216.131 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/rentals_updated/wp-content/ |
Upload File : |
script{
PROJECT_PATH ='/var/www/html/wp-content'
BUNDLE_NAME = "bundle.tar.gz"
}
node(){
stage('Cloning Git') {
dir('package') {
checkout scm
}
echo "SUCCESS :: Git project cloaning done."
}
stage('Package Build') {
sh "tar --exclude=package/.git -zcvf ${BUNDLE_NAME} package"
}
stage('Artifacts Creation') {
fingerprint "${BUNDLE_NAME}"
archiveArtifacts "${BUNDLE_NAME}"
echo "SUCCESS :: Artifacts created"
}
stage('Stash changes') {
stash allowEmpty: true, includes: "${BUNDLE_NAME}", name: 'buildArtifacts'
}
stage('CleanWorkspace') {
cleanWs()
}
}
node('EC2_GMMCO_DEV') {
echo 'START :: Unstashing ....'
unstash 'buildArtifacts'
echo 'SUCCESS :: Artifacts copied to server'
echo 'SUCCESS :: Copy Start'
sh "yes | sudo cp -R ${BUNDLE_NAME} ${PROJECT_PATH} && cd ${PROJECT_PATH} && sudo tar -xvf ${BUNDLE_NAME} --strip-components=1"
echo 'SUCCESS :: Copy completed.'
echo 'SUCCESS :: Removinging Bundle'
sh "yes | sudo rm -r ${PROJECT_PATH}/${BUNDLE_NAME}"
echo 'SUCCESS :: Bundle file removed.'
sh "sudo chmod 777 -R ${PROJECT_PATH}"
echo 'SUCCESS :: Package install done.'
}