Skip to content

Add script to create a build drop from a sign job #2956

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
Sep 21, 2016

Conversation

cormacpayne
Copy link
Member

@cormacpayne cormacpayne commented Sep 16, 2016

Comments

Fix for issue #2929

This script will be used for Azure PowerShell releases.

It takes the build artifacts from a sign job and creates a new entry in the shared folder that will contain the msi, packages, scripts and WebPI installers from the PSReleaseDrop folder, and other xml files used for WebPI testing.

This script will also create and push a new branch to the given CodePlex WebPI fork containing the changes to the two xml files.


This checklist is used to make sure that common issues in a pull request are covered by the creator. You can find a more complete discussion of PowerShell cmdlet best practices here.

Below in Overall Changes, check off the boxes that apply to your PR. For the categories that you did not check off, you can remove them from this body. Within each of the categories that you did select, make sure that you can check off all of the boxes.

For information on cleaning up the commits in your pull request, click here.

Overall Changes

General

  • Title of the PR is clear and informative
  • There are a small number of commits that each have an informative message
  • If it applies, references the bug/issue that the PR fixes
  • All files have the Microsoft copyright header
  • Cmdlets refer to management libraries through nuget references - no dlls are checked in
  • The PR does not introduce breaking changes (unless a major version change occurs in the assembly and module)

Tests

  • PR includes test coverage for the included changes
  • Tests must use xunit, and should either use Moq to mock management client calls, or use the scenario test framework
  • PowerShell scripts used in tests must not use hard-coded values for location
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for existing resources
  • Tests should not use App.config files for settings
  • Tests should use the built-in PowerShell functions for generating random names when unique names are necessary - this will store names in the test recording
  • Tests should use Start-Sleep to pause rather than Thread.Sleep

Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

A few nits - want to make sure this is robust over re-ordering

$newContent[$idx + 2] = " </discoveryHint>"

# Change the buffer size to include the three lines just added
$buffer = 3
Copy link
Member

@markcowl markcowl Sep 16, 2016

Choose a reason for hiding this comment

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

Should we change $VSFeedSeen to false at this point?

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 thought about it, but didn't account for the case where the ordering of the file could change. That is a good idea. I will mark as false here.

if ($PSGetSeen -and $content[$idx] -like "*msiProductCode*")
{
$content[$idx] = " <msiProductCode>$ProductCode</msiProductCode>"
}
Copy link
Member

Choose a reason for hiding this comment

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

Shoudl we change $PSGetSeen to false at this point?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as comment for $VSFeedSeen.

$content[$idx] = " <trackingURL>http://www.microsoft.com/web/handlers/webpi.ashx?command=incrementproddownloadcount&amp;prodid=WindowsAzurePowershell&amp;version=$PSVersion&amp;prodlang=en</trackingURL>"
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Should have a condition here which ends the $PSGetSeen, to make this more robust over changed orderings in the file

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as comment for $VSFeedSeen.

@markcowl markcowl merged commit a7694fe into Azure:dev Sep 21, 2016
@cormacpayne cormacpayne deleted the build-drop branch October 28, 2016 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants