war/jar deployment in Wildfly Server using Gitlab CI/CD
Hi, I am new to Gitlab CI/CD. I am trying to deploy jar file to wildfly server. Can you please tell that how to deploy war/jar spring-boot project’s file into wildfly server using .gitlab-ci.yml file command? Also please tell how can I copy that war/jar file into our local windows system’s folder with .gitlab-ci.yml file?
I am using following .gitlab-ci.yml file for copying jar file to my local system.
build:
stage: .pre
image: maven:3.6-jdk-11
script:
- ‘mvn install -f pom.xml’
artifacts:
paths:
- target/Springmvcboot-0.0.1-SNAPSHOT.jar
deploy:
stage: deploy
script:
- scp -r project-2/target D:/jarFile
For deployment on wildfly server, I am using following .gitlab-ci.yml
build:
stage: .pre
image: maven:3.6-jdk-11
script:
- ‘mvn install -f pom.xml’
artifacts:
paths:
- target/Springmvcboot-0.0.1-SNAPSHOT.jar
deploy:
stage: deploy
script:
- - sshpass -e scp -r . http://localhost:9990/console/index.html#deployments
Thanks, in advance for the reply!