From ca765c1c089d220146a9c06975dac76ae6b4336d Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Fri, 5 Nov 2010 06:49:10 -0700 Subject: [PATCH] Supply ssh private key during docs upload Prior to this change, a graphical Ivy-branded authentication dialog was appearing when attepmting to scp the docs zip file to static.springframework.org. This was because the 'keyFile' property of the uploadArchives task was not being set. It is being set correctly now, based on the value of the 'sshPrivateKey' project property that must be set in gradle.properties. This value has been set on the build server's gradle.properties file, such that the INT-NIGHTLY build can succeed in pushing docs during the build. --- docs/build.gradle | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/build.gradle b/docs/build.gradle index 7c35775829..8535b1c092 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -186,7 +186,7 @@ dependencies { scpAntTask("org.apache.ant:ant-jsch:1.8.1") } -checkForProps(taskPath: project.path + ':uploadArchives', requiredProps: ['sshHost', 'sshUsername']) +checkForProps(taskPath: project.path + ':uploadArchives', requiredProps: ['sshHost', 'sshUsername', 'sshPrivateKey']) uploadArchives { def sshHost = project.properties.sshHost @@ -206,9 +206,7 @@ uploadArchives { name = 'sshHost: ' + sshHost // used for debugging host = sshHost user = sshUsername - if (project.hasProperty('remoteSiteDir')) { - keyFile = sshPrivateKey as File - } + keyFile = sshPrivateKey as File addArtifactPattern "${remoteDocsDir}/${archive.archiveName}" } } @@ -227,7 +225,7 @@ uploadArchives { classpath: configurations.scpAntTask.asPath) // copy the archive, unpack it, then delete it - def unpackCommand = "cd ${remoteDocsDir} && unzip ${archive.archiveName}" + def unpackCommand = "cd ${remoteDocsDir} && unzip -o ${archive.archiveName}" def deleteCommand = "rm ${remoteDocsDir}/${archive.archiveName}" println "sshexec ${unpackCommand}"