Commit 1b27aeef authored by mirkoschmidt's avatar mirkoschmidt

Change staging jobs. Use rsync instead of directly unzipping

parent 6afce8fe
......@@ -4,6 +4,7 @@ stages:
- build
- deploy
- cleanUp
- stagingPre
- staging
.testingScript: &testingScript |
......@@ -95,17 +96,23 @@ stages:
}
.devCheckoutScripts: &devCheckoutScripts |
export FILENAME="jtl_paypal-${CI_COMMIT_REF_NAME//[\/\.]/-}";
export EXTRACTION_PATH="$RUNNER_PATH/jtl_paypal";
function downloadProcess() {
export RUNNER_PATH_ZIP="$RUNNER_PATH/$FILENAME.zip";
export DOWNLOAD_URL="https://build.jtl-shop.de/get/$FILENAME.zip";
curl -o $RUNNER_PATH_ZIP $DOWNLOAD_URL
unzip -qo $RUNNER_PATH_ZIP -d $RUNNER_PATH
rm $RUNNER_PATH_ZIP
}
function deployProcess() {
export PHP_VERSION=$1;
export BRANCH=$2;
export FILENAME="jtl_paypal-${CI_COMMIT_REF_NAME//[\/\.]/-}.zip";
export DOWNLOAD_PATH="$STAGING_USER_PATH/php$PHP_VERSION/$BRANCH/includes/plugins";
export DOWNLOAD_PATH_ZIP="$DOWNLOAD_PATH/$FILENAME";
export DOWNLOAD_URL="https://build.jtl-shop.de/get/$FILENAME";
curl -o $DOWNLOAD_PATH_ZIP $DOWNLOAD_URL
unzip -qo "$DOWNLOAD_PATH_ZIP" -d "$DOWNLOAD_PATH/jtl_paypal_dev" && rsync -rt --delete-after "$DOWNLOAD_PATH/jtl_paypal_dev/jtl_paypal/." "$DOWNLOAD_PATH/jtl_paypal_dev/"
rm $DOWNLOAD_PATH_ZIP
export DEPLOY_PATH="$STAGING_USER_PATH/php$PHP_VERSION/$BRANCH/includes/plugins/jtl_paypal_dev";
sudo /usr/bin/rsync -rt -og --chown=www-data:www-data $EXTRACTION_PATH/. $DEPLOY_PATH
}
test_PHP_5.6:
......@@ -283,6 +290,18 @@ removeContainer:
tags:
- build
stagingPreDeploy:
stage: stagingPre
variables:
GIT_STRATEGY: none
script:
- *devCheckoutScripts
- downloadProcess
only:
- master
tags:
- dev-checkout
stagingDevRelease406Php56:
stage: staging
variables:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment