未验证 提交 a01de1ba 编写于 作者: D Dimitrios Maragkos 提交者: GitHub

Added markdown-link-check to azure-pipelines.yml (#1974)

* Added markdown-link-check to azure-pipelines.yml

* Write-Error instead of throw

* continueOnError

* Write-Warning

* revert

* Removing unused vsts-ci and separating the link check to its own job.

* Ignoring digikey

* Added detailed error information

* Ignoring aliexpress
Co-authored-by: NJose Perez Rodriguez <joperezr@microsoft.com>
上级 a598bd59
......@@ -9,6 +9,8 @@
{ "pattern": "https://dev.azure.com/dnceng/internal/_build\\?definitionId" },
{ "pattern": "https://www.pine64.org/\\?page_id=46823" },
{ "pattern": "http://ecee.colorado.edu/~mcclurel/Philips_I2C_IO_Expanders_AN469_2.pdf" },
{ "pattern": "https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf" }
{ "pattern": "https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf" },
{ "pattern": "https://www.digikey.com/" },
{ "pattern": "https://www.aliexpress.com/" }
]
}
trigger:
batch: true
branches:
include:
- main
- release/3.0
pr:
branches:
include:
- main
- release/3.0
variables:
# Cannot use key:value syntax in root defined variables
- name: Build.Repository.Clean
value: true
- name: _TeamName
value: DotNetCore
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: IOT
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: OfficialBuildId
value: $(Build.BuildNumber)
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: 1
- name: DOTNET_MULTILEVEL_LOOKUP
value: 0
resources:
containers:
- container: LinuxContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
enableTelemetry: true
graphFileGeneration:
enabled: true
includeToolset: true
helixRepo: dotnet/iot
jobs:
- job: Windows_NT
timeoutInMinutes: 90
pool:
# For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
# Will eventually change this to two BYOC pools.
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: Hosted VS2017
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals build.windows.10.amd64.vs2017
variables:
- HelixApiAccessToken: ''
- _InternalBuildArgs: ''
# Only enable publishing in non-public, non PR scenarios.
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
# DotNet-HelixApi-Access provides: HelixApiAccessToken
- group: DotNet-Blob-Feed
- group: Publish-Build-Assets
- group: DotNet-HelixApi-Access
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-iot/index.json
- _InternalBuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
strategy:
matrix:
Build_Release:
_BuildConfig: Release
# PRs or external builds are not signed.
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
_SignType: test
_DotNetPublishToBlobFeed : false
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_SignType: real
_DotNetPublishToBlobFeed : true
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
Build_Debug:
_BuildConfig: Debug
_SignType: test
_DotNetPublishToBlobFeed : false
steps:
- checkout: self
clean: true
# Scan markdown files on style consistency
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- powershell: |
npm install -g markdownlint-cli
markdownlint -c $(System.DefaultWorkingDirectory)/.markdownlint.json $(System.DefaultWorkingDirectory)
displayName: 'Execute Markdownlint'
# Scan markdown files for dead links
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- powershell: |
npm install -g markdown-link-check
ls -r *.md | % { markdown-link-check -c $(System.DefaultWorkingDirectory)\.markdown-link-check.json $_.FullName; if (-Not $?) { throw "One of the links is wrong" } }
displayName: 'Execute markdown-link-check'
# Use utility script to run script command dependent on agent OS.
- script: build.cmd -ci -sign
-configuration $(_BuildConfig)
-prepareMachine
-publish
/p:BuildPackages=true
$(_InternalBuildArgs)
displayName: Windows Build
- script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
eng/sendToHelix.proj
/t:Test
/p:TestOS=Windows_NT
/p:Configuration=$(_BuildConfig)
/p:HelixBuild=$(Build.BuildNumber)
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: Run Helix Tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: $(HelixApiAccessToken)
- task: PublishBuildArtifacts@1
displayName: Publish Windows package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
artifactName: BuiltPackageOutputs
artifactType: container
condition: eq(variables['_BuildConfig'], 'Release')
- job: Linux
container: LinuxContainer
pool:
vmImage: 'ubuntu-latest'
variables:
- HelixApiAccessToken: ''
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-HelixApi-Access
strategy:
matrix:
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
Build_Debug:
_BuildConfig: Debug
_PublishType: none
_SignType: none
_DotNetPublishToBlobFeed : false
Build_Release:
_BuildConfig: Release
_PublishType: none
_SignType: none
_DotNetPublishToBlobFeed : false
steps:
- checkout: self
clean: true
- script: ./build.sh --ci
--configuration $(_BuildConfig)
--prepareMachine
displayName: Unix Build
- script: ./eng/common/msbuild.sh --warnaserror false --ci
eng/sendToHelix.proj
/t:Test
/p:TestOS=Unix
/p:Configuration=$(_BuildConfig)
/p:HelixBuild=$(Build.BuildNumber)
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
/p:HelixAccessToken=$(HelixApiAccessToken)
displayName: Run Helix Tests
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: $(HelixApiAccessToken)
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- job: OSX
pool:
Hosted macOS
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
_PublishType: none
_SignType: none
_DotNetPublishToBlobFeed : false
Build_Release:
_BuildConfig: Release
_PublishType: none
_SignType: none
_DotNetPublishToBlobFeed : false
steps:
- checkout: self
clean: true
- script: ./build.sh --ci
--configuration $(_BuildConfig)
--prepareMachine
/p:Test=false
displayName: OSX Build
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: eng\common\templates\post-build\post-build.yml
parameters:
publishingInfraVersion: 3
# Symbol validation isn't being very reliable lately. This should be enabled back
# once this issue is resolved: https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
......@@ -90,6 +90,18 @@ stages:
artifact: config
condition: eq(variables['BuildConfiguration'], 'Release')
- job: Markdown_link_check
displayName: Markdown Link Check
pool:
vmImage: windows-latest
steps:
- powershell: |
npm install -g markdown-link-check
ls -r *.md | % { markdown-link-check -v -c $(System.DefaultWorkingDirectory)\.markdown-link-check.json $_.FullName; if (-Not $?) { throw "One of the links is wrong" } }
displayName: 'Execute markdown-link-check'
condition: eq(variables['build.reason'], 'PullRequest')
- job: Windows_ArduinoIntegration
displayName: Arduino Integration Tests
timeoutInMinutes: 120
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册