You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
My question is regarding a plans default job and the role that job has when there are multiple environments configured for that plan. What I'm trying to solve is why the Bamboo artifacts, generated every time we deploy a build, contain each of the environments Git repositories which is consuming a ton of disk space on our server.
For example, we have a plan that has a default job that runs a a Git checkout for three separate Git repositories. I'll call this plan "Test Plan." Test Plan has three separate environments setup: dev, staging, production. Each of the environments has a single task that executes a Git pull of their respective Git branches.
My question is if I run a deployment, for the dev environment in the Test Plan will the Test Plan's default job execute every time I deploy dev? This seems to be the case which would explain why the artifacts contain all three of the environments Git repositories.
This setup does not look correct to me. I would think that if there is multiple environments configured for a single plan then there should not be a default plan job for the example I outlined above. Each environment should have their own tasks; a Git checkout and a Git pull. But what if I don't want the Git checkout to actually run if a repo already exists in the destination?
Simply put my expectation would be that, if I deploy the dev environment then the resulting Bamboo build artifact should only contain the Git files for that environment. The artifact should not include respositories from staging and produciton.
If I left out key information that would prevent you from being able to accurately provide any helpful feedback please let me know.
You're right, a deployment environment shouldn't be deploying all environments artifacts but it's a little hard to work out why that's happening without seeing your configuration. It sounds like you're utilizing deployment projects, but I guess your 'Test Plan' build plan could be executing the deployment tasks too?
I'll try to describe how you might set something like this up typically using your current Test Plan:
It sounds like currently, either you only have one artifact definition that packages up all the repositories or your Artifact download tasks within your deployment environments are set to download All artifacts instead of the environment specific artifact.
Hope this helps. :)