andres-montanez / Magallanes

The PHP Deployment Tool
https://magephp.com
MIT License
691 stars 169 forks source link

[#336] Implementation system execute #348

Closed duraki closed 7 years ago

duraki commented 7 years ago

As written in #336 I'm sending a pull request with equivalent action, a base model for execution of file through configuration file, rather then writing new task for specific execution.

The bundle is called System, since in the near future I'd implement a various ops-based scenarios, as an example of these are: Get uptime, Get environment, Return kernel version, Execute etc.

Usage is fairly simple as this is built-in task.

The task expect two parameters:

Example of usage (will restart all supervisor jobs @ on-deploy phase):


    environments:
        production:
            on-deploy:
                - system/exec: { exec: 'supervisorctl', arg: 'restart all' }```
coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.8%) to 99.231% when pulling 292ec4b124d69382ae7781bc4c360e1642ed1225 on dn5:impl-system-kernel into b36f90e80a2a1c5906c8ed21ab74fe21ef5d1485 on andres-montanez:nostromo.