-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMakefile
44 lines (35 loc) · 938 Bytes
/
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
40
41
42
43
44
include .env
default: clean
network:
docker network create cjp-demo-environment || true
build-jnlp-agent:
docker build --rm \
-f docker/Dockerfile.jnlp-agent \
-t jnlp-agent ./docker
jnlp-agent:
docker run -d \
--network=cjp-demo-environment \
-e "JENKINS_URL=http://cjp.local/cjoc" \
-v $(MAVEN_CACHE) \
-v /var/run/docker.sock:/var/run/docker.sock \
jnlp-agent \
$(JNLP_AGENT_COMMAND) \
$(SHARED_CLOUD_NAME)
destroy-jnlp:
docker rm $$(docker stop $$(docker ps -a -q --filter="ancestor=jnlp-agent"))
build-swarm-agent:
docker build --rm \
-f docker/Dockerfile.swarm-agent \
-t swarm-agent .
swarm-agent:
docker run -d \
--network=cjp-demo-environment \
swarm-agent \
java -jar swarm-client-3.3.jar \
-master $(SWARM_MASTER) \
-username $(SWARM_USER) \
-password $(SWARM_PASS)
destroy-swarm-agents:
docker rm $$(docker stop $$(docker ps -a -q --filter="ancestor=swarm-agent"))
clean:
./docker-clean.sh