Skip to content

Script path and 404 while running your Quicksilver operation #182

@jigarius

Description

@jigarius

The problem

  • I followed the instructions on this README and created a similar script.
    • I put my script under web/private and it didn't work.
    • I put it under scripts/quicksilver/custom/drupal-deploy.php and mentioned correctly in the pantheon.yml but it still didn't work
  • The script doesn't work and the error message is not clear.
    • I get 404 while running your Quicksilver operation, but I'm not sure how I get a 404 if all I'm trying to do is run a script.
    • Also, since this is a script that is not to be accessed by the public, I wonder why the README suggests putting it inside web/private instead of private/ or scripts/.

/pantheon.yml

api_version: 1
web_docroot: true
php_version: 7.4
database:
  version: 10.4
workflows:
  sync_code:
    after:
      - type: webphp
        description: Run drush-deploy on test and live
        script: scripts/quicksilver/custom/drush-deploy.php

/scripts/quicksilver/custom/drush-deploy.php

<?php

// Do nothing if not on Pantheon test/live environments.
if (!in_array($_ENV['PANTHEON_ENVIRONMENT'], ['test', 'live'])) {
  return;
}

$commands = [
  'drush updatedb --no-cache-clear --yes',
  'drush cache:rebuild',
  'drush config:import --yes',
  'drush cache:rebuild',
  'drush config:import --yes',
  'drush cache:rebuild',
  'drush locale:check',
  'drush locale:update',
  'drush deploy:hook',
  'drush cache:rebuild',
];

foreach ($commands as $command) {
  echo "Running: $command" . PHP_EOL;
  passthru($command);
}

I wonder what's going on? What does 404 while running your Quicksilver operation mean?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions