Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris Smith
committed
Jul 19, 2016
1 parent
05ef5c0
commit 7d29008
Showing
5 changed files
with
115 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,48 @@ | ||
# Contributing | ||
# Contributing | ||
|
||
Want to contribute? Great! Please read this page so your submission can go through smoothly. | ||
Want to contribute? Great! Please read this page so your submission can go | ||
through smoothly. | ||
|
||
## Contributor License Agreement | ||
|
||
Before we can use your code, you must sign the [Google Individual Contributor License Agreement] | ||
(https://cla.developers.google.com/about/google-individual) | ||
Before we can use your code, you must sign the | ||
[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) | ||
(CLA), which you can do online. The CLA is necessary mainly because you own the | ||
copyright to your changes, even after your contribution becomes part of our | ||
codebase, so we need your permission to use and distribute your code. We also | ||
need to be sure of various other things — for instance that you'll tell us if you | ||
know that your code infringes on other people's patents. | ||
need to be sure of various other things — for instance that you'll tell us if | ||
you know that your code infringes on other people's patents. | ||
|
||
Contributions made by corporations are covered by a different agreement than | ||
the one above. If you work for a company that wants to allow you to contribute your work, then | ||
you'll need to sign a [Software Grant and Corporate Contributor License Agreement] | ||
(https://cla.developers.google.com/about/google-corporate). | ||
the one above. If you work for a company that wants to allow you to contribute | ||
your work, then you'll need to sign a | ||
[Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate). | ||
|
||
You don't have to sign the CLA until after you've submitted your code for review and | ||
a member has approved it, but you must do it before we can put your code into the | ||
repository. Before you start working on a larger contribution, you should get in touch | ||
with us first through the issue tracker with your idea so that we can help out and | ||
possibly guide you. Coordinating up front makes it much easier to avoid | ||
frustration later on. | ||
You don't have to sign the CLA until after you've submitted your code for review | ||
and a member has approved it, but you must do it before we can put your code | ||
into the repository. Before you start working on a larger contribution, you | ||
should get in touch with us first through the issue tracker with your idea so | ||
that we can help out and possibly guide you. Coordinating up front makes it much | ||
easier to avoid frustration later on. | ||
|
||
## Developer Workflow | ||
|
||
If you would like to add a new feature, cmdlet, or change, first create a new Issue. There we will | ||
triage the idea and discuss any design or implementation details. | ||
If you would like to add a new feature, cmdlet, or change, first | ||
[create a new Issue](https://github.com/GoogleCloudPlatform/google-cloud-powershell/issues/new). | ||
There we will triage the idea and discuss any design or implementation details. | ||
|
||
Contributors are expected to do their work in a local fork and submit code for consideration via a | ||
pull request. | ||
Contributors are expected to do their work in a local fork and submit code for | ||
consideration via a GitHub pull request. | ||
|
||
It is expected that pull requests meet the following: | ||
Pull Requests are expected to meet the following requirements: | ||
|
||
- Adhere to the coding style guide - We use the [DotNet Foundation's Coding Style Guide](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md). Fortunately you can run the [codeformatter](https://github.com/dotnet/codeformatter) tool to clean up syntax as needed. | ||
- Adds an appropriate amount of test coverage - See the `README.md` files in the various projects for detailed information on how to run tests locally. | ||
- Adhere to the coding style guide - We use the | ||
[DotNet Foundation's Coding Style Guide](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md). Fortunately you can run the [codeformatter](https://github.com/dotnet/codeformatter) tool to clean up syntax as needed. (See | ||
[RunCodeFormatter.ps1](https://github.com/GoogleCloudPlatform/google-cloud-powershell/blob/master/Tools/RunCodeFormatter.ps1).) | ||
- Adds an appropriate amount of test coverage - See the `README.md` files in the | ||
`Google.PowerShell.Tests` and `Google.PowerShell.IntegrationTests` folders for | ||
more detail on how to run tests locally. | ||
- And finally, that you have signed the CLA as mentioned above. | ||
|
||
When the pull request process deems the change ready, it will be merged directly into the tree. | ||
Congratulations and thank you! | ||
When the pull request process deems the change ready, it will be merged directly | ||
into the tree. Congratulations and thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
#Integration Tests# | ||
# Integration Tests# | ||
|
||
To run these just type `Invoke-Pester`. Things should work. If they don't, that is bad. | ||
The suite of integration use the [Pester](https://github.com/pester/Pester) | ||
framework. | ||
|
||
You may need to set the PowerShell execution policy. Simply run: | ||
The easiest way to install it on your system is via the | ||
[Choclatey package](https://chocolatey.org/packages/pester). | ||
|
||
Set-ExecutionPolicy Unrestricted | ||
## Running Tests | ||
|
||
But you need to do this for _the x86 version of PowerShell_ that Visual Studio runs, so | ||
run that command from: | ||
Once installed, you should be able to run Pester by typing `Invoke-Pester` or | ||
simply `pester`. | ||
|
||
C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe | ||
Pester will run all Pester tests under the current folder (those matching | ||
`*.Tests.ps1`). You can specify a limited set of tests by passing a file, | ||
directory, or wildcard to the pester path: | ||
|
||
pester .\Google.PowerShell.IntegrationTests\Storage\ | ||
|
||
If you only want to run a single testcase, use the `-TestName` parameter. | ||
|
||
pester \Google.PowerShell.IntegrationTests\Storage\ -TestName Read-GcsObject | ||
|
||
If you only want to run a subset of the integration tests, use the `-TestName` parameter. e.g. | ||
## Troubleshooting | ||
|
||
pester -TestName Read-GcsObject | ||
However, you may need to set the PowerShell execution policy. | ||
Simply run: | ||
|
||
Set-ExecutionPolicy Unrestricted | ||
|
||
But you need to do this for _the x86 version of PowerShell_ that Visual Studio | ||
runs, so run that command from: | ||
|
||
C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# Unit Tests | ||
# Unit Tests | ||
|
||
Download and install the NUnit test adapter. See: | ||
http://www.nuget.org/packages/NUnitTestAdapter/ | ||
http://www.nuget.org/packages/NUnitTestAdapter/. | ||
|
||
You can install this from Nuget via: | ||
|
||
Install-Package NUnitTestAdapter | ||
|
||
## Scope | ||
|
||
Unit tests have generally been used for things that are non-cmdlet related. | ||
While it would be faster to run a battery of unit tests against the cmdlets, | ||
unfortunately we have yet to come up with a good design that doesn't require an | ||
inordinate amount of boiler plate code to mock/stub/fake the underlying Google | ||
APIs. (Pull Requests welcome, of course.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,56 @@ | ||
# Google Cloud Platform PowerShell | ||
# Cloud Tools for PowerShell (Beta) | ||
|
||
This repository contains PowerShell cmdlets for interacting with the Google Cloud Platform. | ||
This repository contains PowerShell cmdlets for interacting with the Google | ||
Cloud Platform. You can use Cloud Tools for PowerShell to manage your existing | ||
cloud resources or create new ones. | ||
|
||
:construction: This is a work in progress. :construction: You will need to | ||
build from source to install and look at the code for documentation. Hopefully | ||
by the time this repository is public you will be able to: | ||
:construction: Cloud Tools for PowerShell is currently in beta. We are quickly | ||
expanding coverage of the Google Cloud Platform to expose more resource types | ||
from PowerShell. However, this product might be changed in backward-incompatible | ||
ways and is not subject to any SLA or deprecation policy. | ||
|
||
- [ ] Install these cmdlets from the Cloud SDK (`gcloud components update | ||
beta powershell`) | ||
- [ ] Read documentation published via a GitHub Pages site. | ||
- [ ] Read documentation for how to build, test, and submit patches for this | ||
project. | ||
# Installation | ||
|
||
Cloud Tools for PowerShell is included in the Windows version of the | ||
[Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstart-windows). | ||
|
||
If you already have the Cloud SDK installed on your machine, you can uninstall | ||
and reinstall to get Cloud Tools for PowerShell. Or, you can install it | ||
manually via: | ||
|
||
# Install the "powershell" component of the Cloud SDK | ||
$ gcloud components install powershell | ||
|
||
# Run "AppendPsModulePath.ps1" to register the Cloud Tools for PowerShell | ||
# module. Where the script is located depends on where you installed the | ||
# Cloud SDK. For normal user-based installs: | ||
%AppData%\..\Local\Google\Cloud SDK\google-cloud-sdk\platform\GoogleCloudPowerShell\ | ||
|
||
# For admin-based installs: | ||
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\GoogleCloudPowerShell | ||
|
||
Cloud Tools for PowerShell uses your Cloud SDK credentials. So if you have not | ||
already, run `gcloud auth login` or `gcloud init` to login. | ||
|
||
# Documentation | ||
|
||
You can learn more about Cloud Tools for PowerShell, with Quick Start and How-To | ||
guides, at https://cloud.google.com/powershell/. | ||
|
||
You can see a full cmdlet reference at: | ||
https://googlecloudplatform.github.io/google-cloud-powershell/ | ||
|
||
# Support | ||
|
||
To get help on using these cmdlets, please log an issue with this project. | ||
While we will eventually be able to offer support on StackOverflow or a | ||
Google+ community, for now your best bet is to contact the dev team directly. | ||
To get help on using these cmdlets, please | ||
[log an issue](https://github.com/GoogleCloudPlatform/google-cloud-powershell/issues/new) | ||
with this project. While we will eventually be able to offer support on | ||
StackOverflow, but for now your best bet is to contact the dev team directly. | ||
|
||
Patches are encouraged, and may be submitted by forking this project and | ||
submitting a Pull Request. | ||
See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. | ||
submitting a Pull Request. See [CONTRIBUTING.md](CONTRIBUTING.md) for more | ||
information. | ||
|
||
## License | ||
# License | ||
|
||
Apache 2.0. See [LICENSE](LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters