Skip to content

Commit

Permalink
docs(misc): fix azure yml (#22480)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertIsaac authored Jul 31, 2024
1 parent 341f295 commit 7409aa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/nx-cloud/enterprise/dte/azure-dte.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/shared/monorepo-ci-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 7409aa2

Please sign in to comment.