Skip to content

Commit

Permalink
Merge branch 'hotfix/0.10.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandervelde committed Mar 6, 2018
2 parents c644b45 + 8099ac0 commit e7be466
Show file tree
Hide file tree
Showing 13 changed files with 362 additions and 43 deletions.
12 changes: 5 additions & 7 deletions settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,14 @@
<!--
Security
-->
<PropertyGroup>
<ItemGroup Condition=" 'ShouldLoadGpgKeyServers' == 'true' ">
<!--
The GPG key server that will be used to pull GPG keys from.
-->
<!-- <GpgKeyServer>pgp.mit.edu</GpgKeyServer> -->
</PropertyGroup>
<!--
<GpgKeyServers Include="pgp.mit.edu" />
-->
</ItemGroup>


<!--
Expand All @@ -378,10 +380,6 @@
<NuGetPackageFiles
Include="$(DirWorkspace)\packages.config"
Condition="Exists('$(DirWorkspace)\packages.config')" />
<NuGetPackageFiles
Condition=" '$(DirSrc)' != '' "
Include="$(DirSrc)\**\packages.config"
Exclude="$(DirSrc)\**\node_modules\**\packages.config;$(DirSrc)\**\bin\**\packages.config;$(DirSrc)\**\obj\**\packages.config" />
-->
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/nbuildkit/actions/build/build.shared.preuser.props
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
-->
<ToolsExternalVisualStudioDir Condition=" '$(ToolsExternalVisualStudioDir)' == '' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools')">C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools</ToolsExternalVisualStudioDir>
<ToolsExternalVisualStudioDir Condition=" '$(ToolsExternalVisualStudioDir)' == '' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise')">C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise</ToolsExternalVisualStudioDir>
<ToolsExternalVisualStudioDir Condition=" '$(ToolsExternalVisualStudioDir)' == '' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional')">C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional</ToolsExternalVisualStudioDir>
<ToolsExternalVisualStudioDir Condition=" '$(ToolsExternalVisualStudioDir)' == '' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio 14.0')">C:\Program Files (x86)\Microsoft Visual Studio 14.0</ToolsExternalVisualStudioDir>
<ToolsExternalVisualStudioDir Condition=" '$(ToolsExternalVisualStudioDir)' == '' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio 12.0')">C:\Program Files (x86)\Microsoft Visual Studio 12.0</ToolsExternalVisualStudioDir>
<ToolsExternalVisualStudioDir Condition=" '$(ToolsExternalVisualStudioDir)' == '' AND Exists('C:\Program Files (x86)\Microsoft Visual Studio 11.0')">C:\Program Files (x86)\Microsoft Visual Studio 11.0</ToolsExternalVisualStudioDir>
Expand Down
34 changes: 31 additions & 3 deletions src/nbuildkit/actions/shared.errorcodes.props
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,19 @@
<NBuildKitErrorIdTasksGenerateTargetsFailedToSaveFile>NBuildKit.GenerateTargets.FailedToSaveFile</NBuildKitErrorIdTasksGenerateTargetsFailedToSaveFile>
<NBuildKitErrorCodeTasksGenerateTargetsFailedToSaveFile>NBK0357</NBuildKitErrorCodeTasksGenerateTargetsFailedToSaveFile>

<!-- File Hash: Error codes from 0360 - 0379 -->
<OpsToolsBuildErrorIdCalculateHashFailure>NBuildKit.CalculateHash.Failure</OpsToolsBuildErrorIdCalculateHashFailure>
<OpsToolsBuildErrorCodeCalculateHashFailure>NBK0361</OpsToolsBuildErrorCodeCalculateHashFailure>
<!-- File Hash: Error codes from 0360 - 0369 -->
<NBuildKitErrorIdCalculateHashFailure>NBuildKit.CalculateHash.Failure</NBuildKitErrorIdCalculateHashFailure>
<NBuildKitErrorCodeCalculateHashFailure>NBK0361</NBuildKitErrorCodeCalculateHashFailure>

<!-- GPG signature: Error codes from 0370 - 0379 -->
<NBuildKitErrorIdValidateGpgSignatureNoGpgKey>NBuildKit.ValidateGpgSignature.NoGpgKey</NBuildKitErrorIdValidateGpgSignatureNoGpgKey>
<NBuildKitErrorCodeValidateGpgSignatureNoGpgKey>NBK0371</NBuildKitErrorCodeValidateGpgSignatureNoGpgKey>

