Skip to content

Commit

Permalink
Create release
Browse files Browse the repository at this point in the history
Release fix for #40
  • Loading branch information
heaths authored Oct 4, 2019
2 parents 4eb2842 + 62f3905 commit d1247fe
Show file tree
Hide file tree
Showing 25 changed files with 368 additions and 464 deletions.
187 changes: 35 additions & 152 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,160 +2,43 @@
# Licensed under the MIT license. See LICENSE.txt in the project root for license information.

trigger:
batch: true
branches:
include:
- master
- develop
paths:
exclude:
- appveyor.yml

phases:
- phase: Build
queue:
name: VSEng-MicroBuildVS2017
demands:
- msbuild
- visualstudio
- vstest
parallel: 2
matrix:
debug:
Configuration: Debug
SignType: Test
release:
Configuration: Release

variables:
Platform: Any CPU
Solution: '*.sln'

steps:
- task: NuGetToolInstaller@0
displayName: Install nuget
inputs:
versionSpec: '4.4.1'

- task: NuGetCommand@2
displayName: Restore nuget packages
inputs:
restoreSolution: $(Solution)

- task: MicroBuildSigningPlugin@1
displayName: Install MicroBuild signing plugin
inputs:
esrpSigning: true
signType: $(SignType)

- powershell: |
$ErrorActionPreference = 'Stop'
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module -Name platyPS -Repository PSGallery -SkipPublisherCheck -Force
displayName: Install PowerShell modules
- powershell: |
New-ExternalHelp -Path docs\VSSetup -OutputPath "src\VSSetup.PowerShell\bin\${env:CONFIGURATION}" -Force
displayName: Compile documentation
env:
CONFIGURATION: $(Configuration)
workingDirectory: $(Build.SourcesDirectory)
- task: VSBuild@1
displayName: Build solution
inputs:
solution: $(Solution)
configuration: $(Configuration)
platform: $(Platform)
msbuildArgs: /p:RunCodeAnalysis=true /p:TreatWarningsAsErrors=true "/flp:Verbosity=Diagnostic;LogFile=$(Build.ArtifactStagingDirectory)\logs\build.log"
maximumCpuCount: true

- task: VSTest@2
displayName: Test solution
inputs:
testAssemblyVer2: |
**\$(Configuration)\*test*.dll
!**\obj\**
configuration: $(Configuration)
platform: $(Platform)
codeCoverageEnabled: true
runInParallel: true

- powershell: |
If (-Not (Test-Path -Path $env:OUTDIR -PathType Container)) { $null = New-Item -Path $env:OUTDIR -Type Directory }
Compress-Archive -Path LICENSE.txt, "${env:SRCDIR}\*.dll", "${env:SRCDIR}\*.dll-Help.xml", "${env:SRCDIR}\about_*.help.txt", "${env:SRCDIR}\VSSetup.*" -DestinationPath "${env:OUTDIR}\VSSetup.zip"
displayName: Archive output
env:
CONFIGURATION: $(Configuration)
OUTDIR: $(Build.BinariesDirectory)\bin\$(Configuration)
SRCDIR: src\VSSetup.PowerShell\bin\$(Configuration)
workingDirectory: $(Build.SourcesDirectory)
- task: NuGetCommand@2
displayName: Package output
inputs:
command: pack
basePath: $(Build.SourcesDirectory)
packDestination: $(Build.BinariesDirectory)\bin\$(Configuration)
packagesToPack: pkg\VSSetup\VSSetup.nuspec
configuration: $(Configuration)
versioningScheme: byEnvVar
versionEnvVar: GitBuildVersionSimple
includeSymbols: true
buildProperties: CommitId=$(Build.SourceVersion)

- task: VSBuild@1
displayName: Sign packages
condition: and(succeeded(), eq(variables['Configuration'], 'Release'))
inputs:
solution: pkg\VSSetup\VSSetup.signproj
configuration: $(Configuration)
platform: $(Platform)
msbuildArgs: /p:OutDir=$(Build.BinariesDirectory)\bin\$(Configuration) "/flp:Verbosity=Diagnostic;LogFile=$(Build.ArtifactStagingDirectory)\logs\sign.log"

