Two mechanisms, matching what the make engine actually did:
Lazy defaults. A stack setting is a function myos_default_<VAR>, called only
when the variable has no value, and called again at every reference. That is
exactly a recursive ?=: an explicit value wins, and the default follows a
DOMAIN that a .env changes later. The prefix is what makes it safe; the first
version used a bare function named after the variable, and the test suite
caught it running /usr/bin/host for a stack group called host.
Templates. myos env-update fills a .env from the .env.dist files, expanding
${VAR} against the current values and running $(command), forward references
included.
Also fixed: the project .env now wins over /etc/conf.d/myos, which is what the
documentation claimed and the code did not.
share/make/shim.mk lets a project keep make as a front end: every myos command
becomes a target that shells out to bin/myos, and the project keeps its own
targets and its stack .mk files. It sits outside make/ because the legacy
engine globs every .mk in there.
84 lines
6.2 KiB
Plaintext
84 lines
6.2 KiB
Plaintext
# name | fixture | args
|
|
#
|
|
# `help` is deliberately absent: it renders the comments of the Makefile, so it
|
|
# would break on every edit to a dev target rather than on a change of behaviour.
|
|
host-print-project | host-project | print-COMPOSE_PROJECT_NAME STACK=host/consul
|
|
host-print-compose-file | host-project | print-COMPOSE_FILE STACK=host/consul
|
|
host-print-stack-dir | host-project | print-STACK_DIR STACK=host/consul
|
|
host-print-env-vars | host-project | print-ENV_VARS STACK=host/consul
|
|
host-print-suffix | host-project | print-COMPOSE_FILE_SUFFIX STACK=host/consul
|
|
host-print-network-default | host-project | print-DOCKER_NETWORK_DEFAULT STACK=host/consul
|
|
host-print-network-private | host-project | print-DOCKER_NETWORK_PRIVATE STACK=host/consul
|
|
host-print-network-public | host-project | print-DOCKER_NETWORK_PUBLIC STACK=host/consul
|
|
host-print-host-stack | host-project | print-HOST_STACK STACK=host/consul
|
|
host-print-app | host-project | print-APP STACK=host/consul
|
|
host-up-consul | host-project | up STACK=host/consul
|
|
host-up-two | host-project | up STACK="host/consul host/fabio"
|
|
host-up-group | host-project | up STACK=host
|
|
host-target | host-project | host
|
|
host-down-group | host-project | down STACK=host
|
|
host-config | host-project | config STACK=host/fabio
|
|
host-ps | host-project | ps STACK=host/consul
|
|
host-logs | host-project | logs STACK=host/consul
|
|
host-stack-host-config | host-project | stack-host-config
|
|
host-exec | host-project | exec STACK=host/consul SERVICE=consul ARGS='consul members'
|
|
host-env-master | host-project | print-COMPOSE_FILE STACK=host/consul ENV=master
|
|
host-print-project-env-master | host-project | print-COMPOSE_PROJECT_NAME STACK=host/consul ENV=master
|
|
app-print-project | app-git | print-COMPOSE_PROJECT_NAME
|
|
app-print-compose-file | app-git | print-COMPOSE_FILE
|
|
app-print-app | app-git | print-APP
|
|
app-print-stack | app-git | print-STACK
|
|
app-up | app-git | up
|
|
app-up-env-master | app-git | up ENV=master
|
|
app-config | app-git | config
|
|
app-down | app-git | down
|
|
app-run | app-git | run SERVICE=app ARGS='id'
|
|
app-scale | app-git | scale SERVICE=app NUM=2
|
|
app-print-service-name | app-git | print-COMPOSE_SERVICE_NAME
|
|
app-print-repository | app-git | print-DOCKER_REPOSITORY
|
|
nogit-print-project | app-nogit | print-COMPOSE_PROJECT_NAME
|
|
nogit-print-app | app-nogit | print-APP
|
|
nogit-up | app-nogit | up
|
|
cat-postgres-compose-file | app-nogit | print-COMPOSE_FILE STACK=postgres
|
|
cat-postgres-project | app-nogit | print-COMPOSE_PROJECT_NAME STACK=postgres
|
|
cat-postgres-up | app-nogit | up STACK=postgres
|
|
cat-postgres-version | app-nogit | print-COMPOSE_FILE STACK=postgres:9.6
|
|
cat-postgres-env-master | app-nogit | print-COMPOSE_FILE STACK=postgres ENV=master
|
|
cat-user-project | app-nogit | print-COMPOSE_PROJECT_NAME STACK=User/User
|
|
cat-user-compose-file | app-nogit | print-COMPOSE_FILE STACK=User/User
|
|
cat-user-network | app-nogit | print-DOCKER_NETWORK STACK=User/User
|
|
cat-group-testing | app-nogit | print-COMPOSE_FILE STACK=testing
|
|
cat-group-testing-up | app-nogit | up STACK=testing
|
|
cat-group-default-up | app-nogit | up STACK=default
|
|
cat-drone-version | app-nogit | print-COMPOSE_FILE STACK=drone/drone:1.6
|
|
cat-drone-env-vars | app-nogit | print-ENV_VARS STACK=drone/drone
|
|
cat-nginx-www | app-nogit | print-COMPOSE_FILE STACK=host/nginx COMPOSE_FILE_WWW=true
|
|
cat-nginx-www-dns | app-nogit | print-COMPOSE_FILE STACK=host/nginx COMPOSE_FILE_WWW=true COMPOSE_FILE_DNS=true
|
|
cat-nginx-project | app-nogit | print-COMPOSE_PROJECT_NAME STACK=host/nginx
|
|
cat-unknown-stack | app-nogit | print-COMPOSE_FILE STACK=doesnotexist
|
|
cat-unknown-target | app-nogit | doesnotexist
|
|
inc-app-print-project | app-git | @make print-COMPOSE_PROJECT_NAME
|
|
inc-app-print-compose-file | app-git | @make print-COMPOSE_FILE
|
|
inc-app-print-app | app-git | @make print-APP
|
|
inc-app-up | app-git | @make up
|
|
inc-app-up-env-master | app-git | @make up ENV=master
|
|
inc-app-config | app-git | @make config
|
|
inc-app-down | app-git | @make down
|
|
inc-app-ps | app-git | @make ps
|
|
inc-app-print-service-name | app-git | @make print-COMPOSE_SERVICE_NAME
|
|
inc-app-print-env-vars | app-git | @make print-ENV_VARS
|
|
inc-app-print-network-default | app-git | @make print-DOCKER_NETWORK_DEFAULT
|
|
inc-app-stack-postgres-up | app-git | @make up STACK=postgres
|
|
inc-app-unknown-target | app-git | @make doesnotexist
|
|
cmd-exec-host | host-project | exec host/consul -- consul members
|
|
cmd-exec-service | host-project | exec host/fabio SERVICE=fabio -- sh
|
|
cmd-run-catalogue | app-nogit | run postgres -- psql -l
|
|
cmd-scale | app-nogit | scale postgres SERVICE=postgres NUM=3
|
|
cmd-ls | host-project | ls
|
|
cmd-ls-groups | host-project | ls --groups
|
|
cmd-env-domain | host-project | env DOMAIN
|
|
shim-up-group | shim-project | @make up STACK=host DRYRUN=true
|
|
shim-config | shim-project | @make config STACK=host/consul DRYRUN=true
|
|
shim-project-target | shim-project | @make host-certs
|
|
shim-env | shim-project | @make env ARGS=COMPOSE_PROJECT_NAME STACK=host
|