<java classpath="src/build-tools/build/jars/build-tools.jar" classname="fr.gouv.finances.cp.buildtools.GetDate" outputproperty="current-date" />
<echo>Current date is ${current-date}</echo>
<fail message="build/config/update.xml does not exists, run >ant gen-update before" unless="update.exists" />
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/updates33" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/updates33" sftp="true" keyfile="${user.home}/.ssh/id_rsa">
<fileset dir="build/config">
<include name="**/*" />
<exclude name="**/component.properties" />
<antcall target="check-upload">
<param name="url.to.check" value="build/config/update.xml" />
</antcall>
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/updates33" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/updates33" sftp="true" keyfile="${user.home}/.ssh/id_rsa">
<fileset dir="build/config">
<include name="update.xml" />
</fileset>
</scp>
- <scp remoteTofile="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/updates33/update-${current-date}.xml" sftp="true" localFile="build/config/update.xml">
+ <scp remoteTofile="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/updates33/update-${current-date}.xml" sftp="true" keyfile="${user.home}/.ssh/id_rsa" localFile="build/config/update.xml">
</scp>
</target>
<target name="upload-config-private" description="Publie la mise a jour privee" depends="doInput">
<target name="upload-config-erar" description="Publie la mise a jour ERAR" depends="doInput,jars-build-tools">
<available property="update.exists" file="build/config/update.xml" />
<fail message="build/config/update.xml does not exists, run >ant gen-update-erar before" unless="update.exists" />
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/erar" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/private/erar" keyfile="${user.home}/.ssh/id_rsa" sftp="true">
<fileset dir="build/config">
<include name="**/*" />
<exclude name="**/component.properties" />
<antcall target="check-upload">
<param name="url.to.check" value="build/config/update.xml" />
</antcall>
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/erar" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/private/erar" keyfile="${user.home}/.ssh/id_rsa" sftp="true">
<fileset dir="build/config">
<include name="update.xml" />
</fileset>
<target name="upload-config-v4" description="Publie la mise a jour V4" depends="doInput,jars-build-tools">
<available property="update.exists" file="build/config/update.xml" />
<fail message="build/config/update.xml does not exists, run >ant gen-update-v4 before" unless="update.exists" />
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/v4" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/private/v4" keyfile="${user.home}/.ssh/id_rsa" sftp="true">
<fileset dir="build/config">
<include name="**/*" />
<exclude name="**/component.properties" />
<antcall target="check-upload">
<param name="url.to.check" value="build/config/update.xml" />
</antcall>
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/private/v4" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/private/v4" keyfile="${user.home}/.ssh/id_rsa" sftp="true">
<fileset dir="build/config">
<include name="update.xml" />
</fileset>
<fail message="property target.url not set !" unless="target.url" />
<available property="update.exists" file="build/config/update.xml" />
<fail message="build/config/update.xml does not exists, run >ant gen-update-* before" unless="update.exists" />
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/${target.url}" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/${target.url}" keyfile="${user.home}/.ssh/id_rsa" sftp="true">
<fileset dir="build/config">
<include name="**/*" />
<exclude name="**/component.properties" />
<antcall target="check-upload">
<param name="url.to.check" value="build/config/update.xml" />
</antcall>
- <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/${target.url}" sftp="true">
+ <scp todir="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/${target.url}" keyfile="${user.home}/.ssh/id_rsa" sftp="true">
<fileset dir="build/config">
<include name="update.xml" />
</fileset>
</scp>
- <scp remoteTofile="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/gforge/chroot/home/groups/xemelios/www/${target.url}/update-${current-date}.xml" file="build/config/update.xml" sftp="true" />
+ <scp remoteTofile="${adullact.user.name}:${adullact.user.passwd}@projets.adullact.net:/var/lib/fforge/chroot/home/groups/xemelios/www/${target.url}/update-${current-date}.xml" keyfile="${user.home}/.ssh/id_rsa" file="build/config/update.xml" sftp="true" />
<!-- execution du script pour remettre les droits -->
- <sshexec host="projets.adullact.net" username="${adullact.user.name}" password="${adullact.user.passwd}" command="cd xemelios/www/${target.url}; chown -R $USER:xemelios *; chmod -R g+w *; exit;" failonerror="false" />
+ <sshexec host="projets.adullact.net" username="${adullact.user.name}" password="${adullact.user.passwd}" keyfile="${user.home}/.ssh/id_rsa" command="cd xemelios/www/${target.url}; chown -R $USER:xemelios *; chmod -R g+w *; exit;" failonerror="false" />
</target>
<target name="check-upload" depends="jars-build-tools">
<fail message="property url.to.check undefined" unless="url.to.check" />
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
- <property name="upload-target" value="/var/lib/gforge/chroot/home/groups/xemelios/www/updatesV5"/>
+ <property name="upload-target" value="/var/lib/fforge/chroot/home/groups/xemelios/www/updatesV5"/>
<property name="adullact.server" value="projets.adullact.net"/>
<property name="http.server.group" value="xemelios"/>
<!-- on upload -->
<scp
todir="${adullact.user.name}:${adullact.user.passwd}@${adullact.server}:${upload-target}"
- sftp="true" trust="true">
+ sftp="true" trust="true" keyfile="${user.home}/.ssh/id_rsa">
<fileset dir="build/config/deploy">
<include name="**/*"/>
<exclude name="**/component.properties"/>
<delete file="build/config/deploy/${component.name}/${configuration}/update-origin.xml"/>
<scp
todir="${adullact.user.name}:${adullact.user.passwd}@${adullact.server}:${upload-target}"
- sftp="true" trust="true">
+ sftp="true" trust="true" keyfile="${user.home}/.ssh/id_rsa">
<fileset dir="build/config/deploy">
<include name="**/update.xml"/>
</fileset>