문제

I have a few jobs that automatically build a java app. I would like it to automatically push it to a other server. I found a plugin that copies artifacts over ssh, but using it I end up with app-1.0-SNAPHSHOT.jar, app-1.1-SNAPHSHOT.jar and so on on the remote server.

I would like to have it as app.jar instead, overwriting the old one every time. Is there a "intelligent" way of doing this, or should I just make a shell script that looks for the newest one, and overwrites it?

도움이 되었습니까?

해결책

If you are using a Maven project I would recommend Mojo's Ship Maven Plugin for doing the transfer via your build scripts.

If you want to do this via Jenkins plugins, there are the following plugin options:

다른 팁

I just do it right in my build scripts. Why all the extra management? In ant,

<copy todir="${remote}"> 
    <globmapper from="*" to="app.jar"/>
    ...
</copy>

works perfectly fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top