You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a "acquia_deploy.php" that uses blt and robo to launch deploys. It works great except I can't seem to do simple things like get the task UUID back from an acquia launched task. Since I am a command line junky I like to do all things Acquia admin via the command line even though the Acquia web interface does all this for you.
For example I have this batch script that copies the prod db down to the dev db as well as the files. After it launches those tasks it extracts the returned task UUID and launches another (sleep & and check status) bash script that will tell me when the task is done. This is very handy and I use it all the time
#!/bin/bash -xv
# Copy the database and files from production to dev.
# Arg 1 should be either "dev" or "test" to specify a destination.
db_copy_task=$(acli api:environments:database-copy @xxxx.$1 xxxxx @xxxx.prod | jq '._links.notification.href')
file_copy_task=$(acli api:environments:file-copy @xxxxx.$1 --source=xxxxx-26f2-8a24-9d30-ad706573714a | jq '.links.notification.href')
bin/acli_task_mon \"${db_copy_task##*/}
bin/acli_task_mon \"${file_copy_task##*/}
I'd love to be able to capture the returned task ID from the acli command WITHIN ROBO but from what I can tell there is no return data returned.
So for example here is the code-switch call in robo:
The text was updated successfully, but these errors were encountered:
danshumaker
changed the title
_exec return code for task capturing?? (Feature Request)
How to get _exec return Message & Data for task capturing?? (Feature Request)
Sep 29, 2022
I wrote a "acquia_deploy.php" that uses blt and robo to launch deploys. It works great except I can't seem to do simple things like get the task UUID back from an acquia launched task. Since I am a command line junky I like to do all things Acquia admin via the command line even though the Acquia web interface does all this for you.
For example I have this batch script that copies the prod db down to the dev db as well as the files. After it launches those tasks it extracts the returned task UUID and launches another (sleep & and check status) bash script that will tell me when the task is done. This is very handy and I use it all the time
I'd love to be able to capture the returned task ID from the acli command WITHIN ROBO but from what I can tell there is no return data returned.
So for example here is the code-switch call in robo:
Can I get a returned string from the _exec call?
Possibly from: https://github.com/consolidation/robo/blob/4.x/src/Task/Base/Shortcuts.php#L16
or https://github.com/consolidation/robo/blob/4.x/src/Task/Base/Tasks.php#L14
or https://github.com/consolidation/robo/blob/4.x/src/Task/Base/Exec.php#L140
It looks like what I want is in the Result data? or Result message?
But it's not clear exactly how to get the data or message. Can anyone provide an example please?
https://github.com/consolidation/robo/blob/4.x/src/ResultData.php
Thank you.
The text was updated successfully, but these errors were encountered: