Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>2020-08-17 15:40:57 +0300
committerGitHub <noreply@github.com>2020-08-17 15:40:57 +0300
commitf538aa8ccfae3cf8ec4e7c09a5a22f981ab44721 (patch)
tree965d8435b8b62df558a7286985e66028a34dc183 /eng/common
parentd3288457fb68c4784f3ca9b327e943caa397c10e (diff)
Update dependencies from https://github.com/dotnet/arcade build 20200811.8 (#1433)
[master] Update dependencies from dotnet/arcade - Updates: - Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20403.5 to 5.0.0-beta.20411.8 - Microsoft.DotNet.ApiCompat: from 5.0.0-beta.20403.5 to 5.0.0-beta.20411.8
Diffstat (limited to 'eng/common')
-rw-r--r--eng/common/SetupNugetSources.ps117
-rw-r--r--eng/common/SetupNugetSources.sh23
-rw-r--r--eng/common/sdk-task.ps11
3 files changed, 39 insertions, 2 deletions
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index dc2217812..bb3617133 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -11,6 +11,8 @@
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
+# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
+#
# - task: PowerShell@2
# displayName: Setup Private Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
@@ -94,6 +96,14 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Passw
}
}
+function EnablePrivatePackageSources($DisabledPackageSources) {
+ $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
+ ForEach ($DisabledPackageSource in $maestroPrivateSources) {
+ Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled"
+ $DisabledPackageSource.SetAttribute("value", "false")
+ }
+}
+
if (!(Test-Path $ConfigFile -PathType Leaf)) {
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
@@ -123,6 +133,13 @@ if ($creds -eq $null) {
$doc.DocumentElement.AppendChild($creds) | Out-Null
}
+# Check for disabledPackageSources; we'll enable any darc-int ones we find there
+$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
+if ($disabledSources -ne $null) {
+ Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
+ EnablePrivatePackageSources -DisabledPackageSources $disabledSources
+}
+
$userName = "dn-bot"
# Insert credential nodes for Maestro's private feeds
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index f33e37711..ef3338295 100644
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -13,6 +13,8 @@
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
+# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing.
+#
# - task: Bash@3
# displayName: Setup Private Feeds Credentials
# inputs:
@@ -63,7 +65,7 @@ if [ "$?" != "0" ]; then
ConfigNodeHeader="<configuration>"
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
- sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
+ sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile
fi
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
@@ -74,7 +76,7 @@ if [ "$?" != "0" ]; then
PackageSourcesNodeFooter="</packageSources>"
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile
fi
PackageSources=()
@@ -146,3 +148,20 @@ for FeedName in ${PackageSources[@]} ; do
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
+
+# Re-enable any entries in disabledPackageSources where the feed name contains darc-int
+grep -i "<disabledPackageSources>" $ConfigFile
+if [ "$?" == "0" ]; then
+ DisabledDarcIntSources=()
+ echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile"
+ DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"')
+ for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do
+ if [[ $DisabledSourceName == darc-int* ]]
+ then
+ OldDisableValue="add key=\"$DisabledSourceName\" value=\"true\""
+ NewDisableValue="add key=\"$DisabledSourceName\" value=\"false\""
+ sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile
+ echo "Neutralized disablePackageSources entry for '$DisabledSourceName'"
+ fi
+ done
+fi
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
index 32ad5c7e9..e159c6f18 100644
--- a/eng/common/sdk-task.ps1
+++ b/eng/common/sdk-task.ps1
@@ -42,6 +42,7 @@ function Build([string]$target) {
/p:Configuration=$configuration `
/p:RepoRoot=$RepoRoot `
/p:BaseIntermediateOutputPath=$outputPath `
+ /v:$verbosity `
@properties
}