diff --git a/.azure-pipelines/generate-auth-module.yml b/.azure-pipelines/generate-auth-module.yml index 0336ff38c00..2aeddfcb6c6 100644 --- a/.azure-pipelines/generate-auth-module.yml +++ b/.azure-pipelines/generate-auth-module.yml @@ -36,7 +36,7 @@ jobs: displayName: 'Generate and Build Auth Module' inputs: filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1' - arguments: '-RepositoryApiKey $(Api_Key) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -EnableSigning' + arguments: '-ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -EnableSigning' pwsh: true - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 diff --git a/.azure-pipelines/generate-beta-modules.yml b/.azure-pipelines/generate-beta-modules.yml index 9ff7734f51e..e334fc50304 100644 --- a/.azure-pipelines/generate-beta-modules.yml +++ b/.azure-pipelines/generate-beta-modules.yml @@ -6,23 +6,24 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) trigger: branches: include: - - master + - master paths: include: - - src/Beta/* - - config/ModulesMapping.jsonc + - src/* + - config/ModulesMapping.jsonc + exclude: + - src/Authentication/* pr: none variables: MODULE_PREFIX: 'Microsoft.Graph' - WORKLOAD_MODULE_PATH: 'src\beta\' - GRAPH_VERSION: 'beta' + WORKLOAD_MODULE_PATH: 'src\' AUTH_MODULE_PATH: 'src\Authentication\Authentication\bin\' AUTH_MODULE_DLL_PATTERN: 'Microsoft.Graph.Authentication.dll' jobs: - job: MSGraphPSSDKGeneration displayName: MS Graph PS SDK Beta Generation - timeoutInMinutes: 600 + timeoutInMinutes: 800 pool: name: Microsoft Graph demands: 'Agent.Name -equals PS-Build-Agent' @@ -52,7 +53,7 @@ jobs: displayName: 'Build Auth Modules' inputs: filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1' - arguments: '-RepositoryApiKey $(Api_Key) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -BuildWhenEqual -EnableSigning' + arguments: '-ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -BuildWhenEqual -EnableSigning' pwsh: true - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 @@ -132,7 +133,7 @@ jobs: displayName: 'Generate and Build Graph Resource Modules' inputs: filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateModules.ps1' - arguments: '-RepositoryApiKey $(Api_Key) -ArtifactsLocation $(Build.ArtifactStagingDirectory)\$(GRAPH_VERSION)\ -Build -EnableSigning' + arguments: '-ArtifactsLocation $(Build.ArtifactStagingDirectory)\ -Build -EnableSigning' pwsh: true - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 @@ -166,7 +167,7 @@ jobs: inputs: ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet' FolderPath: $(WORKLOAD_MODULE_PATH) - Pattern: '$(MODULE_PREFIX).*.private.dll, $(MODULE_PREFIX).*.psm1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1' + Pattern: '$(MODULE_PREFIX).*.private.dll, $(MODULE_PREFIX).*.psm1, $(MODULE_PREFIX).*.format.ps1xml, ProxyCmdletDefinitions.ps1, load-dependency.ps1' signConfigType: inlineSignParams inlineOperation: | [ @@ -217,8 +218,8 @@ jobs: [HashTable] $ModuleMapping = Get-Content $ModuleMappingConfigPath | ConvertFrom-Json -AsHashTable $ModuleMapping.Keys | ForEach-Object { $ModuleName = $_ - $ModuleProjectDir = "$(System.DefaultWorkingDirectory)/src/$(GRAPH_VERSION)/$ModuleName/$ModuleName" - & $(System.DefaultWorkingDirectory)/tools/PackModule.ps1 -Module $ModuleName -GraphVersion $(GRAPH_VERSION) -ArtifactsLocation $(Build.ArtifactStagingDirectory)\$(GRAPH_VERSION)\ + $ModuleProjectDir = "$(System.DefaultWorkingDirectory)/src/$ModuleName/$ModuleName" + & $(System.DefaultWorkingDirectory)/tools/PackModule.ps1 -Module $ModuleName -ArtifactsLocation $(Build.ArtifactStagingDirectory)\ } pwsh: true @@ -226,7 +227,7 @@ jobs: displayName: 'ESRP NuGet CodeSigning' inputs: ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet' - FolderPath: '$(Build.ArtifactStagingDirectory)\$(GRAPH_VERSION)\' + FolderPath: '$(Build.ArtifactStagingDirectory)\' Pattern: '*.nupkg' signConfigType: inlineSignParams inlineOperation: | @@ -251,7 +252,7 @@ jobs: - task: PublishBuildArtifacts@1 displayName: Publish Artifact Beta Modules inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(GRAPH_VERSION)' + PathtoPublish: '$(Build.ArtifactStagingDirectory)/' ArtifactName: 'drop' publishLocation: 'Container' diff --git a/.azure-pipelines/generate-beta-rollup-module.yml b/.azure-pipelines/generate-beta-rollup-module.yml index 12ba0f6973e..a2179ae12a8 100644 --- a/.azure-pipelines/generate-beta-rollup-module.yml +++ b/.azure-pipelines/generate-beta-rollup-module.yml @@ -7,9 +7,8 @@ trigger: none pr: none variables: MODULE_PREFIX: 'Microsoft.Graph' - GRAPH_VERSION: 'beta' MODULE_NAME: 'Graph' - MODULE_PATH: 'src/Beta/Graph/Graph' + MODULE_PATH: 'src/Graph/Graph' jobs: - job: MSGraphPSSDKGeneration @@ -31,7 +30,6 @@ jobs: displayName: 'Generate and Build Roll-Up Module' inputs: filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateRollUpModule.ps1' - arguments: '-RepositoryApiKey $(Api_Key) -ArtifactsLocation $(Build.ArtifactStagingDirectory)/$(GRAPH_VERSION)/' pwsh: true - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 @@ -87,14 +85,14 @@ jobs: command: 'pack' Configuration: Release packagesToPack: '$(System.DefaultWorkingDirectory)/$(MODULE_PATH)/$(MODULE_PREFIX).nuspec' - packDestination: '$(Build.ArtifactStagingDirectory)/$(GRAPH_VERSION)/' + packDestination: '$(Build.ArtifactStagingDirectory)/' versioningScheme: 'off' - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 displayName: 'ESRP NuGet CodeSigning' inputs: ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet' - FolderPath: '$(Build.ArtifactStagingDirectory)/$(GRAPH_VERSION)/' + FolderPath: '$(Build.ArtifactStagingDirectory)/' Pattern: 'Microsoft.Graph*.nupkg' signConfigType: inlineSignParams inlineOperation: | @@ -119,7 +117,7 @@ jobs: - task: PublishBuildArtifacts@1 displayName: Publish Artifact Microsoft.Graph.nupkg' inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(GRAPH_VERSION)' + PathtoPublish: '$(Build.ArtifactStagingDirectory)/' ArtifactName: 'drop' publishLocation: 'Container' diff --git a/tools/GenerateAuthenticationModule.ps1 b/tools/GenerateAuthenticationModule.ps1 index c798a280c20..9a632713d18 100644 --- a/tools/GenerateAuthenticationModule.ps1 +++ b/tools/GenerateAuthenticationModule.ps1 @@ -42,7 +42,7 @@ if ($null -eq $ManifestContent.ModuleVersion) { [VersionState]$VersionState = & $ValidateUpdatedModuleVersionPS1 -ModuleName "$ModulePrefix.$ModuleName" -NextVersion $ManifestContent.ModuleVersion if ($VersionState.Equals([VersionState]::Invalid)) { - Write-Error "The specified version in $ModulePrefix.$ModuleName module is either higher or lower than what's on $RepositoryName. Update 'ModuleVersion' in $AuthModulePath$AuthModuleManifest." + Write-Warning "The specified version in $ModulePrefix.$ModuleName module is either higher or lower than what's on $RepositoryName. Update 'ModuleVersion' in $AuthModulePath$AuthModuleManifest." } elseif ($VersionState.Equals([VersionState]::EqualToFeed) -and !$BuildWhenEqual) { Write-Warning "$ModulePrefix.$ModuleName module skipped. Version has not changed and is equal to what's on $RepositoryName." diff --git a/tools/GenerateModules.ps1 b/tools/GenerateModules.ps1 index af52d9c724b..3288240890c 100644 --- a/tools/GenerateModules.ps1 +++ b/tools/GenerateModules.ps1 @@ -82,7 +82,7 @@ $ModuleMapping.Keys | ForEach-Object -Begin { $RequestCount = 0 } -End { Write-H [VersionState]$VersionState = & $ValidateUpdatedModuleVersionPS1 -ModuleName "$ModulePrefix.$ModuleName" -NextVersion $ModuleVersion if ($VersionState.Equals([VersionState]::Invalid) -and !$SkipVersionCheck) { - Write-Error "The specified version in $ModulePrefix.$ModuleName module is either higher or lower than what's on $RepositoryName. Update the 'module-version' in $ModuleLevelReadMePath" + Write-Warning "The specified version in $ModulePrefix.$ModuleName module is either higher or lower than what's on $RepositoryName. Update the 'module-version' in $ModuleLevelReadMePath" } elseif ($VersionState.Equals([VersionState]::EqualToFeed) -and !$SkipVersionCheck) { Write-Warning "$ModulePrefix.$ModuleName module skipped. Version has not changed and is equal to what's on $RepositoryName." diff --git a/tools/GenerateRollUpModule.ps1 b/tools/GenerateRollUpModule.ps1 index accf7cde116..bd83f534557 100644 --- a/tools/GenerateRollUpModule.ps1 +++ b/tools/GenerateRollUpModule.ps1 @@ -50,7 +50,7 @@ if ($null -eq $NuspecMetadata["version"]) { [VersionState]$VersionState = & $ValidateUpdatedModuleVersionPS1 -ModuleName $ModulePrefix -NextVersion $NuspecMetadata["version"] if ($VersionState.Equals([VersionState]::Invalid)) { - Write-Error "The specified version in $ModulePrefix module is either higher or lower than what's on $RepositoryName. Update 'version' in $ModuleMetadataJson." + Write-Warning "The specified version in $ModulePrefix module is either higher or lower than what's on $RepositoryName. Update 'version' in $ModuleMetadataJson." } elseif ($VersionState.Equals([VersionState]::EqualToFeed)) { Write-Warning "$ModulePrefix module skipped. Version has not changed and is equal to what's on $RepositoryName."