Skip to content
Merged
Changes from 1 commit
Commits
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
Next Next commit
Switch away from SAS for upload link cache file
  • Loading branch information
weshaggard authored Apr 12, 2024
commit 8f2e7a479678635c114c2578f742199fa86b3465
111 changes: 27 additions & 84 deletions eng/pipelines/githubio-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,92 +6,14 @@ pool:
vmImage: ubuntu-22.04

variables:
cachefile: verify-links-cache.txt
cachefile: verify-links-cache-test.txt
Comment thread
weshaggard marked this conversation as resolved.
Outdated

jobs:
- job: CheckLinks
displayName: Check and Cache Links
timeoutInMinutes: 360
steps:
- task: PowerShell@2
displayName: 'azure-sdk link check'
condition: succeededOrFailed()
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls "https://azure.github.io/azure-sdk/index.html"
-ignoreLinksFile "./eng/pipelines/githubio-linkcheck-ignore-links.txt"
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true
-requestTimeoutSec 60 # For the nightly link checks increase timeout to handle some of the links that are redirects and can take longer

- task: PowerShell@2
displayName: 'azure-sdk link check with caching'
condition: succeededOrFailed()
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls "https://azure.github.io/azure-sdk/index.html"
-ignoreLinksFile "./eng/pipelines/githubio-linkcheck-ignore-links.txt"
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true

- task: PowerShell@2
displayName: 'java link check'
condition: succeededOrFailed()
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls "https://azure.github.io/azure-sdk-for-java/index.html"
-ignoreLinksFile "./eng/pipelines/githubio-linkcheck-ignore-links.txt"
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true

- task: PowerShell@2
displayName: 'js link check'
condition: succeededOrFailed()
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls "https://azure.github.io/azure-sdk-for-js/index.html"
-ignoreLinksFile "./eng/pipelines/githubio-linkcheck-ignore-links.txt"
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true

- task: PowerShell@2
displayName: 'net link check'
condition: succeededOrFailed()
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls "https://azure.github.io/azure-sdk-for-net/index.html"
-ignoreLinksFile "./eng/pipelines/githubio-linkcheck-ignore-links.txt"
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true

- task: PowerShell@2
displayName: 'python link check'
condition: succeededOrFailed()
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls "https://azure.github.io/azure-sdk-for-python/index.html"
-ignoreLinksFile "./eng/pipelines/githubio-linkcheck-ignore-links.txt"
-inputCacheFile "$(cachefile)"
-outputCacheFile "$(cachefile)"
-devOpsLogging: $true


- task: PowerShell@2
displayName: 'tools link check'
condition: succeededOrFailed()
Expand All @@ -111,7 +33,28 @@ jobs:
condition: succeededOrFailed()
displayName: Upload verified links

- pwsh: |
azcopy copy '$(cachefile)' 'https://azuresdkartifacts.blob.core.windows.net/verify-links-cache$(azuresdkartifacts-verify-links-cache-sas)'
condition: succeededOrFailed()
displayName: Upload cache file to blob container
- task: AzurePowerShell@5
displayName: 'Upload cache file to blob container'
inputs:
azureSubscription: 'Azure SDK Artifacts'
ScriptType: 'InlineScript'
azurePowerShellVersion: LatestVersion
pwsh: true
Inline: |
azcopy copy '$(cachefile)' 'https://azuresdkartifacts.blob.core.windows.net/verify-links-cache'
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'

- task: AzureFileCopy@6
displayName: 'Upload cache file to blob container'
inputs:
sourcePath: '$(cachefile)'
azureSubscription: 'Azure SDK Artifacts'
destination: AzureBlob
storage: azuresdkartifacts
containerName: 'verify-links-cache'

# - pwsh: |
# azcopy copy '$(cachefile)' 'https://azuresdkartifacts.blob.core.windows.net/verify-links-cache$(azuresdkartifacts-verify-links-cache-sas)'
# condition: succeededOrFailed()
# displayName: Upload cache file to blob container