docs(misc): fix azure yml (#22480)
This commit is contained in:
parent
341f2951a8
commit
7409aa2e01
@ -32,6 +32,10 @@ jobs:
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: 0
|
||||
persistCredentials: true
|
||||
|
||||
- script: npm ci
|
||||
- script: npx nx-cloud start-agent
|
||||
|
||||
@ -41,11 +45,7 @@ jobs:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
# Get last successfull commit from Azure Devops CLI
|
||||
- displayName: 'Get last successful commit SHA'
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
|
||||
bash: |
|
||||
- bash: |
|
||||
LAST_SHA=$(az pipelines build list --branch $(Build.SourceBranchName) --definition-ids $(System.DefinitionId) --result succeeded --top 1 --query "[0].triggerInfo.\"ci.sourceSha\"")
|
||||
if [ -z "$LAST_SHA" ]
|
||||
then
|
||||
@ -54,6 +54,10 @@ jobs:
|
||||
echo "Last successful commit SHA: $LAST_SHA"
|
||||
echo "##vso[task.setvariable variable=BASE_SHA]$LAST_SHA"
|
||||
fi
|
||||
displayName: 'Get last successful commit SHA'
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
|
||||
|
||||
- script: git branch --track main origin/main
|
||||
- script: npm ci
|
||||
|
||||
@ -28,6 +28,8 @@ jobs:
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: 0
|
||||
persistCredentials: true
|
||||
|
||||
# Set Azure Devops CLI default settings
|
||||
- bash: az devops configure --defaults organization=$(System.TeamFoundationCollectionUri) project=$(System.TeamProject)
|
||||
displayName: 'Set default Azure DevOps organization and project'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user