You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile Kusion models in a Stack to the Spec (intent)
8
8
9
-
The KCL filename must be specified. You can specify a list of arguments to replace the placeholders defined in KCL, and output the compiled results to a file when using --output flag.
9
+
The command must be executed in a Stack or specifying a Stack dir with the -w flag. You can specify a list of arguments to replace the placeholders defined in KCL, and output the compiled results to a file when using --output flag.
10
10
11
11
```
12
12
kusion compile [flags]
@@ -15,44 +15,41 @@ kusion compile [flags]
15
15
### Examples
16
16
17
17
```
18
-
# Compile configuration in main.k into YAML format
19
-
kusion compile main.k
20
-
21
18
# Compile main.k with arguments
22
-
kusion compile main.k -D name=test -D age=18
19
+
kusion compile -D name=test -D age=18
23
20
24
21
# Compile main.k with arguments from settings.yaml
25
-
kusion compile main.k -Y settings.yaml
22
+
kusion compile -Y settings.yaml
26
23
27
24
# Compile main.k with work directory
28
-
kusion compile main.k -w appops/demo/dev
25
+
kusion compile -w appops/demo/dev
29
26
30
27
# Compile with override
31
28
kusion compile -O __main__:appConfiguration.image=nginx:latest -a
32
29
33
30
# Compile main.k and write result into output.yaml
34
-
kusion compile main.k -o output.yaml
31
+
kusion compile -o output.yaml
35
32
36
-
# Complie without output style and color
33
+
# Compile without output style and color
37
34
kusion compile --no-style=true
38
35
```
39
36
40
37
### Options
41
38
42
39
```
43
-
-D, --argument stringArray Specify the top-level argument
44
-
-n, --disable-none Disable dumping None values
45
-
-h, --help help for compile
46
-
--no-style Disable the output style and color
47
-
-o, --output string Specify the output file
48
-
-a, --override-AST Specify the override option
49
-
-O, --overrides strings Specify the configuration override path and value
50
-
-Y, --setting strings Specify the command line setting files
51
-
-w, --workdir string Specify the work directory
40
+
-D, --argument stringToString Specify the top-level argument (default [])
41
+
-n, --disable-none Disable dumping None values
42
+
-h, --help help for compile
43
+
--no-style Disable the output style and color
44
+
-o, --output string Specify the output file
45
+
-a, --override-AST Specify the override option
46
+
-O, --overrides strings Specify the configuration override path and value
47
+
-Y, --setting strings Specify the command line setting files
48
+
-w, --workdir string Specify the work directory
52
49
```
53
50
54
51
### SEE ALSO
55
52
56
53
*[kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack
57
54
58
-
###### Auto generated by spf13/cobra on 24-Jul-2023
55
+
###### Auto generated by spf13/cobra on 28-Sep-2023
0 commit comments