I'm simply trying to copy the war to the webapps folder of my tomcat and restart the server, something like
copy /y .\WebAppFolder\target\WebApp*.war C:\server\webapps\ROOT.war
He can't find this specified path when try to copy, but locally this command works. My runner is on windows.
The problem is that I was trying to use the "target" created by the previous stage, but the runner deletes everything that is not tracked at the end of each stage. I add this code in the stage was generate the war so the runner does not destroy the directory
artifacts:
untracked: true
paths:
- WebApp/target
Getting something like that
buildWebApp:maven:
stage: buildWebApp
tags:
- tag
script: mvn clean install -f WebApp/pom.xml
artifacts:
untracked: true
paths:
- WebApp/target
only:
- master
test:
stage: test
tags:
- tag
script:
- copy /y my copy
- mvn test -f testes/pom.xml
only:
- master
Sorry but i lost the link of gitlab doc where i find this solution
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.