I want to...
Hook into the artifact:build command when running a deploy command.
It's not working because...
When you run the deploy command, it triggers the artifact build using the classbuild() method (through either deployToTag() or deployToBranch()), and not by running the artifact:build command. Any command trying to hook into artifact:build never runs through a deploy command. The Acquia Documentation for extending BLT uses this hook as an example:
/**
* This will be called after the artifact:build command.
*
* @hook post-command artifact:build
*/
public function postArtifactBuild() {
$this->doSomething();
}
Detailed error output
If a BLT command is failing, run it again with the -vvv argument and post the full output here.
BLT doctor output
Post the full output of blt doctor in the failing environment here.
I want to... Hook into the
artifact:build
command when running adeploy
command.It's not working because... When you run the
deploy
command, it triggers the artifact build using the classbuild()
method (through eitherdeployToTag()
ordeployToBranch()
), and not by running theartifact:build
command. Any command trying to hook intoartifact:build
never runs through adeploy
command. The Acquia Documentation for extending BLT uses this hook as an example:Detailed error output If a BLT command is failing, run it again with the
-vvv
argument and post the full output here.BLT doctor output Post the full output of
blt doctor
in the failing environment here.System information