From f0e694e6ee2ea38bd70f8ac45f002ddd461657b4 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 8 Jan 2024 18:26:16 -0800 Subject: [PATCH 1/8] add manual suffix generation --- azure-pipelines-release.yml | 10 ++++++++++ .../DurableTask.AzureStorage.csproj | 12 +++++++++--- src/DurableTask.Core/DurableTask.Core.csproj | 12 +++++++++--- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index aa2f0cfec..73ce0d6e8 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -6,6 +6,16 @@ pool: demands: - ImageOverride -equals MMS2022TLS +variables: + + - name: PackageSuffix + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + value: 'ci.$(Build.BuildNumber)' + ${{ if eq(variables['Build.Reason'], 'Manual') }}: + value: 'pr.$(Build.BuildNumber)' + ${{ else }}: + value: '' + steps: # Start by restoring all the dependencies. This needs to be its own task # from what I can tell. We specifically only target DurableTask.AzureStorage diff --git a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj index e0bb41766..721240399 100644 --- a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj +++ b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj @@ -22,15 +22,21 @@ 1 17 0 - + $(PackageSuffix) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 $(VersionPrefix).$(FileVersionRevision) $(MajorVersion).$(MinorVersion).0.0 - - $(VersionPrefix) + + + + + $(MajorVersion).$(MinorVersion).$(PatchVersion) + + + $(MajorVersion).$(MinorVersion).$(PatchVersion)-$(VersionSuffix) diff --git a/src/DurableTask.Core/DurableTask.Core.csproj b/src/DurableTask.Core/DurableTask.Core.csproj index b453bfefc..3a662a289 100644 --- a/src/DurableTask.Core/DurableTask.Core.csproj +++ b/src/DurableTask.Core/DurableTask.Core.csproj @@ -19,15 +19,21 @@ 2 16 0 - + $(PackageSuffix) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 $(VersionPrefix).$(FileVersionRevision) $(MajorVersion).$(MinorVersion).0.0 - - $(VersionPrefix) + + + + + $(MajorVersion).$(MinorVersion).$(PatchVersion) + + + $(MajorVersion).$(MinorVersion).$(PatchVersion)-$(VersionSuffix) From 271702b3a087132c7f2993c5168a00728b0789e4 Mon Sep 17 00:00:00 2001 From: David Justo Date: Fri, 22 Mar 2024 16:29:16 -0700 Subject: [PATCH 2/8] remove diff remains --- .../DurableTask.AzureStorage.csproj | 7 +------ src/DurableTask.Core/DurableTask.Core.csproj | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj index 9eee64628..5892b543a 100644 --- a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj +++ b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj @@ -21,13 +21,8 @@ 1 17 -<<<<<<< HEAD - 0 - $(PackageSuffix) -======= 1 - ->>>>>>> 04583ad69a1cc76d189b51694a86959d8df53384 + $(PackageSuffix) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 diff --git a/src/DurableTask.Core/DurableTask.Core.csproj b/src/DurableTask.Core/DurableTask.Core.csproj index c4889c401..0e4f8a46f 100644 --- a/src/DurableTask.Core/DurableTask.Core.csproj +++ b/src/DurableTask.Core/DurableTask.Core.csproj @@ -18,13 +18,8 @@ 2 16 -<<<<<<< HEAD - 0 - $(PackageSuffix) -======= 2 - ->>>>>>> 04583ad69a1cc76d189b51694a86959d8df53384 + $(PackageSuffix) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 From 35b77fb80620d1eeeb114abb6db3a7c8c04ce633 Mon Sep 17 00:00:00 2001 From: David Justo Date: Fri, 22 Mar 2024 16:45:59 -0700 Subject: [PATCH 3/8] remove test --- azure-pipelines-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index ac81cf2f2..01cc5c0a7 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -19,7 +19,7 @@ variables: ${{ if eq(variables['Build.Reason'], 'Schedule') }}: value: 'ci.$(Build.BuildNumber)' ${{ else }}: - value: 'test.$(Build.BuildNumber)' + value: '' steps: # Start by restoring all the dependencies. This needs to be its own task From fc86658f0313a8c243039a2295de7a69f2561d5b Mon Sep 17 00:00:00 2001 From: David Justo Date: Fri, 22 Mar 2024 16:54:55 -0700 Subject: [PATCH 4/8] change cron schedule --- azure-pipelines-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 01cc5c0a7..3930177d7 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -1,6 +1,6 @@ schedules: -- cron: '0 8 * * *' - displayName: Daily midnight (PDT) build +- cron: '0 5 * * *' + displayName: Daily 10pm (PDT) build branches: include: - main From d985459da25ef43fa31c9fe636701337335f1124 Mon Sep 17 00:00:00 2001 From: David Justo Date: Fri, 22 Mar 2024 17:11:38 -0700 Subject: [PATCH 5/8] turn pipeline from nightly into commit-based --- azure-pipelines-release.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 3930177d7..68be182fb 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -1,11 +1,7 @@ -schedules: -- cron: '0 5 * * *' - displayName: Daily 10pm (PDT) build - branches: - include: - - main - -trigger: none +trigger: +- main +- dajusto/patch-nightly-build + pr: none pool: @@ -16,7 +12,7 @@ pool: variables: - name: PackageSuffix - ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}: value: 'ci.$(Build.BuildNumber)' ${{ else }}: value: '' From e8a536e09903e6dc3406967552097ea65660d399 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 25 Mar 2024 09:44:42 -0700 Subject: [PATCH 6/8] remove other branch --- azure-pipelines-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 68be182fb..6489ff407 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -1,6 +1,5 @@ trigger: - main -- dajusto/patch-nightly-build pr: none From b40f0886999c237eefe2b36a7597a7b6ae244d96 Mon Sep 17 00:00:00 2001 From: David Justo Date: Mon, 25 Mar 2024 09:55:21 -0700 Subject: [PATCH 7/8] incorporate PR feedback --- azure-pipelines-release.yml | 2 +- src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj | 5 ++--- src/DurableTask.Core/DurableTask.Core.csproj | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 6489ff407..a1fb54edc 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -10,7 +10,7 @@ pool: variables: - - name: PackageSuffix + - name: VersionSuffix ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}: value: 'ci.$(Build.BuildNumber)' ${{ else }}: diff --git a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj index 5892b543a..be5b6e2bb 100644 --- a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj +++ b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj @@ -22,7 +22,6 @@ 1 17 1 - $(PackageSuffix) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 @@ -33,10 +32,10 @@ - $(MajorVersion).$(MinorVersion).$(PatchVersion) + $(VersionPrefix) - $(MajorVersion).$(MinorVersion).$(PatchVersion)-$(VersionSuffix) + $(VersionPrefix)-$(VersionSuffix) diff --git a/src/DurableTask.Core/DurableTask.Core.csproj b/src/DurableTask.Core/DurableTask.Core.csproj index 0e4f8a46f..536dfc22b 100644 --- a/src/DurableTask.Core/DurableTask.Core.csproj +++ b/src/DurableTask.Core/DurableTask.Core.csproj @@ -19,7 +19,6 @@ 2 16 2 - $(PackageSuffix) $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 @@ -30,10 +29,10 @@ - $(MajorVersion).$(MinorVersion).$(PatchVersion) + $(VersionPrefix) - $(MajorVersion).$(MinorVersion).$(PatchVersion)-$(VersionSuffix) + $(VersionPrefix)-$(VersionSuffix) From 29f7c9619a2c28bacd90cb127a6b261fb7efd291 Mon Sep 17 00:00:00 2001 From: David Justo Date: Tue, 26 Mar 2024 10:30:56 -0700 Subject: [PATCH 8/8] add comments --- azure-pipelines-release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index a1fb54edc..f17bd9320 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -11,7 +11,14 @@ pool: variables: - name: VersionSuffix + # The `Build.Reason` env var gets populated with `IndividualCI` on an automatic run of the CI, + # such as when a commit is made to `main`. If the CI is manually run, it will get populated with + # "Manual". For more details on these `Build.X` vars, see: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}: + # The `Build.BuildNumber` env var is an automatically-generated "build ID" + # for any given ADO run. It is usually the date format yyddmm. where + # `yyddmm` is a date formatter, and is a daily counter in case of multiple + # builds on the same date. value: 'ci.$(Build.BuildNumber)' ${{ else }}: value: ''