diff --git a/.vsts-ci/linux.yml b/.vsts-ci/linux.yml index 4d1131c996..a8804062d5 100644 --- a/.vsts-ci/linux.yml +++ b/.vsts-ci/linux.yml @@ -33,9 +33,15 @@ phases: condition: succeededOrFailed() - powershell: | - git submodule update --init - displayName: SubModule Init - condition: succeededOrFailed() + Import-Module $(Build.SourcesDirectory)/build.psm1 -Force + New-NugetConfigFile -NugetFeedUrl $(AzDevOpsFeed) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT) -FeedName AzDevOpsFeed -Destination $(Build.SourcesDirectory)/src/Modules + + if(-not (Test-Path "$(Build.SourcesDirectory)/src/Modules/nuget.config")) + { + throw "nuget.config is not created" + } + displayName: 'Add nuget.config for AzDevOps feed for PSGallery modules ' + condition: and(succeededOrFailed(), ne(variables['AzDevOpsFeed'], '')) - powershell: | sudo apt-get update diff --git a/.vsts-ci/mac.yml b/.vsts-ci/mac.yml index 55212e9d86..794979ccb5 100644 --- a/.vsts-ci/mac.yml +++ b/.vsts-ci/mac.yml @@ -26,9 +26,15 @@ phases: condition: ne(variables['Build.Reason'], 'PullRequest') - powershell: | - git submodule update --init - displayName: SubModule Init - condition: succeededOrFailed() + Import-Module $(Build.SourcesDirectory)/build.psm1 -Force + New-NugetConfigFile -NugetFeedUrl $(AzDevOpsFeed) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT) -FeedName AzDevOpsFeed -Destination $(Build.SourcesDirectory)/src/Modules + + if(-not (Test-Path "$(Build.SourcesDirectory)/src/Modules/nuget.config")) + { + throw "nuget.config is not created" + } + displayName: 'Add nuget.config for AzDevOps feed for PSGallery modules ' + condition: and(succeededOrFailed(), ne(variables['AzDevOpsFeed'], '')) - powershell: | tools/travis.ps1 -Stage Bootstrap diff --git a/.vsts-ci/windows.yml b/.vsts-ci/windows.yml index 80da3a8743..bf26369a1f 100644 --- a/.vsts-ci/windows.yml +++ b/.vsts-ci/windows.yml @@ -30,9 +30,15 @@ steps: condition: ne(variables['Build.Reason'], 'PullRequest') - powershell: | - git submodule update --init - displayName: SubModule Init - condition: succeededOrFailed() + Import-Module $(Build.SourcesDirectory)/build.psm1 -Force + New-NugetConfigFile -NugetFeedUrl $(AzDevOpsFeed) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT) -FeedName AzDevOpsFeed -Destination $(Build.SourcesDirectory)/src/Modules + + if(-not (Test-Path "$(Build.SourcesDirectory)/src/Modules/nuget.config")) + { + throw "nuget.config is not created" + } + displayName: 'Add nuget.config for AzDevOps feed for PSGallery modules ' + condition: and(succeededOrFailed(), ne(variables['AzDevOpsFeed'], '')) - powershell: | [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 diff --git a/src/Modules/PSGalleryModules.csproj b/src/Modules/PSGalleryModules.csproj index 7312f75d2d..24da6da4a5 100644 --- a/src/Modules/PSGalleryModules.csproj +++ b/src/Modules/PSGalleryModules.csproj @@ -5,7 +5,7 @@ - +