Set-up Engine's VM
Last updated
Last updated
Setting up Engine's VM for each of your repos will significantly improve performance. It enables Engine to run code & fix errors and perform pre commit actions like linting & testing. Think of it like setting up a new hire's machine.
Often when installing software you need to update the
$PATH
variable. You can do this by adding a command to edit Engine’s.bash_profile
like this
echo 'export PATH="/home/engine/.local/bin:$PATH"' >> ~/.bash_profile
To do this, navigate to your repositories on the Engine dashboard. Then, click the 'Task VM' button on the relevant repo.
Here, you can configure setup commands and pre-commit checks.
Setup commands are executed before a task starts. Use this to install or configure services necessary for your code to run
Pre-commit checks are run when Engine is done working before it commits your code. Run linting, tests or build your code. If Engine encounters errors here, it will continue working before attempting pre-commit checks again.
To add a command, select the 'Add command' button in the relevant section. Give it a name and enter the command Engine should run. Commands must be non-interactive and cannot require user input.
You are strongly advised to test any changes made to the task VM and ensure they pass. Just click 'Run test' at the top of the page and wait for the result to be displayed.
If Engine's VM is not configured or has not passed a test you will receive a warning in the app when you run tasks.
You can remove commands by clicking the trash can icon and rearrange them using the arrow buttons next to each command.