зеркало из https://github.com/Azure/aks-engine.git
add a generate command that uses a golang container
This commit is contained in:
Родитель
4660bed80d
Коммит
16fa693dcb
|
@ -0,0 +1,2 @@
|
|||
acstgen
|
||||
generated/
|
|
@ -53,3 +53,11 @@ Run a Go container with the application source code mounted into the
|
|||
container. You can edit the code in your favorite editor on the client
|
||||
while building and running the container.
|
||||
|
||||
## generate.sh
|
||||
|
||||
Generate a template from a given configuration and store it in the
|
||||
```generated``` folder. For example, to generate a Swarm template use:
|
||||
|
||||
``` bash
|
||||
./scripts/generate.sh swarm.json
|
||||
```
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -d generated ]
|
||||
then
|
||||
mkdir -p generated
|
||||
fi
|
||||
|
||||
TEMPLATE_NAME=$1
|
||||
|
||||
|
||||
|
||||
docker run --rm -it -v "$PWD":/usr/src/acstgen -w /usr/src/acstgen golang bash -c "go build && ./acstgen clusterdefinitions/$TEMPLATE_NAME > generated/$TEMPLATE_NAME"
|
Загрузка…
Ссылка в новой задаче