Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Read Version from Shelved File #3087

mbbb ·
Hi,

Regarding the option of Read Version from File:
http://wiki.pmease.com/display/QB60/Rea ... +from+File

$\{groovy:repositories.get("repo").sourceViewSupport.readSourceAsString("/demos/componentA/trunk/version.txt")\}


Is it support reading the shelved changes from this file ?

Thanks !
  • replies 5
  • views 1187
  • stars 0
robinshen ADMIN ·
What do you mean by reading shelved changes from this file?
drdt ·

I realize this is from a long time ago, but I just had this same problem.

During my build, we read the pom.xml using this sourceViewSupport object to identify the JDK version, which is then used to identify the container image to use for the build.

However, in our repository we enabled "merge with shelved changes", referencing a parameter (prompted variable) with a list of shelves.
If I kick off a build with a shelf that contains a change to pom.xml, that change is not manifested in sourceViewSupport.readSourceAsString. I understand why it does not, I perhaps should not have expected it to work.

However, is there a way to achieve this?

robinshen ADMIN ·

Shelved changes will be applied during checkout. Maybe reading pom.xml from workspace directly after the checkout step? I think it is fine for subsequent docker command steps.

drdt ·

Yes, I can see that working, if I reorganize my build steps a little. However, we already need to read the pom.xml before checkout to determine what version we are building as well; it is possible that could also be changed in the shelf. I guess I am looking for a generic solution

Is there a way to look at the shelved files? I wouldn't mind adding extra logic to my script to search both the shelves and the source.

robinshen ADMIN ·

Unfortunately this is not possible, as all the process of applying shelved changes happens at checkout stage...