Permalink
Browse files

<Preethi, Banka> #1008 | modified download.tama.from.hudson target to…

… take care of authentication
  • Loading branch information...
1 parent fb503fc commit 463e163c2f7f52cb2d6feef52ee8a88d97889d28 Preethi committed Dec 29, 2011
Showing with 17 additions and 7 deletions.
  1. +2 −0 .gitignore
  2. 0 artifacts/dummy.txt
  3. +8 −6 deploy.xml
  4. +1 −1 properties/showcase/deploy.properties
  5. +6 −0 scripts/download_artifact.sh
View
@@ -1,3 +1,5 @@
.idea
*.iml
target/
+cookie.txt
+artifacts/tama.war
View
No changes.
View
@@ -12,12 +12,14 @@
<!-- *********************** DOWNLOAD ARTIFACTS************************* -->
<target name="download.tama.from.hudson">
- <copy todir="${download.dir}" flatten="true" overwrite="true">
- <resources>
- <url url="http://${hudson.server}:${hudson.port}/job/${hudson.job.name}/${hudson.build.number}/org.motechproject.tama$tama/artifact/org.motechproject.tama/tama/${hudson.release.version}/tama-${hudson.release.version}.war"/>
- </resources>
- </copy>
- <move file="${download.dir}/tama-${hudson.release.version}.war" tofile="${download.dir}/${app.name}.war"/>
+ <exec executable="${script.interpreter}" failonerror="true" >
+ <arg file="${basedir}/scripts/download_artifact.sh"/>
+ <arg value="http://${hudson.server}:${hudson.port}/j_acegi_security_check" />
+ <arg value="http://${hudson.server}:${hudson.port}/job/${hudson.job.name}/${hudson.build.number}/org.motechproject.tama$tama/artifact/org.motechproject.tama/tama/${hudson.release.version}/tama-${hudson.release.version}.war" />
+ <arg value="${download.dir}/${app.name}.war"/>
+ <arg value="${hudson.username}"/>
+ <arg value="${hudson.password}"/>
+ </exec>
<echo message="downloaded tama-${hudson.release.version}.war from hudson"/>
</target>
@@ -29,7 +29,7 @@ tomcat.url=http://localhost:${tomcat.port}
hudson.server=10.10.13.42
hudson.port=8080
hudson.job.name=TAMA-Web
-hudson.build.number=113
+hudson.build.number=lastBuild
hudson.release.version=0.3-SNAPSHOT
nexus.server=nexus.motechproject.org
@@ -0,0 +1,6 @@
+#!/bin/bash
+echo "***************** Downloading **********************"
+curl -f -c cookie.txt -d "j_username=$4&j_password=$5" $1 || exit 1
+curl -f -b cookie.txt $2 -o $3 || exit 1
+rm cookie.txt
+echo "***************** Downloaded ***********************"

0 comments on commit 463e163

Please sign in to comment.