How to access maven-build-info.xml.gz during build configuration execution
After a maven-steps uploads some snapshot artifacts to artifactory, I need to import them into UCD. For this I need the version number of the uploaded artifact. I can find the version number after the build in hidden artifacts in the relevant maven-build-info.xml.gz file and have a python script to properly extract it. But how do I access this information when the build is still running? The .teamcity folder is nowhere to be found ...
Please sign in to leave a comment.
Hi,
how is this "build number" generated? Isn't it TeamCity's build number? If so you can simply reference the %build.number% parameter to obtain it directly. If it's not, it has to be generated somehow, and if it's by the artifactory plugin, you might want to ask artifactory about that, but as far as I am aware, this will be the build number, or the build counter (which has the same relevant %build.counter% parameter)
More info on build parameters here: https://www.jetbrains.com/help/teamcity/configuring-build-parameters.html
I have the exact same number as the OP.
Yes the timestamp is generated somewhere in the teamcity-maven-artifactory plugin chain, but since this is all managed by teamcity it is no simple matter to dissect it and extract this information from somewhere in the middle, and doesn't seem to me like the most sensible architecture either.
Teamcity has this info and writes it successfully to the maven-build-info.xml file.
So to automate this in a further build step all I need is the file.
The build log has the following lines: