Currently, the only way to set a makefile in a context appears to be in the front-end through the form at node/add/platform which then passes a variable to hosting_hosting_platform_context_options(&$task).

But we appear to initialize the property in provisionContext_platform:

  function init_platform() {
    $this->setProperty('root');
    $this->setProperty('makefile', '');
  }

If we're building a platform programatically (from outside of Aegir), the only way I can see to do it is to build the platform using 'drush make' directly, then reference the platform using the '--root' in 'drush provision-save', before going on to call 'provision-verify'. But then the makefile property in the platform context remains blank.

If we lose all reference to the makefile actually used to build the platform, it becomes much harder to rebuild it, should this become necessary. Such as if we wanted to clone such a platform, as in #906936: Allow creation of a platform using an existing platform's information.

Comments

steven jones’s picture

Status: Active » Closed (works as designed)

You can do this really easily already, e.g.:

drush provision-save @platform_test --context_type=platform --root=/var/aegir/platform/test --makefile='/path/to/make/file/drupal7.make'

Then to get the make to run:

drush @platform_test provision-verify
ergonlogic’s picture

Component: Code » Documentation
Category: feature » task
Status: Closed (works as designed) » Needs review
StatusFileSize
new1.15 KB

Ah, that's good to know.

I guess this needs to be documented then... :p

Anonymous’s picture

Status: Needs review » Fixed

Thanks! I applied your patch so you retain credit, and then also made a small improvement on the wording to be explicit that it's a Drush makefile and that it's to be used when the codebase doesn't already exist yet.

steven jones’s picture

Thanks to both of you, I've cherry-picked those commits into 6.x-2.x too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit beeff60 on 6.x-1.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by ergonlogic, committed by mig5:
    Issue #1336838: Added documentation for --makefile to provision-save,...
  • Commit 94e6e96 on 6.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by ergonlogic, committed by Steven Jones:
    Issue #1336838: Added documentation for --makefile to provision-save,...