Skip to content
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

new build scripts for release pipeline #1442

Merged
merged 16 commits into from Apr 29, 2020

Conversation

JamesWTruher
Copy link
Member

PR Summary

The previous build scripts for release used Docker which is no longer available for MS build/signing pipelines. These needed to be rewritten them to not use docker and I created some additional configuration scripts for signing. There shouldn't be any affect on the product. I made a slight improvement to one of the tests so when it fails we get better diagnosability.

PR Checklist

build.ps1 Outdated Show resolved Hide resolved
build.psm1 Outdated Show resolved Hide resolved
}

Pop-Location
}
}

function New-Catalog
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', '')]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a specific diagnostic here that was appearing?

Copy link
Member Author

Choose a reason for hiding this comment

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

One of the stages in the sign build was to run all the tests, and one of the tests found new-filecatalog not being present in all versions, but I hadn't picked up the latest master. Also, I removed the test phase from the build since it happens in CI. I can pull this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

nope - I need to put it back - now it's failing in the CI build

Copy link
Contributor

Choose a reason for hiding this comment

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

No worries -- perhaps we can open an issue to track removing this?

build.psm1 Outdated Show resolved Hide resolved
tools/releaseBuild/AssemblySignConfig.xml Outdated Show resolved Hide resolved
build.psm1 Outdated
$framework,
"--configuration",
"$buildConfiguration"
if ( $env:InVSTS ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The TF_BUILD environment variable is defined in Azure DevOps and could be used for that instead of defining a custom variable on the release build. Or do you need to specifically know if you are running in the release build? If so, why do we need to build differently with a different output directory when we copy it to the module directory anyway at the end?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try that - thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

The more important question to understand for me is why we cannot keep the existing directory structure?

@@ -163,27 +165,36 @@ function Start-ScriptAnalyzerBuild
$foundVersion = Get-InstalledCLIVersion
Write-Warning "No suitable dotnet CLI found, requires version '$requiredVersion' found only '$foundVersion'"
}
$verboseWanted = $false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this needed? PowerShell has the $VerbosePreference variable for that and should automatically propagate the usage of -Verbose to down to the other called cmdlets (splatting is the only exception where this does not work as far as I am aware)

Copy link
Member Author

Choose a reason for hiding this comment

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

because I want finer grained control, I don't want verbose everywhere. I tried it without and the logs are super large and I would rather be more targeted (no reason to be verbose on import-module for example).

}

Pop-Location
}
}

function New-Catalog
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', '')]
Copy link
Contributor

Choose a reason for hiding this comment

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

No worries -- perhaps we can open an issue to track removing this?

@JamesWTruher JamesWTruher merged commit 7bb24d2 into PowerShell:master Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants