Best way to approach build + fan-out

workflow

#1

Starting to work with workflows and got a basic “run against multiple version of PHP” setup working for one project. But now trying to apply workflows to our main API project and having some difficulty. It seems like you are supposed to be able to build the project in one job, and then the other jobs that need that built code can use it when its done. Is the best way to move this built code from job to job shoving your entire built application into cache and then restoring it? Or is there something I’m missing?


#2

Instead of using caching for built things, you should use workspaces:

https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-artifacts-among-jobs

The cache should be used for things like node_modules


#3

Wow, I literally read that section when the docs first came out… and then apparently forgot completely. I knew there was a better way.

Yea we are using caching to save the local composer cache so that compost installs are mostly just copying from one folder to another.

Gonna give workspaces a try now


#4

You’ve been here for the release of every new feature- don’t be too hard on yourself :stuck_out_tongue:


#5

Workspaces working perfectly. Another weird issue came up, but is unrelated so gonna open another topic


#6

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.