Skip to content

Commit

Permalink
changing modules should not be pinned, if actual version is not resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
jk1 committed Feb 28, 2015
1 parent 1e54fc5 commit 427e784
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ class DepedencyPinner implements DependencyProcessor {
config = project.teamcityServer
config.setDefaultMessage("Pinned when building dependent build $project.name $project.version")
if (config.pinEnabled) {
dependencies.collectAll {
// do not pin changing modules
dependencies.findAll { !it.version.changing }.collectAll {
"$config.url/httpAuth/app/rest/builds/buildType:$it.buildTypeId,number:$it.version.version/pin"
}.unique().each { pinBuild(it) }
}
}

private def pinBuild(String url) {
String response = "<no response recorded>"
String response = "No response recorded. Rerun with --stacktrace to see an exception."
try {
HttpURLConnection connection = url.toURL().openConnection()
connection.setDoOutput(true);
Expand Down

0 comments on commit 427e784

Please sign in to comment.