-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (32 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.PHONY: deploy-dev deploy-testing deploy-production
SERVER=advance
USER?=tomcat
LOCAL_TOMCAT?=/var/lib/tomcat9/
deploy-production:
mvn -P production clean package
scp target/codemapper.war $(SERVER):/tmp/
@printf "Deploy what? > "; read resp; [ "$$resp" = "production" ]
ssh -t $(SERVER) \
sudo -u tomcat8 \
cp /tmp/codemapper.war /var/lib/tomcat8/webapps
deploy-testing:
mvn -P testing clean package
scp target/codemapper-testing.war $(SERVER):/tmp/
ssh -t $(SERVER) \
sudo -u tomcat8 \
cp /tmp/codemapper-testing.war /var/lib/tomcat8/webapps
# sh -c 'cp /tmp/codemapper-testing.war /var/lib/tomcat8/webapps && tail -fn 0 /var/lib/tomcat8/logs/catalina.out'
deploy-dev:
mvn -P dev package
sudo -u $(USER) cp target/codemapper-dev.war $(LOCAL_TOMCAT)/webapps
test:
cd src/main/resources; hurl --variables-file hurl-variables.txt tests.hurl
FRONTEND=src/main/frontend
deploy-testing-all:
mvn -P testing clean package
make -C $(FRONTEND) dist-testing
rsync -zrv --delete \
target/codemapper-testing.war \
$(FRONTEND)/dist-testing \
$(SERVER):/tmp/
ssh -t $(SERVER) sudo sh -c "'sudo -u tomcat8 cp /tmp/codemapper-testing.war /var/lib/tomcat8/webapps & sudo -u www-data rsync --delete -avz /tmp/dist-testing/ /var/www/ui-2023-testing'"