Related Bamboo Support request: BSP-40224 (https://getsupport.atlassian.com/servicedesk/customer/portal/10/BSP-40224).
Our team has noticed that when Bamboo server executes Java specs SCAN (without underlying repository Java class update) - permissions (Plan permissions of Buld plans and Environment permissions of Deployment plans) do not get set/rebuilt.
We have noticed two cases when this occurs:
... in other words - when Bamboo server executes specs using SCAN instead of executing Maven build.
This issue can be observed/replicated by following:
Same exact behavior occurs when instead of using "Scan" button (step #3 above) - some changes *other than within deleted plan's Java spec file* are PUSH'ed to the repository (deleted plan's Java spec file is unchanged).
So... after discovering this issue, we need to find a way to enforce Maven build from Java specs file - each time SCAN is executed (both cases explained above).
Question:
Does anyone know how to force Bamboo specs SCAN rebuild plan (and Permissions) from Java specs file - even if no changes are pushed to the specs?
Hi Valeriy,
I see that this is being handled internally via BSP-40224 already and thus I'll choose not to answer them.
Just to answer your query on how to trigger repository scanning forcefully, I suggest you to run the below curl command to scan for changes in Specs. Replace the repositoryID with the respective Specs repository's ID.
curl -X POST -H "Content-Type: application/json" http://BambooHostURL:8085/rest/api/latest/repository/scan?repositoryId=3997710
Note: This REST call works only from Bamboo 6.5.x.
Hope that helps.
Cheers,
Jey
Thank you Jey,
Does this statement behave essentially the same as clicking on 'Scan' button in the Linked Repository's 'Specs Status' tab? From your comment ("... to scan for changes in Specs") - it sounds the same...
If this is so - then this is not what I have asked. My question was: "how to enforce Maven build from Java specs file - each time SCAN is executed?"
In other words, we need not to just scan for changes - but to unconditionally rebuild entire plan (and all related objects like Permissions) entirely from repository-stored Java specs.
Issue that we have encountered - is that Plan and associated Permissions objects can be altered (updated or deleted) via UI (outside of Java specs). This may result in the state of the plan differ from that defined in the specs (while the specs have not changed). When this is the case, simple specs "scan" does not "fix" the plan (does not restore it to the state defined in specs) - simply because specs have not changed. Only complete rebuild from Java specs (not from server cached XML specs) - can "fix" (remove) the changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.