@servers(['web' => $user.'@'.$host,'localhost' => '127.0.0.1']) @setup // Sanity checks if (isset($host)) { if (empty($host)) { exit('ERROR: $host var empty or not defined'); } } if (isset($user)) { if (empty($user)) { exit('ERROR: $user var empty or not defined'); } } if (isset($php)) { if (empty($php)) { exit('ERROR: $php var empty or not defined'); } } if (isset($code_directory)) { if (empty($code_directory)) { exit('ERROR: $code_directory var empty or not defined'); } } // Command or path to invoke PHP $php = empty($php) ? 'php' : $php; @endsetup @story('exampleCommands') pipeline_task server_task @endstory @task('pipeline_task', ['on' => 'localhost']) echo "* Running example command on the Bitbucket Pipeline server *" hostname ls -la ls -la {{ $code_directory }} @endtask @task('npm-build', ['on' => 'localhost']) npm run watch @endtask @task('server_task', ['on' => 'web']) cd /var/www/aas/staging.api.aas.codespace.co.za/ git pull composer install --no-interaction composer dumpautoload php artisan config:clear php artisan migrate php artisan db:seed --class=RolesAndPermissionsSeeder @endtask