<NBuildKitErrorIdValidateGpgSignatureNoGpgServers>NBuildKit.ValidateGpgSignature.NoGpgServers</NBuildKitErrorIdValidateGpgSignatureNoGpgServers>
<NBuildKitErrorCodeValidateGpgSignatureNoGpgServers>NBK0372</NBuildKitErrorCodeValidateGpgSignatureNoGpgServers>

<NBuildKitErrorIdValidateGpgSignatureFailure>NBuildKit.ValidateGpgSignature.Failure</NBuildKitErrorIdValidateGpgSignatureFailure>
<NBuildKitErrorCodeValidateGpgSignatureFailure>NBK0373</NBuildKitErrorCodeValidateGpgSignatureFailure>


<!-- Application interaction -->
Expand Down Expand Up @@ -417,6 +427,24 @@
<Description>Failed to load the task types from the targets assembly.</Description>
</ErrorInformation>

<ErrorInformation Include="$(NBuildKitErrorIdCalculateHashFailure)">
<Code>$(NBuildKitErrorCodeCalculateHashFailure)</Code>
<Description>The provided hash value did not match the calculated hash value.</Description>
</ErrorInformation>

<ErrorInformation Include="$(NBuildKitErrorIdValidateGpgSignatureNoGpgKey)">
<Code>$(NBuildKitErrorCodeValidateGpgSignatureNoGpgKey)</Code>
<Description>No GPG key was provided. Cannot validate the GPG signature.</Description>
</ErrorInformation>
<ErrorInformation Include="$(NBuildKitErrorIdValidateGpgSignatureNoGpgServers)">
<Code>$(NBuildKitErrorCodeValidateGpgSignatureNoGpgServers)</Code>
<Description></Description>
</ErrorInformation>
<ErrorInformation Include="$(NBuildKitErrorIdValidateGpgSignatureFailure)">
<Code>$(NBuildKitErrorCodeValidateGpgSignatureFailure)</Code>
<Description>GPG signature verification failed.</Description>
</ErrorInformation>

<ErrorInformation Include="$(NBuildKitErrorIdFxCopNoProjectFileDefined)">
<Code>$(NBuildKitErrorCodeFxCopNoProjectFileDefined)</Code>
<Description>No project file was provided for FxCop.</Description>
Expand Down
18 changes: 14 additions & 4 deletions src/nbuildkit/actions/shared.postuser.props
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@
</SystemTemplateVersion>
</ItemGroup>

<!--
Security
-->
<ItemGroup Condition=" '$(ShouldLoadGpgKeyServers)' == 'true' AND '@(GpgKeyServers)' == '' ">
<!--
The GPG key servers that will be used to pull GPG keys from.
-->
<GpgKeyServers Include="ha.pool.sks-keyservers.net" />
<GpgKeyServers Include="hkp://p80.pool.sks-keyservers.net:80" />
<GpgKeyServers Include="keyserver.ubuntu.com" />
<GpgKeyServers Include="hkp://keyserver.ubuntu.com:80" />
<GpgKeyServers Include="pgp.mit.edu" />
</ItemGroup>


<!--
**** PREPARE - NUGET RESTORE ****
Expand All @@ -90,10 +104,6 @@
<NuGetPackageFiles
Condition="Exists('$(DirWorkspace)\packages.config')"
Include="$(DirWorkspace)\packages.config" />
<NuGetPackageFiles
Condition=" '$(DirSrc)' != '' "
Exclude="$(DirSrc)\**\node_modules\**\packages.config;$(DirSrc)\**\bin\**\packages.config;$(DirSrc)\**\obj\**\packages.config"
Include="$(DirSrc)\**\packages.config" />
</ItemGroup>


Expand Down
13 changes: 7 additions & 6 deletions src/nbuildkit/actions/shared.prepare.copy.archive.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</PropertyGroup>
<PropertyGroup>
<ShouldLoadArchiveFilesToCopy>true</ShouldLoadArchiveFilesToCopy>
<ShouldLoadGpgKeyServers>true</ShouldLoadGpgKeyServers>
<ShouldLoadTemplateTokens>true</ShouldLoadTemplateTokens>
<ShouldLoadTemplateVersion>true</ShouldLoadTemplateVersion>
<ShouldLoadSystemTemplateVersion>true</ShouldLoadSystemTemplateVersion>
Expand Down Expand Up @@ -45,13 +46,13 @@
<CallTarget
Condition=" '%(ArchiveFilesToCopy.HashFile)' != '' AND '%(ArchiveFilesToCopy.SignatureFile)' != '' "
Targets="_nBuildKit_Shared_Prepare_Copy_FromArchive_GetToolPaths" />
<Exec
<ValidateGpgSignature
Condition=" '%(ArchiveFilesToCopy.HashFile)' != '' AND '%(ArchiveFilesToCopy.SignatureFile)' != '' "
Command="&quot;$(ToolsExternalGpgPath)&quot; --keyserver $(GpgKeyServer) --recv-keys %(ArchiveFilesToCopy.GpgKey)" />

