2

I have a Rest API based on Spring boot, embedded with jetty. Normally I start it with java -Dloader.path=blablabla -jar blablabla.jar. I've configured a teamcity Build step to look for new check-ins to the git repo, pull and build (maven) the project, generate artifacts..

Further, I've added a Deploy step which has dependency on Build step (successful completion and artifact dependency).. Here, I use powershell to push the artifacts to the server on which i want the rest service to run.

A few questions:

1) Powershell - Is it the right way to publish files to the server from teamcity?

2) How do i get the teamcity to actually start my spring boot app? Some sort of a remote command execution?

Note: Both teamcity server and the app server are Windows.

Ocelot
  • 1,733
  • 4
  • 29
  • 53

1 Answers1

1

Solved it myself:

1) Yes, powershell does the trick pretty neatly.

2) Got it to work with a combination of [WMICLASS] 's create() and Start-Process. Check my answer here.

Cheers!

Community
  • 1
  • 1
Ocelot
  • 1,733
  • 4
  • 29
  • 53