I'm supposed to do the task mentioned in the title of the question and I'm kind of lost how to approach this. I'd like to hear what is the best practice but here's how I've figured out by myself how to approach this:
1) Create a shell script for deploying an artifact to the deployment folder on the server it is being run in.
2) Build ear as usual on TeamCity Build Configuration
3) Use (probably) SSH Upload runner in TeamCity to copy the ear to the remote test server
4) Use the PowerShell runner provided by TeamCity to run that script on the remote server somehow to copy the artifact to that server's opt/wildfly/standalone/deployment folder
Am I on the right track here and is there some tried and true best practice for this? Couldn't find anything by googling for the current combination (TeamCity, ear artifact, JBoss Wildlfy 8.1.1)