How to change a build property dynamically with RTC SDK
![]()
Hello,
I need to alter the build definition workspace dynamically, whenever a build definition is requested. The value is based in a build definition property. I created an adivisor (server-side) to solve this. The problem is that the workspace is changing normaly, but the current request (wich call this advisor) is executing with old workspace value. How to change also the current request value or how to update the current request values? Can anybody help me? |
2 answers
![]()
I tested to alter the properties from newOrModifiedBuildProperties and worked. Editing this value from newOrModifiedBuildProperties, the current request update the information normally. Below is the my code for this.
private void setWorskpaceBuilProperty(BuildRequestParamsImpl buildRequest, String newValue) { List<IBuildProperty> newOrModifiedBuildProperties = buildRequest.getNewOrModifiedBuildProperties(); IBuildProperty propertyChange = null; for (IBuildProperty iBuildProperty : newOrModifiedBuildProperties) if (iBuildProperty.getName().equalsIgnoreCase(IJazzScmConfigurationElement.PROPERTY_WORKSPACE_UUID)) propertyChange = iBuildProperty; if (propertyChange == null) return; propertyChange.setValue(newValue); } |