Skip to content
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

Switch away from SAS for upload link cache file #8080

Merged
merged 3 commits into from
Apr 15, 2024
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
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
weshaggard marked this conversation as resolved.
Show resolved Hide resolved

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
Loading