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
Copy file name to clipboardExpand all lines: clu-getstart.md
+57-13Lines changed: 57 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Work on CLU cmdlets
2
2
3
-
###Prerequsites
3
+
## Prerequsites
4
4
5
5
* Visual Studio 2015 RTM with ASP.NET. For details, check out the [installation doc](http://docs.asp.net/en/latest/getting-started/installing-on-windows.html).
6
6
7
7
Note, after done, run `dnvm list` command to check the 'coreclr' runtime is installed with right version of `1.0.0-rc1-final`. If not, run `dnvm install 1.0.0-rc1-final -r coreclr -a x64 -p`. Remember always use `-p` flag, so the selection can persist.
8
8
9
9
* Get the latest dotnet from "https://azureclu.blob.core.windows.net/tools/dotnet-win-x64.latest.zip", unzip, then add its bin folder to the PATH
10
10
11
-
###Project Artifacts
11
+
## Project Artifacts
12
12
13
13
CLUPackages require some additional files to direct generation of indexing, and to provide shortcuts when files are installed. These files can be copied from the Profile project and updated for each package.
14
14
@@ -47,7 +47,7 @@ CLUPackages require some additional files to direct generation of indexing, and
47
47
}
48
48
```
49
49
50
-
###Package Creation and Testing
50
+
## Package Creation and Testing
51
51
Two options
52
52
1. Run `<repo-root>\tools\CLU\BuildAndInstallClu.bat` which build and generate all cmdlet packages and deploy to under `<repo root>\drop\clurun` folder, with 3 flavors `win7-x64`, `osx.10.10-x64` and `ubuntu.14.04-x64`. When you have a clean environment or just pull from upstream, you should clean temporary bits such as `git clean -xdf`, and run this command.
53
53
2. Run `<repo-root>\tools\CLU\BuildCmdlet <package name like Microsoft.Azure.Commands.Profile>` <namelike:Microsoft.Azure.Commands.Profile>", this will build and refresh an individual cmdlet package.
@@ -62,7 +62,7 @@ To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, copy the flav
62
62
63
63
(All of those are subject to change, contact yugangw or adxsdkdev for any questions)
64
64
65
-
###Quick introductions on cmdlets
65
+
## Quick introductions on cmdlets
66
66
* Run commands using the ‘az’ prefix, cmdlet nouns, and cmdlet verbs, for example, `az env get` maps to the cmdlet `Get-AzureRmEnvironment`
67
67
* Cmdlet parameters use the double dash (--) so for example, getting a subscription with a particular name would be: `az subscription get –-SubscriptionName “name of subscription"`
68
68
* To log in, 3 options
@@ -82,19 +82,19 @@ To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, copy the flav
82
82
83
83
```set AzureProfile=1010 ```
84
84
85
-
###Testing Cmdlets
85
+
## Testing Cmdlets
86
86
87
-
####Environment setup (Windows)
87
+
### Environment setup (Windows)
88
88
- Install latest version of [Git for Windows](https://git-scm.com/download/win) that has `bash 4.x` available.
89
89
- Install `jq` using chocolatey `choco install jq` (chocolatey can be installed from [here](https://chocolatey.org/)).
90
90
91
-
####Test Infrastructure
91
+
### Test Infrastructure
92
92
Testing will consist of scenario tests and unit tests. Scenario tests should be written in a form of an example and be available in `.ps1` and `.sh` formats.
93
93
94
-
####Scenario Tests
94
+
### Scenario Tests
95
95
- Scenario tests should be saved under `./examples` directory with one directory per package. Each scenario tests should (eventually) consist of both `.ps1` and `.sh` files and should cover "P0" scenarios.
96
96
97
-
#####Environment Variables for Authentication
97
+
#### Environment Variables for Authentication
98
98
Please set the environment variables for either Username/Password (no 2FA) or ServicePrincipal authentication:
99
99
100
100
**Username/Password (without 2-factor auth):**
@@ -114,7 +114,7 @@ Please set the environment variables for either Username/Password (no 2FA) or Se
114
114
| tenant | The tenant guid to authenticate against |
115
115
| spnSubscription | (optional) Selects a particular subscription by id. If not provided, the first listed subscription will be selected |
116
116
117
-
#####XUnit Automation For Bash Scenario Tests
117
+
#### XUnit Automation For Bash Scenario Tests
118
118
- The ```Commands.Common.ScenarioTest``` project contains classes that enable executing bash scenario tests in Visual Studio, or cross-platform using dnx.
119
119
120
120
- To implement an xunit bash scenario test you must
- Bash tests should be runnable from bash shell in windows/linux/mac environments.
166
203
- To manually run the tests; please set [environment variables](#Environment_Variables_for_Authentication) for authentication as well as update PATH and run `./examples/lib/testrunner.sh`
0 commit comments