The simple trick here is, when creating your Docker build image (that is, the image that your “real” build runs in), you should execute the build. And if you do share the directory, you are highly likely to run out of disk space. Unless you share the cache directories from the host to the container, you get no benefit in subsequent builds despite previously downloading all dependencies. The problem is that most java builds (maven, gradle, whatever) need to download half the internet in the form of dependencies, before the compile phase can even begin. However, if you only move your builds to a standard Docker image, you’re missing a trick, in my opinion. The benefits are clear, a spotless environment for each build, easier debuggability (grab the container and run it locally), and “self-service” - no more talking to recalcitrant system admins to get a build tool added to the agents. With Bamboo 6.4 came the ability to run your builds in Docker (although you don’t need to wait for 6.4 if you don’t have it yet - more on that later). Using Docker to ensure all our dependencies are already downloaded and available gives us a huge advantage. We use Docker for all our builds and create a pre-seeded Docker image for each of our product variants.Īnalysing our builds before moving to Docker, showed that several minutes of each run was spent downloading dependencies - this increases our costs regarding agent running time and bandwidth and unintentionally leads our developers to twiddle their thumbs while they wait. If we add all these ‘saved’ minutes up it gives us back around fours hours of agent time per commit/push. At Adaptavist, we build four variants of our products and test them across around twenty five versions of the Atlassian apps, so eight Jira versions, four Bamboo versions and similar numbers for Confluence and Bitbucket.įor each of these Bamboo tasks (build and test) we have reduced the running time by around ten minutes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |