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