publish artifacts as soon as they build

This commit is contained in:
nik
2010-07-28 10:33:12 +04:00
parent ba691da226
commit 8bb207d4d1
2 changed files with 17 additions and 3 deletions
+9 -3
View File
@@ -136,10 +136,12 @@ private def layoutWin(Map args, String home, Paths paths) {
patchPropertiesFile(paths.distWin)
ant.echo(file: "$paths.distWin/bin/idea.exe.vmoptions", message: args.vmoptions.replace(' ', '\n'))
ant.zip(zipfile: "$paths.artifacts/idea${args.buildNumber}.win.zip") {
def winZipPath = "$paths.artifacts/idea${args.buildNumber}.win.zip"
ant.zip(zipfile: winZipPath) {
fileset(dir: paths.distAll)
fileset(dir: paths.distWin)
}
notifyArtifactBuilt(winZipPath)
}
private def layoutMac(Map args, String home, Paths paths) {
@@ -170,7 +172,8 @@ private def layoutMac(Map args, String home, Paths paths) {
def root = isEap() ? "${version}-${args.buildNumber}.app" : "IntelliJ IDEA ${version} CE.app"
ant.zip(zipfile: "$paths.artifacts/idea${args.buildNumber}.mac.zip") {
def macZipPath = "$paths.artifacts/idea${args.buildNumber}.mac.zip"
ant.zip(zipfile: macZipPath) {
[paths.distAll, paths.distMac].each {
tarfileset(dir: it, prefix: root) {
exclude(name: "bin/*.sh")
@@ -183,6 +186,7 @@ private def layoutMac(Map args, String home, Paths paths) {
include(name: "Contents/MacOS/idea")
}
}
notifyArtifactBuilt(macZipPath)
}
def layoutLinux(Map args, String home, Paths paths) {
@@ -216,7 +220,9 @@ def layoutLinux(Map args, String home, Paths paths) {
}
}
ant.gzip(src: tarPath, zipfile: "${tarPath}.gz")
def gzPath = "${tarPath}.gz"
ant.gzip(src: tarPath, zipfile: gzPath)
ant.delete(file: tarPath)
notifyArtifactBuilt(gzPath)
}
+8
View File
@@ -88,3 +88,11 @@ binding.setVariable("loadProject", {
requireProperty("home", guessHome())
project.builder.buildInfoPrinter = new org.jetbrains.jps.teamcity.TeamcityBuildInfoPrinter()
binding.setVariable("notifyArtifactBuilt", { String artifactPath ->
if (!artifactPath.startsWith(home)) {
project.error("Artifact path $artifactPath should start with $home")
}
def relativePath = artifactPath.substring(home.length())
project.info("##teamcity[publishArtifacts '$relativePath']")
})