Created
March 22, 2019 11:49
-
-
Save SeunMatt/81e15f78118c0029acb39473fac703ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- build | |
- deploy | |
maven-build: | |
image: maven:3-jdk-8 | |
stage: build | |
script: "mvn package -B" | |
artifacts: | |
paths: | |
- target/ROOT.war | |
deploy-production: | |
only: | |
- master | |
before_script: | |
- apt-get update -qq && apt-get install -y -qq sshpass | |
stage: deploy | |
script: | |
- sshpass -V | |
- export SSHPASS=$USER_PASS | |
- sshpass -e scp -o StrictHostKeyChecking=no target/ROOT.war ci@0.0.0.10:/home/ci | |
- sshpass -e ssh -tt -o StrictHostKeyChecking=no ci@0.0.0.10 sudo mv /home/ci/ROOT.war /opt/tomcat/webapps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment