Is it possible to set a parameter on a completed build?
For our CI setup, I set up a composite build configuration that builds a project, runs some tests, then deploys the artifacts to a service that makes them available to the team. The deploy configuration had a dependency on both the build and the test configurations to ensure only good builds are deployed.
The deploy process gets a buildid from that service at the end of the deployment representing the artifacts uploaded to it. Currently I'm scraping that buildid from the output, and I'd like to set it as a parameter back on the build part of the chain.
The goal here is to have the parameter on the build, so that if a new deploy is run it can skip the upload to the service, and instead have the service push the already existing upload to a different environment. Uploading the same artifacts again would take a while, and would result in duplicated builds on the service we upload to.
From what I can tell, setting a parameter on an already completed build might be possible with the reverse.dep system, but I'm not having luck prototyping this setup so far.
One alternative I've considered is using the REST API to set a comment containing the buildid back on the build once the deploy is finished. I can then modify the deploy configuration to check for comments and skip the upload and simply pass the buildid to the service.
Any other thoughts/suggestions for this scenario?
Please sign in to leave a comment.
Hello Tom,
I believe that using the REST API would work well for what you want to achieve. Alternatively, you could approach your scenario using one of the following approaches:
https://www.jetbrains.com/help/teamcity/snapshot-dependencies.html#Suitable+Builds
We would like to ask you for more details to see if we can guide you in the best way possible through this scenario:
Please let me know if you have any more questions.
Guilherme