Last active
April 11, 2023 18:00
-
-
Save apzentral/820462b4661ea33a6ba6716e36875129 to your computer and use it in GitHub Desktop.
ANT: sshexec template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Build Script for ANT --> | |
<project basedir="." default="" name="Build Script"> | |
<property name="username" value="username"/> | |
<property name="passwd" value="passwd"/> | |
<property name="keyfile-path" value="/path-to-private-key"/> | |
<property name="applicationFolder" value="/var/www/html/"/> | |
<property name="sandboxRoot" value="${basedir}"/> | |
<property name="development-server" value="server"/> | |
<property name="production-server" value="server"/> | |
<!-- Development --> | |
<target description="Execute Command to Development Server: ${development-server}" name="exec-development"> | |
<echo message="--- Start execute command to the Development Server - ${development-server} ---"/> | |
<sshexec host="${development-server}" | |
keyfile="${keyfile-path}" | |
trust="true" | |
username="${username}" | |
password="${passwd}" | |
command="command to execute"/> | |
<echo message="--- Done ---"/> | |
</target> | |
<!-- Production --> | |
<target description="Execute Command to Production Server: ${production-server}" name="exec-production"> | |
<echo message="--- Start execute command to the Production Server - ${production-server} ---"/> | |
<sshexec host="${production-server}" | |
keyfile="${keyfile-path}" | |
trust="true" | |
username="${username}" | |
password="${passwd}" | |
command="command to execute"/> | |
<echo message="--- Done ---"/> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment