Loading before_script.yml +1 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ setup_environment_vars: name: $ENVIRONMENT_NAME before_script: - *set_ssh_keys - export DEPLOY_HOST_PATH="${DEPLOY_HOST_PATH_OVERRIDE:-$DEPLOY_HOST_PATH}" - echo $DEPLOY_HOST_PATH - echo "set project root perms to $PROJECT_ROOT_PERMS" script: [] Loading tests/integration/tests/deploy_composer_files_to_server.bats +18 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,24 @@ setup() { assert_success } @test "deploy composer: DEPLOY_HOST_PATH_OVERRIDE redirects rsync to alternate path" { ssh_root mkdir -p /var/www/alt-vhost # Simulate .before_deploy_code before_script applying the job-level override export DEPLOY_HOST_PATH_OVERRIDE="root@$RECIPIENT_HOST:/var/www/alt-vhost" export DEPLOY_HOST_PATH="${DEPLOY_HOST_PATH_OVERRIDE:-$DEPLOY_HOST_PATH}" run run_deploy_composer assert_success run ssh_root test -f "/var/www/alt-vhost/vendor/acme/Foo.php" assert_success # acme/Foo.php is not in recipient-seed, so finding it at PROJECT_ROOT would mean the override was ignored run ssh_root test -f "$PROJECT_ROOT/vendor/acme/Foo.php" assert_failure } @test "deploy composer: stale cms file is removed when deploying cms path" { export COMPOSER_DEPLOY_PATHS="vendor/:vendor/ www/cms/:${DOC_ROOT_NAME}/cms/" setup_env Loading Loading
before_script.yml +1 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ setup_environment_vars: name: $ENVIRONMENT_NAME before_script: - *set_ssh_keys - export DEPLOY_HOST_PATH="${DEPLOY_HOST_PATH_OVERRIDE:-$DEPLOY_HOST_PATH}" - echo $DEPLOY_HOST_PATH - echo "set project root perms to $PROJECT_ROOT_PERMS" script: [] Loading
tests/integration/tests/deploy_composer_files_to_server.bats +18 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,24 @@ setup() { assert_success } @test "deploy composer: DEPLOY_HOST_PATH_OVERRIDE redirects rsync to alternate path" { ssh_root mkdir -p /var/www/alt-vhost # Simulate .before_deploy_code before_script applying the job-level override export DEPLOY_HOST_PATH_OVERRIDE="root@$RECIPIENT_HOST:/var/www/alt-vhost" export DEPLOY_HOST_PATH="${DEPLOY_HOST_PATH_OVERRIDE:-$DEPLOY_HOST_PATH}" run run_deploy_composer assert_success run ssh_root test -f "/var/www/alt-vhost/vendor/acme/Foo.php" assert_success # acme/Foo.php is not in recipient-seed, so finding it at PROJECT_ROOT would mean the override was ignored run ssh_root test -f "$PROJECT_ROOT/vendor/acme/Foo.php" assert_failure } @test "deploy composer: stale cms file is removed when deploying cms path" { export COMPOSER_DEPLOY_PATHS="vendor/:vendor/ www/cms/:${DOC_ROOT_NAME}/cms/" setup_env Loading