Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
Updated cron schedule to build every Sunday at midnight

Previous cron schedule was meant to run on the first of every month, but was actually set to run on the first of every month if-and-only-if it was a Sunday.

Also use a queue-time Build.OfficialRelease value instead of a variable defined in the build.yml file.
  • Loading branch information
jstedfast committed May 29, 2024
1 parent 7a6b6ee commit fa5e95d
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
name: $(Date:yyyyMMdd).$(Rev:r)
parameters:
- name: OfficialRelease
displayName: "Build and publish an official release"
type: boolean
default: false
variables:
- name: BuildParameters.vsVersion
value: 17.0
- name: Build.OfficialRelease
value: false
- name: Codeql.Enabled
value: true
- name: Codeql.Language
value: csharp
- name: SignType
${{ if eq(variables['Build.OfficialRelease'], 'true') }}:
${{ if eq(parameters.OfficialRelease, true) }}:
value: real
${{ else }}:
value: test
- name: TeamName
value: vscx-tools-authoring
- name: TimestampPackage
value: true
value: ${{ not (parameters.OfficialRelease) }}
schedules:
- cron: '0 0 1 * 0'
displayName: Monthly CodeQL Build
- cron: '0 0 * * 0'
displayName: Weekly CodeQL Build (Sunday @ Midnight)
branches:
include:
- main
Expand Down Expand Up @@ -65,13 +68,13 @@ extends:
outputs:
- output: nuget
displayName: 'NuGet push to VS feed'
condition: and(succeeded(), eq(variables['Build.OfficialRelease'], 'true'))
condition: and(succeeded(), eq(parameters.OfficialRelease, true))
packageParentPath: '$(Build.ArtifactStagingDirectory)\Packages'
packagesToPush: $(Build.ArtifactStagingDirectory)\Packages\*.nupkg;!$(Build.ArtifactStagingDirectory)\Packages\*.symbols.nupkg
publishVstsFeed: 97a41293-2972-4f48-8c0e-05493ae82010
- output: nuget
displayName: 'NuGet push to NuGet.org'
condition: and(and(succeeded(), eq(variables['Build.OfficialRelease'], 'true')), eq(variables['TimestampPackage'], 'false'))
condition: and(succeeded(), eq(parameters.OfficialRelease, true))
packageParentPath: '$(Build.ArtifactStagingDirectory)\Packages'
packagesToPush: $(Build.ArtifactStagingDirectory)\Packages\*.nupkg;!$(Build.ArtifactStagingDirectory)\Packages\*.symbols.nupkg
nuGetFeedType: external
Expand Down Expand Up @@ -136,7 +139,7 @@ extends:
TargetFolder: $(Pipeline.Workspace)\Symbols
- task: MicroBuildArchiveSymbols@5
displayName: Archive Symbols
condition: and(succeeded(), eq(variables['Build.OfficialRelease'], 'true'))
condition: and(succeeded(), eq(parameters.OfficialRelease, true))
inputs:
SymbolsFeatureName: XamlBehaviorsWpf
SymbolsProject: VS
Expand All @@ -150,4 +153,4 @@ extends:
TargetFolder: $(Build.ArtifactStagingDirectory)\Packages
OverWrite: true
flattenFolders: true
continueOnError: true
continueOnError: true

0 comments on commit fa5e95d

Please sign in to comment.