Loading .build_composer.yml +9 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,13 @@ composer --no-dev audit; fi .run_composer_post_install: &run_composer_post_install | if [ -e $COMPOSER_INSTALL_DIR/composer.lock ] && grep -q '"cetera-labs/cetera-cms"' $COMPOSER_INSTALL_DIR/composer.lock; then cd $COMPOSER_INSTALL_DIR; composer run-script --no-dev post-update-cmd; fi .run_composer_install_prod: &run_composer_install_prod | if [ -e $COMPOSER_INSTALL_DIR/composer.json ]; then Loading Loading @@ -92,6 +99,7 @@ - *run_composer_audit - *tune_autoload_prod - *run_composer_install_prod - *run_composer_post_install only: refs: - beta Loading @@ -103,4 +111,5 @@ artifacts: paths: - "vendor/" - "www/cms/" expire_in: 1 day .deploy_composer_files_to_server.yml +9 −3 Original line number Diff line number Diff line .upload_composer_files: &upload_composer_files | if [ -d "$CI_PROJECT_DIR/$COMPOSER_ARTIFACTS_DIR" ]; then echo "RUNNING rsync -L -avz $RSYNC_PARAMS" \ "--chown=$user:$group -e ssh" \ "$CI_PROJECT_DIR/$COMPOSER_ARTIFACTS_DIR $DEPLOY_HOST_PATH/$COMPOSER_SERVER_DIR" rsync $RSYNC_ADMIN_PARAMS $RSYNC_PARAMS -e "ssh $SSH_OPTS" $CI_PROJECT_DIR/$COMPOSER_ARTIFACTS_DIR $DEPLOY_HOST_PATH/$COMPOSER_SERVER_DIR; fi .upload_cms_files: &upload_cms_files | if [ -d "$CI_PROJECT_DIR/$CMS_ARTIFACTS_DIR" ]; then rsync $RSYNC_ADMIN_PARAMS $RSYNC_PARAMS -e "ssh $SSH_OPTS" $CI_PROJECT_DIR/$CMS_ARTIFACTS_DIR $DEPLOY_HOST_PATH/$CMS_SERVER_DIR; fi .deploy_composer_files_to_server: extends: .before_deploy_code variables: RSYNC_PARAMS: '--delete' COMPOSER_ARTIFACTS_DIR: vendor/ COMPOSER_SERVER_DIR: vendor/ CMS_ARTIFACTS_DIR: www/cms/ CMS_SERVER_DIR: ${DOC_ROOT_NAME}/cms/ dependencies: - build_composer - setup_environment_vars script: - *upload_composer_files - *upload_cms_files only: refs: - beta Loading tests/integration/extract_scripts.py +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ def main(output_dir): f.write(composer['.upload_composer_files']) print(f'Written {path}') path = os.path.join(output_dir, 'upload_cms_files.sh') with open(path, 'w') as f: f.write(composer['.upload_cms_files']) print(f'Written {path}') if __name__ == '__main__': main(sys.argv[1] if len(sys.argv) > 1 else '/tmp/generated') tests/integration/fixtures/project/www/cms/module.php 0 → 100644 +2 −0 Original line number Diff line number Diff line <?php // CMS module fixture for integration tests tests/integration/fixtures/recipient-seed/www/cms/stale-cms-file.html 0 → 100644 +1 −0 Original line number Diff line number Diff line <!-- stale CMS file: should be removed by rsync --delete --> Loading
.build_composer.yml +9 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,13 @@ composer --no-dev audit; fi .run_composer_post_install: &run_composer_post_install | if [ -e $COMPOSER_INSTALL_DIR/composer.lock ] && grep -q '"cetera-labs/cetera-cms"' $COMPOSER_INSTALL_DIR/composer.lock; then cd $COMPOSER_INSTALL_DIR; composer run-script --no-dev post-update-cmd; fi .run_composer_install_prod: &run_composer_install_prod | if [ -e $COMPOSER_INSTALL_DIR/composer.json ]; then Loading Loading @@ -92,6 +99,7 @@ - *run_composer_audit - *tune_autoload_prod - *run_composer_install_prod - *run_composer_post_install only: refs: - beta Loading @@ -103,4 +111,5 @@ artifacts: paths: - "vendor/" - "www/cms/" expire_in: 1 day
.deploy_composer_files_to_server.yml +9 −3 Original line number Diff line number Diff line .upload_composer_files: &upload_composer_files | if [ -d "$CI_PROJECT_DIR/$COMPOSER_ARTIFACTS_DIR" ]; then echo "RUNNING rsync -L -avz $RSYNC_PARAMS" \ "--chown=$user:$group -e ssh" \ "$CI_PROJECT_DIR/$COMPOSER_ARTIFACTS_DIR $DEPLOY_HOST_PATH/$COMPOSER_SERVER_DIR" rsync $RSYNC_ADMIN_PARAMS $RSYNC_PARAMS -e "ssh $SSH_OPTS" $CI_PROJECT_DIR/$COMPOSER_ARTIFACTS_DIR $DEPLOY_HOST_PATH/$COMPOSER_SERVER_DIR; fi .upload_cms_files: &upload_cms_files | if [ -d "$CI_PROJECT_DIR/$CMS_ARTIFACTS_DIR" ]; then rsync $RSYNC_ADMIN_PARAMS $RSYNC_PARAMS -e "ssh $SSH_OPTS" $CI_PROJECT_DIR/$CMS_ARTIFACTS_DIR $DEPLOY_HOST_PATH/$CMS_SERVER_DIR; fi .deploy_composer_files_to_server: extends: .before_deploy_code variables: RSYNC_PARAMS: '--delete' COMPOSER_ARTIFACTS_DIR: vendor/ COMPOSER_SERVER_DIR: vendor/ CMS_ARTIFACTS_DIR: www/cms/ CMS_SERVER_DIR: ${DOC_ROOT_NAME}/cms/ dependencies: - build_composer - setup_environment_vars script: - *upload_composer_files - *upload_cms_files only: refs: - beta Loading
tests/integration/extract_scripts.py +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ def main(output_dir): f.write(composer['.upload_composer_files']) print(f'Written {path}') path = os.path.join(output_dir, 'upload_cms_files.sh') with open(path, 'w') as f: f.write(composer['.upload_cms_files']) print(f'Written {path}') if __name__ == '__main__': main(sys.argv[1] if len(sys.argv) > 1 else '/tmp/generated')
tests/integration/fixtures/project/www/cms/module.php 0 → 100644 +2 −0 Original line number Diff line number Diff line <?php // CMS module fixture for integration tests
tests/integration/fixtures/recipient-seed/www/cms/stale-cms-file.html 0 → 100644 +1 −0 Original line number Diff line number Diff line <!-- stale CMS file: should be removed by rsync --delete -->