For one reason or another I’m under the impression that each build get it’s own workspace, and that each job you create works on the same workspace? It seems however this isn’t the case.
I’m finding for each job I define, any changes made in the previous job isn’t available.
I’ve created some jobs in my .yml file to do the following;
Job1 - run ‘composer update’ to install any dependencies for the project using composer
Job2 - run ‘phpunit’ to run any tests in the project
Job3 - cleanup any files not needed for the actual build
Job4 - upload all files to FTP using ncftp
The issue I seem to be having is that Job2 throws error because packages that should have been installed by composer don’t exist. I know that I can use ‘before-script’ to run composer before each job, but then I’m struggling to understand what the purpose of having multiple jobs is, surely you could just put everything under one job and be done with it.
I do apologise if this comes across as a bit basic, but this is something I’m struggling to find any clear documentation for online.