Skip to content

Extend CI test matrix and update readme(s) #3530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .vsts-ci/azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,41 @@ resources:
ref: master

jobs:
- job: Win2019
displayName: Windows Server 2019
- job: PS51_Win2016
displayName: PowerShell 5.1 - Windows Server 2016
pool:
vmImage: vs2017-win2016
steps:
- template: templates/ci-general.yml
parameters:
pwsh: false

- job: PS51_Win2019
displayName: PowerShell 5.1 - Windows Server 2019
pool:
vmImage: windows-2019
steps:
- template: templates/ci-general.yml
parameters:
pwsh: false

- job: PS7_Win2019
displayName: PowerShell 7 - Windows Server 2019
pool:
vmImage: windows-2019
steps:
- template: templates/ci-general.yml

- job: macOS
displayName: macOS 10.15
- job: PS7_macOS
displayName: PowerShell 7 - macOS 10.15
pool:
vmImage: macOS-10.15
steps:
- template: templates/ci-general.yml

- job: Ubuntu
displayName: Ubuntu 20.04
- job: PS7_Ubuntu
displayName: PowerShell 7 - Ubuntu 20.04
pool:
vmImage: Ubuntu-20.04
vmImage: ubuntu-20.04
steps:
- template: templates/ci-general.yml
23 changes: 17 additions & 6 deletions .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
parameters:
- name: pwsh
type: boolean
default: true
- name: usePipelineArtifact
type: boolean
default: false

steps:
- pwsh: $PSVersionTable
- task: PowerShell@2
displayName: PowerShell version
inputs:
targetType: inline
script: $PSVersionTable
pwsh: ${{ parameters.pwsh }}

- checkout: self

Expand Down Expand Up @@ -34,12 +41,16 @@ steps:
archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip
destinationFolder: $(Build.SourcesDirectory)/vscode-powershell/modules

- pwsh: |
Install-Module InvokeBuild -Scope CurrentUser -Force
Invoke-Build
Write-Host "##vso[task.setvariable variable=vsixPath]$(Resolve-Path powershell-*.vsix)"
- task: PowerShell@2
displayName: Build and test
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
inputs:
targetType: inline
script: |
Install-Module InvokeBuild -Scope CurrentUser -Force
Invoke-Build
Write-Host "##vso[task.setvariable variable=vsixPath]$(Resolve-Path powershell-*.vsix)"
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
pwsh: ${{ parameters.pwsh }}

