Commit graph

64 commits

Author SHA1 Message Date
Paul Higinbotham d4bf5c87bc Fix tests running in Azure DevOps (#8220) 2018-11-09 15:11:02 -08:00
Aditya Patwardhan 487073e57b
Add functionality to create a test package (#8087) 2018-10-19 14:56:58 -07:00
Travis Plunk c7ed7129b2
update metadata json in preparation for 6.1 release (#7741)
ReleaseTag is now StableReleaseTag
NextReleaseTag is not PreviewReleaseTag
Added ServicingReleaseTag for the N-1 Stable release
2018-09-07 18:12:10 -07:00
Travis Plunk e2a45f0992
Add tests to report when package references are out of date (#7661)
Add tests to report when package references are out of date
  - Also, update the packaging script to generate updated `files.wxs`
2018-08-31 12:50:51 -07:00
Travis Plunk 9947985b87
Don't upload artifacts during pull request due to missing VSTS feature (#7588) 2018-08-21 16:55:18 -07:00
Travis Plunk 40532d9a2e
Add VSTS CI for Windows (#7536)
- Add VSTS CI for Windows
    - Disable `Access-denied test for Get-Item C:\windows\appcompat\Programs\Install -ErrorAction Stop`, because the path does not always exist
        - https://github.com/PowerShell/PowerShell/issues/7553
    - Disable `Should give .sys file if the fullpath is specified with hidden and force parameter`, because pagefile.sys doesn't always exist and other files don't meet test's requirement.
        - https://github.com/PowerShell/PowerShell/issues/7554
    - Disable some `Test-Connection` tests for same reasons they failed on VSTS Linux
        - https://github.com/PowerShell/PowerShell/issues/7555
    - Disable `Test-FileCatalog should pass when catalog is in the same folder as files being tested`, because the CmdLet does not work in that scenario
         - Also, give details needed to investigate when the test fails
         - https://github.com/PowerShell/PowerShell/issues/7556
    - Update `appveyor.psm1` to work with VSTS
    - Update `HelpersRemoting.psm1` `New-RemoteSession` to work for CimSession (discovered an issue during the investigation)
    - Update `Test wildcard with drive relative directory path` to work when there are multiple drives
         - Disable on non-windows machines since the test is assuming drive letters
    - Update `New-CimSession` Tests to requireAdmin
         - Also, make sure session name is a string
    - Add functions to save and restore psoptions
    - update `.gitatttributes` so files clone like they do on appveyor
2018-08-17 22:06:51 -07:00
Dongbo Wang 25c127c3bc
Update CI scripts to support running tests for experimental features (#7419) 2018-08-03 11:20:14 -07:00
Christoph Bergmeister fbbca53f4c AppVeyor build matrix: more efficient build job split to reduce total time by another 5 minutes (#7021)
Closes #6944

Following PR #6945, further, reduce the total build time (without any disadvantages) by around 5 minutes by making sure there is a more even split between the 2 build jobs (the 2nd build job used to be much shorter).
Therefore this PR moves also the xUnit and Pester-Admin tests into the 2nd build job. If it is a daily/feature test commit, then the feature tests will also happen (only) in the 2nd build job. Because both jobs now run tests, the failfast option was removed. The final question from my side is whether running tests in 2 build jobs is OK for the daily build, which uploads code coverage results?

The time to wait for the AppVeyor build results is now 15 +/- 2 minutes, which is a huge improvement to what used to be around 28 minutes before the build matrix was introduced.
2018-06-11 14:18:51 -07:00
Christoph Bergmeister 2ec3056f9e Use Appveyor matrix for faster PR builds (#6945)
Related: #6944

Reduce PR build time by 5 minutes by:

Having Packaging as a separate build job in a matrix -> runs in parallel in PR builds because the Microsoft account is a paid account that allows that (at no additional costs)
Not caching the dotnet folder anymore, which is too large and the overhead of zipping/unzipping/upload/download does not pay off (and fails in forked builds that are on a free AppVeyor account due to the size).
Setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to 1 because the initialization of the dotnet CLI cache (1 minute) does not pay off for the whole build.
The total build time of builds on a fork that is on a free AppVeyor account and therefore does not have parallelism, remains the same due to the time saving of redundant caching.

This is just a simple example of what we can easily achieve, we could continue this pattern and split the test runs as per the referenced issue to bring PR builds down to 10 minutes (but this will incur an increase for fork builds on free AppVeyor accounts)
2018-06-05 10:48:44 -07:00
Travis Plunk 948532ac83
Don't cache files that change every build (#6901)
Don't cache files that change every build
Fixes #6894
2018-05-21 14:18:56 -07:00
Steve Lee f760fde0b7 Remove support for file to opt-out of telemetry, only support env var (#6601)
Since a PR added support to opt out of telemetry via an environment variable, we can remove the,
always intended to be a temporary, solution of deleting a file to opt out of telemetry since the
environment variable can be defined at the system level and exist before even installing PowerShell Core.

Because the variable is defined as opt out, a value of true, yes, or 1 means no telemetry is sent.
2018-04-13 10:29:39 -07:00
Travis Plunk 77f36498e6
Simplify the paths the MSI uses (#6442)
- Implementation of PowerShell/PowerShell-RFC#115 (If anything changes in the RFC, we will treat it as a bug, and fix it later)
- Update registry and directory paths to use 6 for the version for stable and 6-preview for a preview release
- Add checkbox to set path
- default checkbox to off for preview builds and on for stable builds
2018-04-02 10:47:29 -07:00
Travis Plunk 1730d8c496
MSI: update path with proper value (#6441)
MSI: update path with proper value
- Add verification that path is updated
2018-03-21 12:23:24 -07:00
Dongbo Wang d623c9f10c Add '-Restore' when build win-arm and win-arm64 (#6353) 2018-03-09 09:50:26 -08:00
Travis Plunk 2d58072460 Make sure package verification failure fails the AppVeyor build (#6337) 2018-03-08 15:58:59 -08:00
Dongbo Wang 6d191970c5
Build: Remove two unneeded lines from 'Invoke-AppveyorFinish' (#6344) 2018-03-08 14:51:10 -08:00
Dan Travison 0c845b94c7 Rename log and logerror to Write-Log [$message] [-error] (#6333)
Fix #6332
This change renames log and logerror functions to a single Write-Log [$message] [-error] function to avoid conflicting with the log command on MacOS.
2018-03-08 10:47:20 -08:00
Travis Plunk f1c0c2ade5
Clean build during daily build to ensure MSI package is generate correctly (#6334)
Clean build during the daily build to ensure MSI package is generated correctly
- Do another clean build directly before packaging to clean up files that test has added
2018-03-07 19:47:21 -08:00
Steve Lee c1c5344a88 Update copyright and license headers (#6134)
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: #6140

Manually reviewed each change.

Fix #6073
2018-02-13 09:23:53 -08:00
Christoph Bergmeister 88909811ff Msi installer: Add smoke test (#6105)
PR 6043 broke the installer (issue #6095). To prevent this from happening in the future, add a smoke test that installs the msi in appveyor build and make build fail if installation failed.
It uses the exit code to determine the success. The reason why it does not fail in the current state is because as I pointed out here, the failing custom action is not returning its exit code.
2018-02-07 15:00:42 -08:00
Dongbo Wang 117e83a025 Add xUnit tests for reading Policy settings from config file 2018-01-04 13:40:51 -08:00
Dongbo Wang 4dc5512c83
Update packaging and release build scripts to produce zip packages for win-arm/win-arm64 (#5664) 2017-12-11 13:57:02 -08:00
Travis Plunk 25617f15c2 build: unbundle pester (#5623)
* remove pester module

* restore Pester as a module only in CI build from the git repo

* mark appveyor builds as CI builds

* remove pester exclusions

* mark travis builds as ci

* exclude publish folder from spell check

* do not run spell check on publish folder
2017-12-04 17:16:53 -08:00
Chunqing Chen 52df947080 Fix xunnit test for PS (#4780)
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
2017-11-30 14:44:41 -08:00
Travis Plunk e1a57e5194
Update target tag for master CI to 6.1.0-preview.1 (#5513)
* use metadata JSON to create release tag in CI
2017-11-21 13:51:10 -08:00
Steve Lee 2cc091115b Rename powershell.exe to pwsh.exe (#5101)
- Rename powershell.exe to pwsh.exe
- Fixe appveyor.psm1
- Update MSI to include 'pwsh' in path and app paths
- Revert change for hyper-v powershell direct
- Update names in packaging.psm1.
- Fix check for SxS
2017-10-17 17:25:11 -07:00
Steve Lee 9791116979 reduce output of pester for CI (#4855) 2017-09-19 14:56:32 -07:00
Ilya e588a18c76 Refactor MSBuild project files to get PowerShell version from git tag (#4182)
Extract information about the release tag, number of commits since the tag and the hash of the latest commit within a MSBuild target, and bake that information into version properties of the assemblies appropriately.
2017-09-06 15:20:25 -07:00
Travis Plunk bd42fe95b4 change the default windows RID to win7-<arch> (#4701) 2017-08-29 17:21:50 -07:00
Dongbo Wang feeb8e1d25 [Feature] Clean up FullCLR related scripts/docs (#4580) 2017-08-16 12:07:45 -07:00
Travis Plunk 0ca44f147d Package only from the powershell folder at the root directory (#4569) 2017-08-15 16:17:45 -07:00
Travis Plunk e829053e9e Add ability to package all of powershell core as a NuGet Package (#4363)
So that PowerShell can be installed using PackageManagement cmdlets find-package and install-package.
2017-08-01 14:35:50 -07:00
Travis Plunk 76e184b0ba move packaging CmdLets to separate module (#4319)
* fix PsScriptAnalyzer issues
* update release docs
2017-07-23 12:29:33 -07:00
Travis Plunk 0f34324570 Fix PRs not running Feature (#4304) 2017-07-22 15:34:03 -07:00
bergmeister ffd39b2853 PSScriptAnalyzer fixes by category (#4261)
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select')
- Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison.
- A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison
- Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null'
2017-07-21 21:03:49 -07:00
Travis Plunk 3b3b3d1b70 Fix build message getting truncated on rerun (#4297) 2017-07-19 16:47:11 -07:00
Travis Plunk 9571f8f2f4 Add ability to run feature tests for pr (#4277) 2017-07-19 10:33:58 -07:00
Travis Plunk 73b3b0895c Use cached 'dotnet' in AppVeyor (#4278) 2017-07-18 11:39:04 -07:00
James Truher [MSFT] 599eae9b1b Do not send telemetry in CI (#3785)
This removes the telemetry semaphore file in CI for both Travis-CI and AppVeyor
2017-05-17 11:08:38 -07:00
Dongbo Wang 79a1f80309 Update build script to always use 'dotnet publish' (#3589)
Also update 2 building docs
2017-04-18 13:12:35 -07:00
Dongbo Wang 54fa658e31 Migrate from project.json to MSBuild (#3398)
- FullCLR build is disabled in this change.
- FullCLR build related functionalities in `build.psm1` and `AppVeyor.psm1` are disabled. They are not cleaned up from `build.psm1` and `AppVeyor.psm1` yet. We need to adopt .NET Core 2.0 to verify the portable module concept, and if that works well, we will remove the Windows PowerShell source code and clean up our scripts.
- `dnxcore50` and `portable-net5+win8` target framework monikers are removed.
- Dependency on `Microsoft.NETCore.Portable.Compatibility` is removed. It's not necessary, but it may come back when we work on supporting the `portable module`. Its necessity can be reviewed at that time.
- I didn't spend the time to try building powershell in Visual Studio 2017. We should have a separate issue for that. It's tracked by #3400

The `TypeCatalogParser` project is replaced by a MSBuild target to gather the dependency information.
Due to .NET Core SDK issue [#1021](https://github.com/dotnet/sdk/issues/1021), our meta-package project `Microsoft.PowerShell.SDK` starts to generate an empty assembly during the build and that results in an empty assembly `Microsoft.PowerShell.SDK.dll` appear in `publish` folder and in `.deps.json` file. We cannot simply remove the assembly because it's now part of the TPA, and removing it will cause powershell to crash at startup. We have to live with this empty assembly until that .NET Core SDK issue is fixed.  It's tracked by #3401.
2017-03-23 13:04:52 -07:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Aditya Patwardhan a06778ca75 Change package name to CodeCoverage.zip from Powershell_6.0.0... (#2886)
Changed the package name from the standard Powershell_6.0.0-xx-gxxxxxxx to
CodeCoverage.zip so that it is easier to download the latest package from
the AppVeyor permalink for last successful build.
2016-12-15 10:35:55 -08:00
Aditya Patwardhan 19c709b986 Added check for empty $nugetArtifacts (#2817)
When the build fails there are no $nugetArtifacts, so AddRange fails
2016-12-01 12:58:14 -08:00
Aditya Patwardhan 991d6075af Added -publish to codecoverage package generation and fixed package name (#2797)
* Added -publish to codecoverage package generation and fixed package name

Added -Publish to Start-PSBuild used by CodeCoverage configuration so that
.netcore dependencies are also included in the package. This makes the
package usable on systems that do not have .netcore in path.

Fixed the name of the coverage package by making it consistent with other
package names.

* Created a function to generate packagename
2016-11-28 17:57:04 -08:00
Aditya Patwardhan 157e9480eb Assigned all ArrayList.Add() to $null (#2776)
* Assigned all ArrayList.Add() to $null
ArrayList.Add() returns the array list size after the add. This causes the
value to be thrown on the pipeline. Assigning them to $null as we do not
need to know the size after addition. This causes errors and unnecessary
output on the AppVeyor console.
* Changed the way nuget artifacts are added to arraylist
* Remove unnecessary `$null =` for `AddRange` call because it's a void method.
2016-11-23 16:38:50 -08:00
Dongbo Wang 6f92140886 Add back -Configuration 'Release' to make sure AppVeyor CIs produce 'Release' bits (#2773) 2016-11-23 12:54:52 -08:00
Aditya Patwardhan ead4df4097 Moved publishing of code coverage artifacts to test_script phase (#2760)
* Moved publishing of code coverage artifacts to after_test phase

The webhook for build completion is called after the after_test phase
hence we needed to publish code coverage artifacts before that. Moved the
logic for compression and publish the artifacts after running tests.

* Added check for daily build

* Address code review comments.

* Addressed code review comments

Addressed comments about definition of artifacts.
Defined new function for after_test phase.
2016-11-23 12:22:18 -08:00
Jianyun Tao bfe59b3495 # This is a combination of 3 commits.
# The first commit's message is:

Changed to PSModuleRestore switch, i.e., by default no PSModule install

# This is the commit message #2:

install PowerShell modules to publish folder as well as one level up

# This is the commit message #3:

removed workaround
2016-11-19 23:52:16 -08:00
Sergei Vorobev 41f8c9c7df Remove redundent $buildConfiguration in appveyor.psm1 2016-11-18 17:45:57 -08:00