Skip to content

Commit d1247fe

Browse files
authored
Create release
Release fix for #40
2 parents 4eb2842 + 62f3905 commit d1247fe

25 files changed

Lines changed: 368 additions & 464 deletions

.vsts-ci.yml

Lines changed: 35 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -2,160 +2,43 @@
22
# Licensed under the MIT license. See LICENSE.txt in the project root for license information.
33

44
trigger:
5+
batch: true
56
branches:
67
include:
78
- master
9+
- develop
810
paths:
911
exclude:
10-
- appveyor.yml
11-
12-
phases:
13-
- phase: Build
14-
queue:
15-
name: VSEng-MicroBuildVS2017
16-
demands:
17-
- msbuild
18-
- visualstudio
19-
- vstest
20-
parallel: 2
21-
matrix:
22-
debug:
23-
Configuration: Debug
24-
SignType: Test
25-
release:
26-
Configuration: Release
27-
28-
variables:
29-
Platform: Any CPU
30-
Solution: '*.sln'
31-
32-
steps:
33-
- task: NuGetToolInstaller@0
34-
displayName: Install nuget
35-
inputs:
36-
versionSpec: '4.4.1'
37-
38-
- task: NuGetCommand@2
39-
displayName: Restore nuget packages
40-
inputs:
41-
restoreSolution: $(Solution)
42-
43-
- task: MicroBuildSigningPlugin@1
44-
displayName: Install MicroBuild signing plugin
45-
inputs:
46-
esrpSigning: true
47-
signType: $(SignType)
48-
49-
- powershell: |
50-
$ErrorActionPreference = 'Stop'
51-
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
52-
Install-Module -Name platyPS -Repository PSGallery -SkipPublisherCheck -Force
53-
displayName: Install PowerShell modules
54-
55-
- powershell: |
56-
New-ExternalHelp -Path docs\VSSetup -OutputPath "src\VSSetup.PowerShell\bin\${env:CONFIGURATION}" -Force
57-
displayName: Compile documentation
58-
env:
59-
CONFIGURATION: $(Configuration)
60-
workingDirectory: $(Build.SourcesDirectory)
61-
62-
- task: VSBuild@1
63-
displayName: Build solution
64-
inputs:
65-
solution: $(Solution)
66-
configuration: $(Configuration)
67-
platform: $(Platform)
68-
msbuildArgs: /p:RunCodeAnalysis=true /p:TreatWarningsAsErrors=true "/flp:Verbosity=Diagnostic;LogFile=$(Build.ArtifactStagingDirectory)\logs\build.log"
69-
maximumCpuCount: true
70-
71-
- task: VSTest@2
72-
displayName: Test solution
73-
inputs:
74-
testAssemblyVer2: |
75-
**\$(Configuration)\*test*.dll
76-
!**\obj\**
77-
configuration: $(Configuration)
78-
platform: $(Platform)
79-
codeCoverageEnabled: true
80-
runInParallel: true
81-
82-
- powershell: |
83-
If (-Not (Test-Path -Path $env:OUTDIR -PathType Container)) { $null = New-Item -Path $env:OUTDIR -Type Directory }
84-
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"
85-
displayName: Archive output
86-
env:
87-
CONFIGURATION: $(Configuration)
88-
OUTDIR: $(Build.BinariesDirectory)\bin\$(Configuration)
89-
SRCDIR: src\VSSetup.PowerShell\bin\$(Configuration)
90-
workingDirectory: $(Build.SourcesDirectory)
91-
92-
- task: NuGetCommand@2
93-
displayName: Package output
94-
inputs:
95-
command: pack
96-
basePath: $(Build.SourcesDirectory)
97-
packDestination: $(Build.BinariesDirectory)\bin\$(Configuration)
98-
packagesToPack: pkg\VSSetup\VSSetup.nuspec
99-
configuration: $(Configuration)
100-
versioningScheme: byEnvVar
101-
versionEnvVar: GitBuildVersionSimple
102-
includeSymbols: true
103-
buildProperties: CommitId=$(Build.SourceVersion)
104-
105-
- task: VSBuild@1
106-
displayName: Sign packages
107-
condition: and(succeeded(), eq(variables['Configuration'], 'Release'))
108-
inputs:
109-
solution: pkg\VSSetup\VSSetup.signproj
110-
configuration: $(Configuration)
111-
platform: $(Platform)
112-
msbuildArgs: /p:OutDir=$(Build.BinariesDirectory)\bin\$(Configuration) "/flp:Verbosity=Diagnostic;LogFile=$(Build.ArtifactStagingDirectory)\logs\sign.log"
113-
114-
- task: MicroBuildCodesignVerify@1
115-
displayName: Validate packages
116-
condition: and(succeeded(), eq(variables['Configuration'], 'Release'))
117-
inputs:
118-
ExcludeSNVerify: true
119-
TargetFolder: $(Build.BinariesDirectory)\bin\$(Configuration)
120-
WhiteListPathForCerts: build\nosign.txt
121-
122-
- task: CopyFiles@2
123-
displayName: Copy output
124-
inputs:
125-
SourceFolder: $(Build.SourcesDirectory)\src
126-
Contents: '**\bin\$(Configuration)\**'
127-
TargetFolder: $(Build.ArtifactStagingDirectory)\drop\src
128-
129-
- task: CopyFiles@2
130-
displayName: Copy packages
131-
inputs:
132-
SourceFolder: $(Build.BinariesDirectory)
133-
Contents: bin\$(Configuration)\**
134-
TargetFolder: $(Build.ArtifactStagingDirectory)\drop
135-
136-
- task: CopyFiles@2
137-
displayName: Copy tools
138-
inputs:
139-
SourceFolder: $(Build.SourcesDirectory)
140-
Contents: tools\**
141-
TargetFolder: $(Build.ArtifactStagingDirectory)\drop
142-
143-
- task: PublishBuildArtifacts@1
144-
displayName: Publish drop
145-
inputs:
146-
ArtifactName: drop
147-
PathtoPublish: $(Build.ArtifactStagingDirectory)\drop
148-
149-
- task: PublishBuildArtifacts@1
150-
displayName: Publish logs
151-
condition: succeededOrFailed()
152-
continueOnError: true
153-
inputs:
154-
ArtifactName: logs
155-
PathtoPublish: $(Build.ArtifactStagingDirectory)\logs
156-
157-
- task: MicroBuildCleanup@1
158-
displayName: Clean up
159-
condition: succeededOrFailed()
160-
161-
# vim: set ai et st=2 sts=2 sw=2:
12+
- README.md
13+
14+
pr: none
15+
16+
queue:
17+
name: VSEng-MicroBuildVS2017
18+
timeoutInMinutes: 120
19+
demands:
20+
- MSBuild
21+
- VisualStudio
22+
- VSTest
23+
24+
steps:
25+
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
26+
displayName: Install MicroBuild signing plugin
27+
inputs:
28+
esrpSigning: true
29+
signType: $(SignType)
30+
31+
- template: build/build.yml
32+
parameters:
33+
BuildConfiguration: $(BuildConfiguration)
34+
BuildPlatform: $(BuildPlatform)
35+
Sign: true
36+
37+
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
38+
displayName: Detect components
39+
inputs:
40+
sourceScanPath: $(Build.SourcesDirectory)
41+
42+
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
43+
displayName: Clean up
44+
condition: succeededOrFailed()

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Code of Conduct
2+
===============
3+
4+
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 [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ This project uses the following software. Newer versions may work but backward c
77

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

10-
### Optional
11-
12-
Some projects require optional software to open or otherwise use in Visual Studio. They are not required to build the solution using MSBuild.
13-
14-
* [NuProj Package Project](https://marketplace.visualstudio.com/items?itemName=NuProjTeam.NuGetPackageProject)
15-
1610
## Coding
1711

1812
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.
@@ -49,34 +43,43 @@ nuget install xunit.runner.console -outputdirectory packages
4943
packages\xunit.runner.console.<version>\tools\xunit.runner.console test\VSSetup.PowerShell.Test\bin\Debug\Microsoft.VisualStudio.Setup.PowerShell.Test.dll
5044
```
5145

52-
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.
46+
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.
5347

5448
```batch
5549
tools\test.cmd
5650
```
5751

58-
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.
52+
You can also run tests directly with `docker-compose`:
5953

6054
```batch
61-
cd docker
62-
docker-compose up -d
63-
64-
REM Repeat following command as often as desired.
65-
docker-compose exec test powershell.exe -c invoke-pester c:\tests -enableexit
66-
67-
docker-compose stop
55+
docker-compose -f docker\docker-compose.yml run test
6856
```
6957

7058
### Debugging
7159

72-
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.
73-
74-
1. Click *Debug -> Attach to Process*
75-
2. Change *Transport* to "Remote (no authentication)"
76-
3. Click *Find*
77-
4. Click *Select* on the container (host name will be the container name)
78-
5. Select "powershell" under *Available Processes*
79-
6. Click *Attach*
60+
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.
61+
62+
1. Run:
63+
```batch
64+
docker-compose -f docker\docker-compose.yml -f docker\docker-compose.debug.yml up -d
65+
66+
REM Start an interactive shell
67+
docker-compose -f docker\docker-compose.yml -f docker\docker-compose.debug.yml exec test powershell.exe
68+
```
69+
2. Click *Debug -> Attach to Process*
70+
3. Change *Transport* to "Remote (no authentication)"
71+
4. Click *Find*
72+
5. Click *Select* on the container (host name will be the container name)
73+
6. Select "powershell" under *Available Processes*
74+
7. Click *Attach*
75+
8. Run any commands you like in the interactive shell, or run all tests:
76+
```powershell
77+
Invoke-Pester C:\Tests -EnableExit
78+
```
79+
9. When finished, run:
80+
```batch
81+
docker-compose -f docker\docker-compose.yml -f docker\docker-compose.debug.yml down
82+
```
8083

8184
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".
8285

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Visual Studio Setup PowerShell Module
22
=====================================
33

4-
[![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)
5-
[![github release](https://img.shields.io/github/release/Microsoft/VSSetup.PowerShell.svg?logo=github)](https://github.com/Microsoft/VSSetup.PowerShell/releases/latest)
6-
[![github releases: all](https://img.shields.io/github/downloads/Microsoft/VSSetup.PowerShell/total.svg?logo=github&label=github)](https://github.com/Microsoft/VSSetup.PowerShell/releases)
7-
[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/VSSetup.svg)](https://powershellgallery.com/packages/VSSetup)
4+
![build status: master](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-VSSetup.PowerShell-CI?branchName=master&label=master)
5+
![build status: develop](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-VSSetup.PowerShell-CI?branchName=develop&label=develop)
6+
[![github release](https://img.shields.io/github/release/Microsoft/VSSetup.PowerShell.svg?logo=github&logoColor=white)](https://github.com/Microsoft/VSSetup.PowerShell/releases/latest)
7+
[![github releases: all](https://img.shields.io/github/downloads/Microsoft/VSSetup.PowerShell/total.svg?logo=github&logoColor=white&label=github)](https://github.com/Microsoft/VSSetup.PowerShell/releases)
8+
[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/VSSetup.svg?logo=powershell&logoColor=white&label=gallery)](https://powershellgallery.com/packages/VSSetup)
89

910
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++.
1011

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

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

52+
## License
53+
54+
This project is licensed under the [MIT license](LICENSE.txt).
55+
56+
## Code of Conduct
57+
58+
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 [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
59+
5160
[issues]: https://github.com/Microsoft/vssetup.powershell/issues
5261
[psget]: http://go.microsoft.com/fwlink/?LinkID=746217
5362
[releases]: https://github.com/Microsoft/vssetup.powershell/releases

appveyor.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)