Skip to content

1.3.0 Release #526

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 33 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cf7a159
Clean information output.
peombwa Nov 30, 2020
543ce61
Weekly OpenApiDocs Download
Dec 10, 2020
884e440
Enable unit tests with pester
peombwa Dec 10, 2020
64faafe
Remove debug messages.
peombwa Dec 10, 2020
437e8bf
Set default Content-Type header to application/json when user has not…
georgend Dec 10, 2020
94e63db
Merge branch 'dev' into bugfixes/InformationLogCleanUp
georgend Dec 10, 2020
f5ab511
Merge pull request #484 from microsoftgraph/bugfixes/InformationLogCl…
peombwa Dec 10, 2020
8755a4e
Merge branch 'dev' into weeklyOpenApiDocsDownload.20201210
peombwa Dec 11, 2020
7399ffc
Merge pull request #487 from microsoftgraph/weeklyOpenApiDocsDownload…
peombwa Dec 11, 2020
cb604eb
Add weekly release pipeline.
peombwa Jan 6, 2021
a0709b7
Weekly OpenApiDocs Download (#501)
github-actions[bot] Jan 14, 2021
96ce070
Merge branch 'dev' into features/WeeklyReleaseUpdate
peombwa Jan 14, 2021
574ab1f
Update ADO pipelines.
peombwa Jan 14, 2021
c568d78
Add retry to OpenAPI docs download.
peombwa Jan 14, 2021
c8d2502
Pipeline cleanup
peombwa Jan 16, 2021
1919d4c
Update schedule run
peombwa Jan 16, 2021
b332e23
Update weekly-generation.yml for Azure Pipelines
peombwa Jan 16, 2021
c554393
Enable signing.
peombwa Jan 19, 2021
6c946f6
Update cron trigger.
peombwa Jan 19, 2021
53c5002
Update cron trigger to 17.
peombwa Jan 19, 2021
ba73acf
Update weekly-generation.yml for Azure Pipelines
peombwa Jan 19, 2021
262ad28
Update weekly-generation.yml for Azure Pipelines
peombwa Jan 19, 2021
1782e32
Code clean-up
peombwa Jan 19, 2021
dfd5b74
Update github action on:push:branch
peombwa Jan 21, 2021
61ec9b0
Merge pull request #507 from microsoftgraph/features/WeeklyReleaseUpdate
peombwa Jan 22, 2021
b82bbab
Allow caller to Specify desired OutputType (#499)
georgend Jan 27, 2021
91bd753
Weekly OpenApiDocs Download
Jan 27, 2021
a2bd7cd
Fix broken error flattening logic.
peombwa Jan 28, 2021
b90cc06
Lock autorest-core version to 3.0.6306
peombwa Jan 28, 2021
0620ca5
Merge pull request #520 from microsoftgraph/WeeklyOpenApiDocsDownload…
peombwa Jan 28, 2021
d48a3b8
Merge branch 'dev' into po/ConnectMgGraphSilentFailureFix
peombwa Jan 28, 2021
87f0d53
Bump version of all modules to 1.3.0
peombwa Jan 28, 2021
9399213
Merge pull request #521 from microsoftgraph/po/ConnectMgGraphSilentFa…
peombwa Jan 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .azure-pipelines/common-templates/checkout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

steps:
- checkout: self
clean: true
fetchDepth: 1
persistCredentials: true

- task: PowerShell@2
displayName: "Configure user"
inputs:
targetType: "inline"
script: |
git config --global user.email "[email protected]"
git config --global user.name "Microsoft Graph DevX Tooling"

- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: "Run CredScan"
inputs:
debugMode: false
137 changes: 137 additions & 0 deletions .azure-pipelines/common-templates/download-openapi-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

parameters:
- name: Branch
type: string
default: "WeeklyOpenApiDocsDownload"
- name: BaseBranch
type: string
default: "dev"

jobs:
- job: GetLatestDocs
displayName: Download OpenApiDocs
pool: MsGraphDevXAzureAgents
steps:
- template: ./checkout.yml

- template: ./install-tools.yml

- task: PowerShell@2
name: "ComputeBranch"
displayName: "Compute weekly branch name"
inputs:
targetType: inline
script: |
$branch = "{0}/{1}" -f "$(Branch)", (Get-Date -Format yyyyMMddHHmm)
Write-Host "##vso[task.setvariable variable=WeeklyBranch;isOutput=true]$branch"

- task: Bash@3
displayName: "Create weekly branch"
inputs:
targetType: inline
script: |
git status
git fetch --all
git checkout $(BaseBranch)
git branch $(ComputeBranch.WeeklyBranch)
git checkout $(ComputeBranch.WeeklyBranch)
git status

- task: PowerShell@2
displayName: Download v1.0 OpenApi docs
continueOnError: false
inputs:
filePath: "$(System.DefaultWorkingDirectory)/tools/UpdateOpenApi.ps1"
pwsh: true

- task: PowerShell@2
displayName: Download beta OpenApi docs
continueOnError: false
inputs:
filePath: "$(System.DefaultWorkingDirectory)/tools/UpdateOpenApi.ps1"
arguments: "-BetaGraphVersion"
pwsh: true

- task: PowerShell@2
name: OpenAPIDocDiff
displayName: Get OpenAPI docs diff
inputs:
pwsh: true
targetType: "inline"
script: |
$diff = git diff --name-only
$ModulesWithChanges = @{}
$diff | %{
if (($_ -match 'openApiDocs\/(v1.0|beta)\/(.*).yml') -and !$ModulesWithChanges.ContainsKey($matches.2))
{
$ModulesWithChanges.Add($matches.2, $matches.1)
}
}
$ModuleNames = $ModulesWithChanges.Keys
Write-Host "##vso[task.setvariable variable=ModulesWithChanges;isOutput=true]$ModuleNames"

- task: PowerShell@2
displayName: Generate profiles
condition: and(succeeded(), ne(variables['OpenAPIDocDiff.ModulesWithChanges'], ''))
continueOnError: false
inputs:
targetType: filePath
pwsh: true
filePath: $(System.DefaultWorkingDirectory)/tools/GenerateProfiles.ps1

- task: PowerShell@2
name: CalculateAndBumpModuleVersion
displayName: Calculate and bump module version
condition: and(succeeded(), ne(variables['OpenAPIDocDiff.ModulesWithChanges'], ''))
inputs:
pwsh: true
targetType: inline
script: |
# Calculate meta-module version
$MetaModule = Find-Module "Microsoft.Graph" -Repository PSGallery
$MetaModuleVersion = [System.Version]($MetaModule.Version)
$NewMetaModuleVersion = "$($MetaModuleVersion.Major).$($MetaModuleVersion.Minor + 1).$($MetaModuleVersion.Build)"
# Bump meta-module minor version
Write-Host "Bumping Microsoft.Graph to $NewMetaModuleVersion."
& "$(System.DefaultWorkingDirectory)\tools\SetMetaModuleVersion.ps1" -VersionNumber $NewMetaModuleVersion

# Calculate existing service module version
"$(OpenAPIDocDiff.ModulesWithChanges)" -split " " | ForEach-Object {
try {
$Module = Find-Module "Microsoft.Graph.$_" -Repository PSGallery -ErrorAction Stop
$ModuleVersion = [System.Version]($Module.Version)
$NewModuleVersion = "$($ModuleVersion.Major).$($ModuleVersion.Minor + 1).$($ModuleVersion.Build)"
Write-Host "Bumping $_ to $NewModuleVersion."
. "$(System.DefaultWorkingDirectory)\tools\SetServiceModuleVersion.ps1" -VersionNumber $NewModuleVersion -Modules $_
} catch {
if ($_.Exception.Message -like "No match*") {
Write-Warning "$_. Version will be set to $NewMetaModuleVersion."
}
}
}

# Calculate new service module version
$NewModuleReadMePath = Join-Path $(System.DefaultWorkingDirectory) "/tools/Templates/readme.md"
. "$(System.DefaultWorkingDirectory)\tools\WriteToModuleReadMe.ps1" -ReadMePath $NewModuleReadMePath -FieldName "module-version" -NewFieldValue $NewMetaModuleVersion

- task: Bash@3
displayName: Commit downloaded files
condition: and(succeeded(), ne(variables['OpenAPIDocDiff.ModulesWithChanges'], ''))
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
inputs:
targetType: inline
script: |
git status
git add .
git commit -m 'Weekly OpenApiDocs Download'
git status
git push --set-upstream origin $(ComputeBranch.WeeklyBranch)
git status

# References
# [0] https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
# [1] https://hub.github.com/hub-pull-request.1.html
# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
79 changes: 79 additions & 0 deletions .azure-pipelines/common-templates/install-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

steps:
- task: UseDotNet@2
displayName: "Use .NET Core SDK 2.x"
inputs:
debugMode: false
version: 2.x

- task: NuGetToolInstaller@1
displayName: Install Nuget 5.7
inputs:
versionSpec: 5.7.0
checkLatest: false # Optional

- task: NuGetAuthenticate@0
displayName: Authenticate NuGet

- task: PowerShell@2
displayName: Install Powershell core
inputs:
targetType: inline
script: |
dotnet tool update --global PowerShell
pwsh

- task: PowerShell@2
displayName: Version check
inputs:
targetType: inline
pwsh: true
script: |
Write-Host $PSVersionTable.PSVersion
Write-Host $host.Version
Write-Host (Get-Host).Version

- task: NodeTool@0
displayName: Install NodeJs 14.11.0
inputs:
versionSpec: "14.11.0"
checkLatest: true # Optional

- task: Npm@1
displayName: Install AutoRest
inputs:
command: "custom"
customCommand: "install -g autorest@latest"

- task: PowerShell@2
displayName: Install PowerShell dependencies
inputs:
targetType: inline
pwsh: true
errorActionPreference: "continue"
script: |
Install-Module "powershell-yaml" -Repository PSGallery -Force

- task: PowerShell@2
displayName: Register PS repository
enabled: false
inputs:
targetType: inline
pwsh: true
errorActionPreference: "continue"
script: |
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Continue
Get-PSRepository
$patToken = '$(NUGETFEEDKEY)' | ConvertTo-SecureString -AsPlainText -Force
$nugetFeed = '$(NUGETFEED)'
$user = '$(NUGETBUILDUSER)'
$credsAzureDevopsServices = New-Object System.Management.Automation.PSCredential($user, $patToken)
UnRegister-PackageSource -Name 'LocalNugetPackageSource' -ErrorAction Continue
UnRegister-PSRepository -Name 'LocalNugetFeed' -ErrorAction Continue
Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget' -ErrorAction Continue
Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' -ErrorAction Continue
Get-PSRepository
Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Credential $credsAzureDevopsServices -AllVersions -Repository 'LocalNugetFeed'
Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed'
71 changes: 0 additions & 71 deletions .azure-pipelines/download-openapidocs-template.yml

This file was deleted.

Loading