forked from gouthamchilakala/PetClinic
-
Notifications
You must be signed in to change notification settings - Fork 40
/
deploy.yaml
22 lines (17 loc) · 801 Bytes
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Create SonarQube - docker container run -d -p 9000:9000 --name sonarqube sonarqube:lts
# Create Nexus - docker container run -d -p 8081:8081 -p 10001:10001 --name nexus sonatype/nexus3
---
- name: Deploy Tomcat Artifacts to Remote Servers
hosts: appservers
tasks:
- name: To stop apache tomcat
shell: ps -ef | grep tomcat | grep -v "grep" | awk '{print $2}'| xargs kill -9
ignore_errors: yes
- name: To Remove old war files
shell: rm -rf /opt/apache-tomcat-8.5/webapps/petclinic*
- name: To copy war file
copy:
src: /home/ubuntu/jenkins/workspace/Pipeline_PetClinic/target/petclinic.war
dest: /opt/apache-tomcat-8.5/webapps/
- name: To START apache tomcat
shell: nohup /opt/apache-tomcat-8.5/bin/catalina.sh start