- task: MicroBuildCodesignVerify@1
displayName: Validate packages
condition: and(succeeded(), eq(variables['Configuration'], 'Release'))
inputs:
ExcludeSNVerify: true
TargetFolder: $(Build.BinariesDirectory)\bin\$(Configuration)
WhiteListPathForCerts: build\nosign.txt

- task: CopyFiles@2
displayName: Copy output
inputs:
SourceFolder: $(Build.SourcesDirectory)\src
Contents: '**\bin\$(Configuration)\**'
TargetFolder: $(Build.ArtifactStagingDirectory)\drop\src

- task: CopyFiles@2
displayName: Copy packages
inputs:
SourceFolder: $(Build.BinariesDirectory)
Contents: bin\$(Configuration)\**
TargetFolder: $(Build.ArtifactStagingDirectory)\drop

- task: CopyFiles@2
displayName: Copy tools
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: tools\**
TargetFolder: $(Build.ArtifactStagingDirectory)\drop

- task: PublishBuildArtifacts@1
displayName: Publish drop
inputs:
ArtifactName: drop
PathtoPublish: $(Build.ArtifactStagingDirectory)\drop

- task: PublishBuildArtifacts@1
displayName: Publish logs
condition: succeededOrFailed()
continueOnError: true
inputs:
ArtifactName: logs
PathtoPublish: $(Build.ArtifactStagingDirectory)\logs

- task: MicroBuildCleanup@1
displayName: Clean up
condition: succeededOrFailed()

# vim: set ai et st=2 sts=2 sw=2:
- README.md

pr: none

queue:
name: VSEng-MicroBuildVS2017
timeoutInMinutes: 120
demands:
- MSBuild
- VisualStudio
- VSTest

steps:
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install MicroBuild signing plugin
inputs:
esrpSigning: true
signType: $(SignType)

- template: build/build.yml
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildPlatform: $(BuildPlatform)
Sign: true

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: Detect components
inputs:
sourceScanPath: $(Build.SourcesDirectory)

- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Clean up
condition: succeededOrFailed()
4 changes: 4 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Code of Conduct
===============

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
49 changes: 26 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ This project uses the following software. Newer versions may work but backward c

* [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx)

### Optional

Some projects require optional software to open or otherwise use in Visual Studio. They are not required to build the solution using MSBuild.

