Skip to content

Commit

Permalink
[ci] Move OneLocBuild task to scheduled pipeline (#7679)
Browse files Browse the repository at this point in the history
The OneLocBuild system relies on a fully successful (green) build to
behave correctly.  This task has been moved into a separate pipeline to
avoid the intermittent failures we see on the Xamarin.Android pipeline.
  • Loading branch information
pjcollins authored Jan 9, 2023
1 parent d78d786 commit c92ae5e
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 45 deletions.
45 changes: 0 additions & 45 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1900,48 +1900,3 @@ stages:
CredScan: true
PoliCheck: true
condition: succeededOrFailed()

# Check - "Xamarin.Android (Tenets OneLocBuild)"
- job: OneLocBuild
displayName: OneLocBuild
condition: and(eq(variables['MicroBuildSignType'], 'Real'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
pool: VSEngSS-MicroBuild2022-1ES
timeoutInMinutes: 30
variables:
- group: Xamarin-Secrets
workspace:
clean: all
steps:
- checkout: self
clean: true

- task: PowerShell@2
displayName: Update LocProject.json
inputs:
targetType: filePath
filePath: $(Build.SourcesDirectory)\Localize\update-locproject.ps1
arguments: -SourcesDirectory "$(Build.SourcesDirectory)" -LocProjectPath "$(Build.SourcesDirectory)\Localize\LocProject.json"

- task: OneLocBuild@2
displayName: OneLocBuild
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
locProj: Localize/LocProject.json
outDir: $(Build.StagingDirectory)
packageSourceAuth: patAuth
patVariable: $(OneLocBuild--PAT)
isCreatePrSelected: true
repoType: gitHub
gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2)
prSourceBranchPrefix: locpr
isShouldReusePrSelected: true
isAutoCompletePrSelected: false
isUseLfLineEndingsSelected: true

- task: PublishBuildArtifacts@1
displayName: Publish Localization Files
inputs:
PathtoPublish: $(Build.StagingDirectory)/loc
ArtifactName: Loc
condition: succeededOrFailed()
59 changes: 59 additions & 0 deletions build-tools/automation/onelocbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Xamarin.Android OneLocBuild

name: $(Build.SourceBranchName)-$(Build.SourceVersion)-$(Rev:r)

trigger: none

pr: none

schedules:
- cron: "0 6 * * *"
displayName: Run daily at 6:00 UTC
branches:
include:
- main

jobs:
- job: OneLocBuild
displayName: OneLocBuild
condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
pool: VSEngSS-MicroBuild2022-1ES
timeoutInMinutes: 30
variables:
- group: Xamarin-Secrets
workspace:
clean: all
steps:
- checkout: self
clean: true

- task: PowerShell@2
displayName: Update LocProject.json
inputs:
targetType: filePath
filePath: $(Build.SourcesDirectory)\Localize\update-locproject.ps1
arguments: -SourcesDirectory "$(Build.SourcesDirectory)" -LocProjectPath "$(Build.SourcesDirectory)\Localize\LocProject.json"

- task: OneLocBuild@2
displayName: OneLocBuild
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
locProj: Localize/LocProject.json
outDir: $(Build.StagingDirectory)
packageSourceAuth: patAuth
patVariable: $(OneLocBuild--PAT)
isCreatePrSelected: true
repoType: gitHub
gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2)
prSourceBranchPrefix: locpr
isShouldReusePrSelected: true
isAutoCompletePrSelected: false
isUseLfLineEndingsSelected: true

- task: PublishBuildArtifacts@1
displayName: Publish Localization Files
inputs:
PathtoPublish: $(Build.StagingDirectory)/loc
ArtifactName: Loc
condition: succeededOrFailed()

0 comments on commit c92ae5e

Please sign in to comment.