Description
Template your build and deployment tasks, artifact definitions or variables.
Support build and deployment task templating and a variety of security features:
Support build and deployment task templating and a variety of security features:
- Define which plans should be considered as templates;
- Define which plans will use the template;
- User interactions designed to block unauthorized access to job configurations;
- Support build/environment task replication but also miscellaneous plugin configuration, artifact definitions or job requirements;
Usage steps for build projects:
- Go on a Job Miscellaneous configuration page in a different plan.
- Under the section Template list you should see now the jobs of the plan which was marked as template.
- Tick what do you want to sync:
- Template Tasks Definition
- Template Artifact Definition
- Attempt to maintain task states
- Merge Job Requirements
- Click Save and your replication will start !
- Merge Job Misc Configuration
Usage steps for deployment environments:
- Designate your environment templates by creating a variable named IS_TEMPLATE with value Yes.
A note only, replication will not sync only the current job, but all jobs, in all plans that have a template. How is this impacting ? When you do a change to the tasks of a template, go on the Miscellaneous configuration page of the template and click save so that all your plans get updated with the new task definition.
Security Feature
Under administration of bamboo the Templating engine has a security setup. From here you can control who can see the operations menu entry or to prevent accidental variable / permissions replicationsAlso if an environment has the variable BLOCK_PERMISSION_REPLICATION or the variable BLOCK_VARIABLE_OVERWRITING you can also block the permission/variables replications.
Reporting and UI
The plugin has also a simple control center allowing you to see reports regarding templates used, trigger replication of templates or bulk configuration of templates
The plugin has also a simple control center allowing you to see reports regarding templates used, trigger replication of templates or bulk configuration of templates
As some of these operations could be quite dangerous for your build system this can be restricted to administrators from the main security page:
Hello,
ReplyDeletei am just evaluating your plugin for our deployment process. One thin i noticed is, that the task "Download artifacts" is not replicated correctly if i edit the definition (i.e. add more artifact downloads to the same task). Is this intended?
Greets
Sascha Grau
Hi Sasha,
ReplyDeletethis is intended, I am not touching checkout and download artifacts type of tasks as they usually are used as a specific thing within the build.
I can make it configurable if you like.
Julius
That would be great, because now we have to delete all checkout and artifact download definitions before we replicate the plans.
DeleteKind regards
Sascha Grau
Hi,
ReplyDeleteI am evaluating that plugin, and I am wondering if "Plan variables" and "Deploy environment variables" are managed through that plugin?
Even if that feature is mentioned in the description, I was not able to figure out how malling it works.
In addition, do you have a more detailed documentation?
Regards,
Philippe.
Hi,
Deletethe plugin is handling variables for deployment projects at the moment, by attempting to create any variables not existing on the environment but existing on the template.
We can try to do same if you need for regular build plans.
Best regards,
Julius
Tks for this quick feedback,
ReplyDeleteHere is my test case:
Steps
-------
1) Create 1 "Deploy Project" having one environment (ex: MyTemplateDeploy)
2) Flag this environment as "IS_TEMPLATE = Yes"
3) Define one variable (ex: MyVersion = V1)
4) Create 1 "Deploy Project" having one environment (ex: Integration)
5) Flag this environment as "LINKED_TEMPLATE_ID = xxxxxx"
6) Define same variable as in Template (ex: MyVersion = V0)
7) GoTo "Template Plugin" and execute "Replicate Deployments"
Expected results
----------------
"MyVersion" variable is having value "V1" in all environments linked to MyDeployTemplate
Actuals results
----------------
Jobs are well updated but not variables.
Can you help?
Hi Philippe,
Deletethe existing variables are not touched. Only new ones are propagated. At the moment many people use the variables as customization point for the plans. For example tasks are identical and only a variable is different between environments containing the environment name.
Julius
Hi Lulius,
ReplyDeleteYou are absolutely right.
Nevertheless, in our business, we have several physical environments (ex: integration, uat, pre-production, ...).
Each environment will host several components (micro services architecture).
When updating some parameters on 1 component (ex: port, IP, etc...), I wish I wouldn't have to update same parameter on all Bamboo deploy project.
Does it make sense?
Can we achieve this goal using "Template Plugin" ?
Regard,
Philippe.
Hi Philippe,
DeleteI dont think this can fall under the templating scope, I can only make a "Bulk set variables values" as a separate feature. Let me try over the weekend.
Julius
Hi Philippe,
Deleteif you update to latest published you should find a new feature allowing you to replicate variable values in the main menu.
Julius
Hi,
ReplyDeleteI have a Build Template made of a Stage having 2 jobs.
Each Job have several tasks.
On the other hand, I have a Build Project depending on one of the templates jobs (described above).
As a matter of fact, replication does not work.
Here is nested exception:
Thu Oct 20 17:34:59 EDT 2016 query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2Thu Oct 20 17:34:59 EDT 2016 query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2
Do you have any clue??
Regards,
Philippe.
Hi Philippe,
Deletethis doesnt look like is coming from me. Can you check that all tasks have unique descriptions. That is the only case I encountered when replication did not work.
Julius
Hi Julius,
ReplyDeleteYou gave me good clue...
Description was different but one job was created by cloning an existing one.
So I just re-created from scratch which solved the problem.
Philippe.
Glad to help Philippe !
ReplyDeleteJulius
Hi,
ReplyDeleteI used "Replicate Deploy including permission scheme".
Permission were well replicated over "environment permissions".
Unfortunately, permission was not replicated over "Deploy project permission".
Did I miss something?
Hi Philippe,
Deletethe plugin supports linking environments only, not projects unfortunately. Unfortunatelly the UI on the deployment projects cannot be customised at all in order to setup the replications, this is also the reason I had to use variables to link the environments.
Best regards,
Julius
Hi,
ReplyDeleteI'm trying to get the templates working but I'm not seeing where I'm going wrong.
1. create new plan T with checkout, maven build, script, etc
2. mark plan T as a template in the Misc tab
3. create new plan A with checkout
4. select plan T as the template in plan A's Default Job
5. select Template Tasks Definition in A
6. save A
When I run A manually, it only does the checkout and none of the tasks defined in T. When I edit A's job, I only see the checkout task.
Any idea on what I'm doing wrong here?
Trial version of Bamboo on version 5.14.0.2 on OS X using the embedded database.
Any ideas how on to correct this?
DeleteHi Terry,
Deletethe replication between template and child plan is not done on the fly. In the main menu you can trigger a replication, once that is completed you should be able to see in plan A the exact same tasks as in T just source code repo should stay as it was.
Hi,
ReplyDeleteCan you help me understand what the "Attempt to maintain task states" option does for build templates? Does this mean that if you have a task with the same name as a task in the template, you don't overwrite it?
Hi Elli,
DeleteI attempt to match task names and maintain the state of it - Enabled/Disabled, but task is always replicated.
For example in template I have a task called Parse test results, in one plan using the template I have it enabled and another plan disabled. If Attempt to maintain task states is checked the task itself is being replicated but the state is not altered.
Julius
Oh, thank you, that makes sense!
DeleteWe've purchased the plugin and I'm beginning to adopt at scale. I'm having trouble because it is overwriting the key for the ssh deployment task. This isn't good for us because we use separate keys per server. Any ideas?
ReplyDeletessh key must be a property at the task level. I think we got 2 options:
Delete- code change on my end to add some sort of filtering and disable certain properties from replication
- use variables in the fields that you want to avoid overwriting
Julius
For me it makes sense that the key/password/passphrase for this task type be excluded after the initial replication. Any idea how to use a variable to refer to the key file/contents?
DeleteIf you are using the SSH task from Bamboo I dont think keys can be loaded via variables. In that case I can make a new feature on the plugin for you to exclude the key from replication.
DeleteWhat version of Bamboo are you using ?
This comment has been removed by the author.
DeleteHi Lulius,
ReplyDeleteCan you please advise me who has access to run "Template Replication Operations" ? I am Babmoo admin and I cannot see this in the Templates drop down until I have ticked "Allow all users to manage templating engine"
Thx,
Terry
any luck on this? I thought I should able to see "Template Replication Operations" without having tick "Allow all users to manage templating engine" because I am Bamboo admin.
DeleteThe same page which is managing the replication is available in 2 places, under Administration -> Addons and main menu. The item in the main menu is only available if you allow all users to play around. The one in administration ... always on
DeleteJulius
Hi Lulius,
ReplyDeleteI have a user non-admin logged in, he can see the "Template" menu at the top, but when it clicked on it, it does not have any menu item, is this expected? Since we allow developers to update individual plan's misc tab to synchronize from which template, so should we allow them to do this or not in bulk?
Thx,
Terry
any luck on this? although the developer cannot see the menu item when he clicks on Tempaltes, when I pass him the following URL: http://bamboo/plugins/servlet/admin/configurebuildtemplates , he can actually bulk edit the template linkage.
DeleteHi Terry,
Deleteseems you found a bug, I am raising it on the issue tracker on bitbucket and will sort it out asap.
https://bitbucket.org/iuliushutuleac/bamboo-templatedplans-plugin/issues/29/permissions-on-servlet-should-be-checked
Can you please tell me your bamboo version so I prioritize the release for that particular bamboo.
Julius
This comment has been removed by the author.
ReplyDeleteNice add-on. The UI could be a little better translated and more intuitive. E.g. for deployment plans you need to work with variables, while build plans have a nicer checkbox/dropdown to designate a template or template-user.
ReplyDeleteBut anyhow it does save a lot of duplicate code.
One minor issue I've found: Artifacts' required checkbox is not replicated. A required artifact in a build plan template loses this requirement in a subscriber to the plan.
Hi, I checked the artifact subscriptions feature, and you are right the addon is not handling them. At the moment the jobs are templated independently and the addon is not handling multiple stages/interdependencies.
DeleteIf I missundertood feed free to send me an email with a screenshot maybe.
With regards to the root path for tasks, should be fixed and going in the next release
Hello Lilius,
ReplyDeleteI'm currently evaluating your plugin for Bamboo and it seems really nice.
I created a project that contains the template plans and I re-use those templates in the other projects. Everything is working fine for the plan creation but the I have an issue when I update the template plans.
As Mark Ford, I did the following:
1. create new plan T with checkout, maven build, script, etc
2. mark plan T as a template in the Misc tab
3. create new plan A with checkout
4. select plan T as the template in plan A's Default Job
5. select Template Tasks Definition in A
6. save A
7. Same steps for new plans B, C and D
The issue happens when I edit the T plan and I want to update the plans A, B, C and D.
I try to use the “Templating Plugin - Bulk Templating Operations” to update the “Default Job” of those plans, nothing happens.
I have to open each plan, click on “Default Job” then on “Miscellaneous” and in the bottom of the page click on save to sync the plan with the template plan and get my changes.
The bulk edition is not working at all… :(
Would you have any advises on how could I use the “Templating Plugin - Bulk Templating Operations” to update all my linked plans in one time ?
If that works, it will save me a lot of times ! :)
Thanks for your help.
Kind Regards,
Alexis
Hi Alexis,
Deleteunder Global Settings / Addons section / Template Replication Operations - you should have exactly that option.
/plugins/servlet/admin/repladmin
Julius
Hello Julius,
DeleteThanks for the explanation, indeed it's working through Bamboo Administration / Manage apps / Template Replication Operations.
For your info the screenshot on your page about this feature is not up to date.
Now, you loose the Administration Menu and you leave the "Bamboo Administration" when you click on "Template Replication Operations"
See: https://i.imgur.com/AtCcOB9.png
Regards,
Alexis
This comment has been removed by the author.
ReplyDelete