* [NuProj Package Project](https://marketplace.visualstudio.com/items?itemName=NuProjTeam.NuGetPackageProject)

## Coding

This project uses a Git flow model releasing from the `master` branch with development based on and stabilize in the `develop` branch. You can view current build status in the [README](README.md) document.
Expand Down Expand Up @@ -49,34 +43,43 @@ nuget install xunit.runner.console -outputdirectory packages
packages\xunit.runner.console.<version>\tools\xunit.runner.console test\VSSetup.PowerShell.Test\bin\Debug\Microsoft.VisualStudio.Setup.PowerShell.Test.dll
```

If your machine supports it, you can install [Docker for Windows][docker], switch to Windows containers, and test in isolated containers for runtime behavior. You can run unit tests and integration tests together.
If your machine supports it, you can install [Docker for Windows][docker], switch to Windows containers, and test in isolated containers for runtime behavior. You can run functional tests and runtime tests together.

```batch
tools\test.cmd
```

For a faster development process, you can run `docker-compose run test` from the _docker_ directory to start an interactive PowerShell session in a container running the Visual Studio Remote Debugger. The build output and test scripts are mounted into the container. If you rebuild or modify the tests the container is automatically updated. You can also start the container detached and run tests faster without having to restart the container.
You can also run tests directly with `docker-compose`:

```batch
cd docker
docker-compose up -d
REM Repeat following command as often as desired.
docker-compose exec test powershell.exe -c invoke-pester c:\tests -enableexit
docker-compose stop
docker-compose -f docker\docker-compose.yml run test
```

### Debugging

You can run `docker-compose up -d` from the _docker_ directory to start an interactive shell for exploratory testing. If no other commands are passed when starting the container, the Visual Studio Remote Debugger will launch by default. Remote debugging services are discoverable on your private network.

1. Click *Debug -> Attach to Process*
2. Change *Transport* to "Remote (no authentication)"
3. Click *Find*
4. Click *Select* on the container (host name will be the container name)
5. Select "powershell" under *Available Processes*
6. Click *Attach*
You can use the following steps to start an environment for exploratory testing or to run and debug tests. The Visual Studio Remote Debugger will launch by default and should be discoverable on your private network.

1. Run:
```batch
docker-compose -f docker\docker-compose.yml -f docker\docker-compose.debug.yml up -d
REM Start an interactive shell
docker-compose -f docker\docker-compose.yml -f docker\docker-compose.debug.yml exec test powershell.exe
```
2. Click *Debug -> Attach to Process*
3. Change *Transport* to "Remote (no authentication)"
4. Click *Find*
5. Click *Select* on the container (host name will be the container name)
6. Select "powershell" under *Available Processes*
7. Click *Attach*
8. Run any commands you like in the interactive shell, or run all tests:
```powershell
Invoke-Pester C:\Tests -EnableExit
```
9. When finished, run:
```batch
docker-compose -f docker\docker-compose.yml -f docker\docker-compose.debug.yml down
```

If you know the host name (by default, the container name) or IP address (depending on your network configuration for the container), you can type it into the *Qualifier* directory along with port 4022, e.g. "172.22.0.1:4022".

Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Visual Studio Setup PowerShell Module
=====================================

[![build status: master](https://ci.appveyor.com/api/projects/status/4c1feyut6rvmw1dk/branch/master?svg=true)](https://ci.appveyor.com/project/VisualStudioSetup/vssetup-powershell/branch/master)
[![github release](https://img.shields.io/github/release/Microsoft/VSSetup.PowerShell.svg?logo=github)](https:/Microsoft/VSSetup.PowerShell/releases/latest)
[![github releases: all](https://img.shields.io/github/downloads/Microsoft/VSSetup.PowerShell/total.svg?logo=github&label=github)](https:/Microsoft/VSSetup.PowerShell/releases)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/VSSetup.svg)](https://powershellgallery.com/packages/VSSetup)
![build status: master](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-VSSetup.PowerShell-CI?branchName=master&label=master)
![build status: develop](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-VSSetup.PowerShell-CI?branchName=develop&label=develop)
[![github release](https://img.shields.io/github/release/Microsoft/VSSetup.PowerShell.svg?logo=github&logoColor=white)](https:/Microsoft/VSSetup.PowerShell/releases/latest)
[![github releases: all](https://img.shields.io/github/downloads/Microsoft/VSSetup.PowerShell/total.svg?logo=github&logoColor=white&label=github)](https:/Microsoft/VSSetup.PowerShell/releases)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/VSSetup.svg?logo=powershell&logoColor=white&label=gallery)](https://powershellgallery.com/packages/VSSetup)

This PowerShell module contains cmdlets to query instances of Visual Studio 2017 and newer. It also serves as a more useful sample of using the Setup Configuration APIs than the previously [published samples][samples] though those also have samples using VB and VC++.

Expand Down Expand Up @@ -48,6 +49,14 @@ Get-VSSetupInstance -All | Select-VSSetupInstance -Require 'Microsoft.VisualStud

To file issues or suggestions, please use the [Issues][issues] page for this project on GitHub.

## License

This project is licensed under the [MIT license](LICENSE.txt).

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

[issues]: https:/Microsoft/vssetup.powershell/issues
[psget]: http://go.microsoft.com/fwlink/?LinkID=746217
[releases]: https:/Microsoft/vssetup.powershell/releases
Expand Down
90 changes: 0 additions & 90 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit d1247fe

Please sign in to comment.