Skip to content

Commit

Permalink
ci: CI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Oct 10, 2023
1 parent abd9200 commit 494ba17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion build/.azure-pipelines.TemplateValidation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
jobs:
- job: Packages_Validation
dependsOn: Packages

pool:
vmImage: 'windows-2022'
Expand Down
8 changes: 6 additions & 2 deletions build/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ variables:
IsCanaryBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries/')]

stages:
- stage: Build
- stage: Packaging
jobs:
- template: .azure-pipelines.TemplateValidation.yml
- job: Packages

pool:
Expand Down Expand Up @@ -61,9 +60,14 @@ stages:
ArtifactName: $(Build.DefinitionName)
ArtifactType: Container

- stage: Template_validations
dependsOn: Packaging
jobs:
- template: .azure-pipelines.TemplateValidation.yml

- stage: Prepare
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['IsCanaryBranch'], true)))
dependsOn: Packaging
jobs:
- job: Sign

Expand Down
8 changes: 5 additions & 3 deletions build/templates/package-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@ steps:
parameters:
MergeBranch: false

- powershell: |
& dotnet workload restore --from-rollback-file $(WorkloadRestore) --skip-sign-check
displayName: Restore workloads

- powershell: |
Set-PSDebug -Trace 1
$ErrorActionPreference = 'Stop'
cd UnoApp1
& dotnet workload restore --from-rollback-file $(WorkloadRestore) --skip-sign-check
& dotnet build UnoApp1.sln "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog"
if ($LASTEXITCODE -ne 0)
{
throw "Exit code must be zero."
}
cd ..
displayName: Build template app

Expand All @@ -87,4 +89,4 @@ steps:
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: logs
ArtifactType: Container
ArtifactType: Container

0 comments on commit 494ba17

Please sign in to comment.