get the time when build was triggered
hello,
I need to download from Artifactory the artifacts that triggered a build on our TeamCity. The problem is - the TC build does not know which new artifacts caused the build to trigger (artifactory trigger). So i thought - is there a way to know exactly the trigger? not only - (%teamcity.build.triggeredBy% returns "artifcatory") but more precisely (example: artifactory.repositoryXY.package123) ? Or is there a way to get the date when a build was triggered? (so I could filter artifactory artifacts - get the latest before the trigger date).
Can I explain it clearer?
kind regards,
K
Please sign in to leave a comment.
Hi Kat,
you can try to pull the build status from the REST API (https://confluence.jetbrains.com/display/TCD10/REST+API). I have to say that it feels rather weird that Artifactory doesn't provide themselves any of this information (mainly which artifact(s) triggered the build). Consider getting in touch with JFrog to propose this functionality.
On the other hand, this would render the build unable to be triggered manually (as in it would be triggered but it would search for some artifacts that might not be there). Also, JFrog recommends being very specific with which artifacts should be triggered as it puts quite some burden on the server, maybe it would make more sense to split the build in several configurations (based on a template so that all of them are identical) and simply add a parameter to each build to ensure it gets the proper artifacts, then configure the trigger with a different tracking for each one? This would solve all this issues much faster while reducing, according to JFrog, the load on the server.
Hello Denis,
thank you a lot for your answer! I will actually choose another solution: I decided (actually as you suggest) to split it into more than 1 build. It is possible to trigger it manually if I insert a short script including %teamcity.build.triggeredBy.user% not empty ...
I will also contact JFrog. I think it is important that these two servers work better together in the future,
happy New Year!
Kat