- publish: $(vsixPath)
artifact: vscode-powershell-vsix-$(System.JobId)
Expand Down
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Discord](https://img.shields.io/discord/180528040881815552.svg?label=%23vscode&logo=discord&logoColor=white)](https://aka.ms/powershell-vscode-discord)
[![Join the chat at https://gitter.im/PowerShell/vscode-powershell](https://badges.gitter.im/PowerShell/vscode-powershell.svg)](https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This extension provides rich PowerShell language support for [Visual Studio Code](https://github.com/Microsoft/vscode).
This extension provides rich PowerShell language support for [Visual Studio Code](https://github.com/Microsoft/vscode) (VS Code).
Now you can write and debug PowerShell scripts using the excellent IDE-like interface
that Visual Studio Code provides.

Expand All @@ -21,16 +21,23 @@ not activated by default, but after installing this extension either click "Set
Theme" or use the [theme picker](https://code.visualstudio.com/docs/getstarted/themes) and
select "PowerShell ISE" for a fun and familiar experience.

## Platform support
## Platform Support

- **Windows 7 through 10** with Windows PowerShell v3 and higher, and PowerShell Core
- **Linux** with PowerShell Core (all PowerShell-supported distributions)
- **macOS and OS X** with PowerShell Core
The extension _should_ work anywhere VS Code itself and PowerShell Core 7 or higher is
[supported][]. For Windows PowerShell, only version 5.1 is supported. Please note that
PowerShell Core 6 is end-of-life and so not supported. Our test matrix includes the
following:

- **Windows Server 2016 and 2019** with Windows PowerShell 5.1 and PowerShell Core 7.1.4
- **macOS 10.15** with PowerShell Core 7.1.4
- **Ubuntu 20.04** with PowerShell Core 7.1.4

[supported]: https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle?view=powershell-7.1#supported-platforms

Read the [installation instructions](https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode)
to get more details on how to use the extension on these platforms.

Read the [troubleshooting guide](./docs/troubleshooting.md) for answers to common questions.
**Read the [troubleshooting guide](./docs/troubleshooting.md) for answers to common questions.**

## Features

Expand Down Expand Up @@ -59,12 +66,12 @@ You can also install a VSIX package from our [Releases page](https://github.com/
instructions. The easiest way is through the command line:

```powershell
code --install-extension PowerShell-<version>.vsix
code --install-extension powershell-<version>.vsix
```

> NOTE: If you are using VS Code Insiders, the command will be `code-insiders`.

## Script-based Installation
### Script-based Installation

If you're on Windows 7 or greater with the [PowerShellGet](https://msdn.microsoft.com/powershell/gallery/readme)
module installed, you can easily install both Visual Studio Code and the PowerShell
Expand Down Expand Up @@ -92,7 +99,7 @@ If you experience any problems with the PowerShell Extension, see
[the troubleshooting docs](./docs/troubleshooting.md) for information
on diagnosing and reporting issues.

### Security Note
## Security Note

For any security issues, please see [here](./docs/troubleshooting.md#note-on-security).

Expand All @@ -106,19 +113,14 @@ how to use them.
This folder can be found at the following path:

```powershell
$HOME/.vscode[-insiders]/extensions/ms-vscode.PowerShell-<version>/examples
$HOME/.vscode[-insiders]/extensions/ms-vscode.powershell[-preview]-<version>/examples
```

or if you're using the preview version of the extension

```powershell
$HOME/.vscode[-insiders]/extensions/ms-vscode.powershell-preview-<version>/examples
```

To open/view the extension's examples in Visual Studio Code, run the following from your PowerShell command prompt:
To open/view the extension's examples in Visual Studio Code, run the following from your
PowerShell session:

```powershell
code (Get-ChildItem $Home\.vscode\extensions\ms-vscode.PowerShell-*\examples)[-1]
code (Get-ChildItem $HOME/.vscode/extensions/ms-vscode.powershell-*/examples)[-1]
```

## Contributing to the Code
Expand All @@ -130,6 +132,13 @@ on how to contribute to this extension!

- [Rob Holt](https://github.com/rjmholt) - [@rjmholt](https://twitter.com/rjmholt)
- [Andy Schwartzmeyer](https://github.com/andschwa) - [andschwa.com](https://andschwa.com/)
- [Sydney Smith](https://github.com/SydneyhSmith) - [@SydneyhSmith](https://github.com/SydneyhSmith)

### Emeriti

- [Keith Hill](https://github.com/rkeithhill) - [@r_keith_hill](http://twitter.com/r_keith_hill)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also add SeeminglyScience here

- [Tyler Leonhardt](https://github.com/tylerl0706) - [@TylerLeonhardt](http://twitter.com/tylerleonhardt)
- [David Wilson](https://github.com/daviwil) - [@daviwil](https://twitter.com/daviwil)

## License

Expand Down
91 changes: 59 additions & 32 deletions docs/azure_data_studio/README_FOR_MARKETPLACE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
# PowerShell Language Support for Azure Data Studio

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/df06b9909e7442cebc1132bda0b8c0e3)](https://app.codacy.com/app/TylerLeonhardt/vscode-powershell?utm_source=github.com&utm_medium=referral&utm_content=PowerShell/vscode-powershell&utm_campaign=Badge_Grade_Dashboard)
[![Build Status](https://powershell.visualstudio.com/vscode-powershell/_apis/build/status/PowerShell.vscode-powershell?branchName=master)](https://powershell.visualstudio.com/vscode-powershell/_build/latest?definitionId=51&branchName=master)
[![Build Status](https://dev.azure.com/powershell/vscode-powershell/_apis/build/status/PowerShell.vscode-powershell?branchName=master)](https://dev.azure.com/powershell/vscode-powershell/_build/latest?definitionId=51&branchName=master)
[![Version](https://vsmarketplacebadge.apphb.com/version/ms-vscode.PowerShell.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell)
[![Installs](https://vsmarketplacebadge.apphb.com/installs-short/ms-vscode.PowerShell.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell)
[![Discord](https://img.shields.io/discord/180528040881815552.svg?label=%23vscode&logo=discord&logoColor=white)](https://aka.ms/powershell-vscode-discord)
[![Join the chat at https://gitter.im/PowerShell/vscode-powershell](https://badges.gitter.im/PowerShell/vscode-powershell.svg)](https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This extension provides rich PowerShell language support for [Azure Data Studio](github.com/Microsoft/azuredatastudio).
This extension provides rich PowerShell language support for [Azure Data Studio](https://github.com/Microsoft/azuredatastudio) (ADS).
Now you can write and run PowerShell scripts using the excellent IDE-like interface
that Azure Data Studio provides.

## Platform support
This extension is powered by the PowerShell language server,
[PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices).
This leverages the
[Language Server Protocol](https://microsoft.github.io/language-server-protocol/)
where `PowerShellEditorServices` is the server and `vscode-powershell` is the client.

- **Windows 7 through 10** with Windows PowerShell v3 and higher, and PowerShell Core
- **Linux** with PowerShell Core (all PowerShell-supported distributions)
- **macOS** with PowerShell Core
Also included in this extension is the PowerShell ISE theme for Visual Studio Code. It is
not activated by default, but after installing this extension either click "Set Color
Theme" or use the [theme picker](https://code.visualstudio.com/docs/getstarted/themes) and
select "PowerShell ISE" for a fun and familiar experience.

Read the [FAQ](https://github.com/PowerShell/vscode-powershell/wiki/FAQ) for answers to common questions.
## Platform Support

The extension _should_ work anywhere ADS itself and PowerShell Core 7 or higher is
[supported][]. For Windows PowerShell, only version 5.1 is supported. Please note that
PowerShell Core 6 is end-of-life and so not supported. Our test matrix includes the
following:

- **Windows Server 2016 and 2019** with Windows PowerShell 5.1 and PowerShell Core 7.1.4
- **macOS 10.15** with PowerShell Core 7.1.4
- **Ubuntu 20.04** with PowerShell Core 7.1.4

[supported]: https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle?view=powershell-7.1#supported-platforms

Read the [installation instructions](https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode)
to get more details on how to use the extension on these platforms.

**Read the [troubleshooting guide](./docs/troubleshooting.md) for answers to common questions.**

## Features

Expand All @@ -27,28 +50,27 @@ Read the [FAQ](https://github.com/PowerShell/vscode-powershell/wiki/FAQ) for ans
- Document and workspace symbol discovery
- Run selected selection of PowerShell code using <kbd>F8</kbd>
- Launch online help for the symbol under the cursor using <kbd>Ctrl</kbd>+<kbd>F1</kbd>
- Basic interactive console support!
- Local script debugging
- Integrated console support
- PowerShell ISE color theme

## Installing the Extension

You can install the official release of the PowerShell extension by following the steps
in the [Azure Data Studio documentation](docs.microsoft.com/en-us/sql/azure-data-studio/extensions).
in the [Azure Data Studio documentation](https://docs.microsoft.com/en-us/sql/azure-data-studio/extensions).
In the Extensions pane, search for "PowerShell" extension and install it there. You will
get notified automatically about any future extension updates!

You can also install a VSIX package from our [Releases page](https://github.com/PowerShell/vscode-powershell/releases) and install it through the command line:
You can also install a VSIX package from our [Releases page](https://github.com/PowerShell/vscode-powershell/releases) by following the
[Install from a VSIX](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix)
instructions. The easiest way is through the command line:

```powershell
azuredatastudio --install-extension PowerShell-<version>.vsix
azuredatastudio --install-extension powershell-<version>.vsix
```

## Reporting Problems

If you experience any problems with the PowerShell Extension, see
[the troubleshooting docs](./docs/troubleshooting.md) for information
on diagnosing and reporting issues.
## Security Note

#### Security Note
For any security issues, please see [here](./docs/troubleshooting.md#note-on-security).

## Example Scripts
Expand All @@ -61,39 +83,38 @@ how to use them.
This folder can be found at the following path:

```powershell
$HOME/.azuredatastudio/extensions/ms-vscode.PowerShell-<version>/examples
```

or if you're using the preview version of the extension

```powershell
$HOME/.azuredatastudio/extensions/ms-vscode.powershell-preview-<version>/examples
$HOME/.azuredatastudio/extensions/ms-vscode.powershell-<version>/examples
```

To open/view the extension's examples in Azure Data Studio, run the following from your PowerShell command prompt:
To open/view the extension's examples in Azure Data Studio, run the following from your
PowerShell session:

```powershell
azuredatastudio (Get-ChildItem $Home\.azuredatastudio\extensions\ms-vscode.PowerShell-*\examples)[-1]
azuredatastudio (Get-ChildItem $HOME/.azuredatastudio/extensions/ms-vscode.powershell-*/examples)[-1]
```

### SQL PowerShell Examples
In order to use these examples (below), you need to install the SqlServer module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/SqlServer).

In order to use these examples (below), you need to install the SqlServer module from the
[PowerShell Gallery](https://www.powershellgallery.com/packages/SqlServer).

```powershell
Install-Module -Name SqlServer
```

> NOTE: With version `21.1.18102` and up, the `SqlServer` module supports [PowerShell Core](https://github.com/PowerShell/PowerShell) 6.2 and up, in addion to Windows PowerShell.

In this example, we use the `Get-SqlInstance` cmdlet to Get the Server SMO objects for ServerA & ServerB. The default output for this command will include the Instance name, version, Service Pack, & CU Update Level of the instances.
In this example, we use the `Get-SqlInstance` cmdlet to Get the Server SMO objects for
ServerA and ServerB. The default output for this command will include the Instance name,
version, Service Pack, and CU Update Level of the instances.

```powershell
Get-SqlInstance -ServerInstance ServerA, ServerB
```

Here is a sample of what that output will look like:

```
```powershell
Instance Name Version ProductLevel UpdateLevel HostPlatform HostDistribution
------------- ------- ------------ ----------- ------------ ----------------
ServerA 13.0.5233 SP2 CU4 Windows Windows Server 2016 Datacenter
Expand All @@ -112,7 +133,7 @@ FOREACH {

Here is a sample of what that output will look like:

```
```powershell
Name Status Size Space Recovery Compat. Owner
Available Model Level
---- ------ ---- ---------- -------- ------- -----
Expand Down Expand Up @@ -152,9 +173,15 @@ on how to contribute to this extension!

## Maintainers

- [Rob Holt](https://github.com/rjmholt) - [@rjmholt](https://twitter.com/rjmholt)
- [Andy Schwartzmeyer](https://github.com/andschwa) - [andschwa.com](https://andschwa.com/)
- [Sydney Smith](https://github.com/SydneyhSmith) - [@SydneyhSmith](https://github.com/SydneyhSmith)

### Emeriti

- [Keith Hill](https://github.com/rkeithhill) - [@r_keith_hill](http://twitter.com/r_keith_hill)
- [Tyler Leonhardt](https://github.com/tylerl0706) - [@TylerLeonhardt](http://twitter.com/tylerleonhardt)
- [Rob Holt](https://github.com/rjmholt)
- [David Wilson](https://github.com/daviwil) - [@daviwil](https://twitter.com/daviwil)

## License

Expand Down