Commit d6cf42b
feat: support code deploy in --no-prompt mode via CLI flags (#8324)
* feat: support code deploy in --no-prompt mode via CLI flags
Add --deploy-mode, --runtime, --entry-point, and --dep-resolution flags
to enable non-interactive code deploy for CI/CD pipelines.
- --deploy-mode code|container (default: container, backward compatible)
- --runtime python_3_13|python_3_14|dotnet_10 (required for code deploy)
- --entry-point <file> (required for code deploy)
- --dep-resolution remote_build|bundled (default: remote_build)
These flags produce the same output as interactive mode (agent.yaml
code_configuration + azure.yaml language field + SKIP_ACR_CREATION env var).
No changes to deploy-time behavior.
* Add unit tests for code deploy flag validation, promptDeployMode, and promptCodeConfig
Extract validateCodeDeployFlags into a testable method and add 16 test
cases covering flag precedence, noPrompt defaults, and error conditions.
* refactor: extract shared validateCodeDeployInput to eliminate duplication
* docs: add non-interactive code deploy example to init --help
* fix: validate --runtime, --deploy-mode, and --dep-resolution flag values
---------
Co-authored-by: Jian Wu <wujia@microsoft.com>1 parent 508fd69 commit d6cf42b
4 files changed
Lines changed: 388 additions & 17 deletions
File tree
- cli/azd/extensions/azure.ai.agents/internal/cmd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
613 | 618 | | |
614 | 619 | | |
615 | 620 | | |
616 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
617 | 626 | | |
618 | 627 | | |
619 | 628 | | |
| |||
852 | 861 | | |
853 | 862 | | |
854 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
855 | 876 | | |
856 | 877 | | |
857 | 878 | | |
| |||
875 | 896 | | |
876 | 897 | | |
877 | 898 | | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
878 | 904 | | |
879 | 905 | | |
880 | 906 | | |
| |||
910 | 936 | | |
911 | 937 | | |
912 | 938 | | |
913 | | - | |
| 939 | + | |
914 | 940 | | |
915 | 941 | | |
916 | 942 | | |
917 | 943 | | |
918 | 944 | | |
919 | 945 | | |
920 | 946 | | |
921 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
922 | 952 | | |
923 | 953 | | |
924 | 954 | | |
| |||
2947 | 2977 | | |
2948 | 2978 | | |
2949 | 2979 | | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
Lines changed: 53 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
487 | 494 | | |
488 | 495 | | |
489 | 496 | | |
490 | | - | |
| 497 | + | |
491 | 498 | | |
492 | 499 | | |
493 | 500 | | |
| |||
1008 | 1015 | | |
1009 | 1016 | | |
1010 | 1017 | | |
1011 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1012 | 1023 | | |
1013 | 1024 | | |
1014 | 1025 | | |
| |||
1135 | 1146 | | |
1136 | 1147 | | |
1137 | 1148 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1141 | 1167 | | |
1142 | 1168 | | |
1143 | 1169 | | |
1144 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1145 | 1175 | | |
1146 | 1176 | | |
1147 | 1177 | | |
1148 | 1178 | | |
1149 | 1179 | | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
1154 | 1180 | | |
1155 | 1181 | | |
1156 | 1182 | | |
| |||
1221 | 1247 | | |
1222 | 1248 | | |
1223 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1224 | 1257 | | |
1225 | | - | |
1226 | | - | |
| 1258 | + | |
| 1259 | + | |
1227 | 1260 | | |
1228 | 1261 | | |
1229 | 1262 | | |
| |||
1252 | 1285 | | |
1253 | 1286 | | |
1254 | 1287 | | |
1255 | | - | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1256 | 1291 | | |
1257 | 1292 | | |
1258 | 1293 | | |
| |||
1280 | 1315 | | |
1281 | 1316 | | |
1282 | 1317 | | |
1283 | | - | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
1284 | 1321 | | |
1285 | 1322 | | |
1286 | 1323 | | |
| |||
1305 | 1342 | | |
1306 | 1343 | | |
1307 | 1344 | | |
1308 | | - | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
1309 | 1348 | | |
1310 | 1349 | | |
1311 | 1350 | | |
| |||
0 commit comments