Adds hooks to MRSK. Currently just two hooks, pre-build and post-push. We could break the build and push into two separate commands if we found the need for post-build and/or pre-push hooks. Hooks are stored in `.mrsk/hooks`. Running `mrsk init` will now create that folder and add sample hook scripts. Hooks returning non-zero exit codes will abort the current command. Further potential work here: - We could replace the audit broadcast command with a post-deploy/post-rollback hook or similar - Maybe provide pre-command/post-command hooks that run after every mrsk invocation - Also look for hooks in `~/.mrsk/hooks`
58 lines
1012 B
YAML
58 lines
1012 B
YAML
version: "3.7"
|
|
name: "mrsk-test"
|
|
|
|
volumes:
|
|
shared:
|
|
registry:
|
|
deployer_bundle:
|
|
|
|
services:
|
|
shared:
|
|
build:
|
|
context: docker/shared
|
|
volumes:
|
|
- shared:/shared
|
|
|
|
deployer:
|
|
privileged: true
|
|
build:
|
|
context: docker/deployer
|
|
environment:
|
|
- TEST_ID=${TEST_ID}
|
|
volumes:
|
|
- ../..:/mrsk
|
|
- shared:/shared
|
|
- registry:/registry
|
|
- deployer_bundle:/usr/local/bundle/
|
|
|
|
registry:
|
|
build:
|
|
context: docker/registry
|
|
environment:
|
|
- REGISTRY_HTTP_ADDR=0.0.0.0:4443
|
|
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
|
|
- REGISTRY_HTTP_TLS_KEY=/certs/domain.key
|
|
volumes:
|
|
- shared:/shared
|
|
- registry:/var/lib/registry/
|
|
|
|
vm1:
|
|
privileged: true
|
|
build:
|
|
context: docker/vm
|
|
volumes:
|
|
- shared:/shared
|
|
|
|
vm2:
|
|
privileged: true
|
|
build:
|
|
context: docker/vm
|
|
volumes:
|
|
- shared:/shared
|
|
|
|
load_balancer:
|
|
build:
|
|
context: docker/load_balancer
|
|
ports:
|
|
- "12345:80"
|