<Exec
Condition=" '%(ArchiveFilesToCopy.HashFile)' != '' AND '%(ArchiveFilesToCopy.SignatureFile)' != '' "
Command="&quot;$(ToolsExternalGpgPath)&quot; --verify &quot;%(ArchiveFilesToCopy.SignatureFile)&quot; &quot;%(ArchiveFilesToCopy.HashFile)&quot;" />
GpgExecutablePath="$(ToolsExternalGpgPath)"
GpgKey="%(ArchiveFilesToCopy.GpgKey)"
KeyServers="@(GpgKeyServers)"
Path="%(ArchiveFilesToCopy.HashFile)"
SignatureFile="%(ArchiveFilesToCopy.SignatureFile)" />

<ValidateHash
Algorithm="%(ArchiveFilesToCopy.HashAlgorithm)"
Expand Down
13 changes: 7 additions & 6 deletions src/nbuildkit/actions/shared.prepare.copy.http.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ExistsSharedPrepareCopyHttp>true</ExistsSharedPrepareCopyHttp>
</PropertyGroup>
<PropertyGroup>
<ShouldLoadGpgKeyServers>true</ShouldLoadGpgKeyServers>
<ShouldLoadHttpFilesToCopy>true</ShouldLoadHttpFilesToCopy>
<ShouldLoadTemplateTokens>true</ShouldLoadTemplateTokens>
<ShouldLoadTemplateVersion>true</ShouldLoadTemplateVersion>
Expand Down Expand Up @@ -105,13 +106,13 @@
<CallTarget
Condition=" '$(HashFile)' != '' AND '$(SignatureFile)' != '' "
Targets="_nBuildKit_Shared_Prepare_Copy_FromUrl_GetToolPaths" />
<Exec
<ValidateGpgSignature
Condition=" '$(HashFile)' != '' AND '$(SignatureFile)' != '' "
Command="&quot;$(ToolsExternalGpgPath)&quot; --keyserver $(GpgKeyServer) --recv-keys %(HttpFilesToCopy.GpgKey)" />

<Exec
Condition=" '$(HashFile)' != '' AND '$(SignatureFile)' != '' "
Command="&quot;$(ToolsExternalGpgPath)&quot; --verify &quot;$(SignatureFile)&quot; &quot;$(HashFile)&quot;" />
GpgExecutablePath="$(ToolsExternalGpgPath)"
GpgKey="%(HttpFilesToCopy.GpgKey)"
KeyServers="@(GpgKeyServers)"
Path="$(HashFile)"
SignatureFile="$(SignatureFile)" />

<ValidateHash
Algorithm="%(HttpFilesToCopy.HashAlgorithm)"
Expand Down
10 changes: 0 additions & 10 deletions src/nbuildkit/actions/shared.preuser.props
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,6 @@
<IsGitFlow Condition=" '$(IsGitFlow)' == '' ">UNDEFINED</IsGitFlow>
</PropertyGroup>

<!--
Security
-->
<PropertyGroup>
<!--
The GPG key server that will be used to pull GPG keys from.
-->
<GpgKeyServer Condition=" '$(GpgKeyServer)' == '' ">pgp.mit.edu</GpgKeyServer>
</PropertyGroup>


<!--
**** PREPARE - MERGE ****
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions src/nbuildkit/tasks/CustomDictionary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<Word>func</Word>
<Word>git</Word>
<Word>github</Word>
<Word>gpg</Word>
<Word>guid</Word>
<Word>guids</Word>
<Word>hashtable</Word>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public static class ErrorInformation
/// </summary>
public const string ErrorIdApplicationErrorStream = "NBuildKit.Application.WroteToErrorStream";

/// <summary>
/// Defines the error ID for an error indicating that a required application argument has not been provided.
/// </summary>
public const string ErrorIdApplicationInvalidArgument = "NBuildKit.Application.InvalidArgument";

/// <summary>
/// Defines the error ID for an error indicating that a required application argument has not been provided.
/// </summary>
Expand Down
Loading

0 comments on commit e7be466

Please sign in to comment.