-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (23 loc) · 974 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
init: docker-down docker-pull docker-build docker-up
up: docker-up
down: docker-down
restart: down up
docker-up:
docker-compose up -d
docker-down:
docker-compose down --remove-orphans
docker-pull:
docker-compose pull
docker-build:
docker-compose build --pull
show-initial-password:
docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
deploy:
ssh deploy@${HOST} -p ${PORT} 'rm -rf jenkins && mkdir jenkins'
scp -P ${PORT} docker-compose-production.yml deploy@${HOST}:jenkins/docker-compose.yml
scp -P ${PORT} -r docker deploy@${HOST}:jenkins/docker
ssh deploy@${HOST} -p ${PORT} 'cd jenkins && echo "COMPOSE_PROJECT_NAME=jenkins" >> .env'
ssh deploy@${HOST} -p ${PORT} 'cd jenkins && docker-compose down --remove-orphans'
ssh deploy@${HOST} -p ${PORT} 'cd jenkins && docker-compose pull'
ssh deploy@${HOST} -p ${PORT} 'cd jenkins && docker-compose build --pull'
ssh deploy@${HOST} -p ${PORT} 'cd jenkins && docker-compose up -d'