Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add official build queue-time parameters for test builds #10730

Merged
merged 7 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions eng/ci/official-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
parameters:
- name: forceOfficial # this is used for testing the official CI from non-official branches.
displayName: Use official templates for non-official branches
type: boolean
default: false
- name: runTests
displayName: Run tests (ignored for official branches)
type: boolean
default: true
- name: signFiles
displayName: Sign files (ignored for official branches)
type: boolean
default: false

trigger:
batch: true
branches:
Expand Down Expand Up @@ -34,11 +48,22 @@ resources:
variables:
- template: /eng/ci/templates/variables/build.yml@self
- template: /ci/variables/cfs.yml@eng
- name: buildNumber
value: $[ counter('build', 23000) ] # 23000 selected to be ahead of current host build
- name: OfficialBranch
${{ if or(eq(variables['Build.SourceBranch'], 'refs/heads/dev'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}:
value: true
${{ else }}:
value: false
- name: '1ESTemplate'
# force official to be true if an official branch. Otherwise respect the official parameter.
${{ if or(eq(variables.OfficialBranch, true), eq(parameters.forceOfficial, true)) }}:
value: 'v1/1ES.Official.PipelineTemplate.yml@1es'
${{ else }}:
value: 'v1/1ES.Unofficial.PipelineTemplate.yml@1es'
- name: SignFiles # variable for access in other templates
value: ${{ or(eq(variables.OfficialBranch, true), eq(parameters.signFiles, true)) }}

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1es
template: ${{ variables['1ESTemplate'] }}
parameters:
pool:
name: 1es-pool-azfunc
Expand All @@ -56,7 +81,9 @@ extends:
- template: /eng/ci/templates/official/jobs/build-artifacts-windows.yml@self
- template: /eng/ci/templates/official/jobs/build-artifacts-linux.yml@self

# tests are always ran for official branches
- stage: Test
condition: ${{ or(eq(variables.OfficialBranch, true), eq(parameters.runTests, true)) }}
dependsOn: ''

jobs:
Expand Down
55 changes: 29 additions & 26 deletions eng/ci/templates/official/jobs/build-artifacts-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ jobs:
**/ExtensionsMetadataGenerator.csproj
**/WebJobs.Script.Abstractions.csproj

- template: ci/sign-files.yml@eng
parameters:
displayName: Sign Abstractions assemblies
folderPath: out/bin/WebJobs.Script.Abstractions/release
pattern: Microsoft.Azure.WebJobs.Script.Abstractions*.dll
signType: dll
- ${{ if eq(variables.SignFiles, true) }}:
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign Abstractions assemblies
folderPath: out/bin/WebJobs.Script.Abstractions/release
pattern: Microsoft.Azure.WebJobs.Script.Abstractions*.dll
signType: dll

- task: DotNetCoreCLI@2
displayName: Pack Abstractions
Expand All @@ -77,12 +78,13 @@ jobs:
projects: |
**/WebJobs.Script.Abstractions.csproj

- template: ci/sign-files.yml@eng
parameters:
displayName: Sign ExtensionsMetadataGenerator assemblies
folderPath: out/bin/ExtensionsMetadataGenerator
pattern: Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator*.dll
signType: dll-strong-name
- ${{ if eq(variables.SignFiles, true) }}:
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign ExtensionsMetadataGenerator assemblies
folderPath: out/bin/ExtensionsMetadataGenerator
pattern: Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator*.dll
signType: dll-strong-name

- task: DotNetCoreCLI@2
displayName: Pack ExtensionsMetadataGenerator
Expand All @@ -93,19 +95,20 @@ jobs:
projects: |
**/ExtensionsMetadataGenerator.csproj

- template: ci/sign-files.yml@eng
parameters:
displayName: Sign NugetPackages
folderPath: $(nuget_package_path)
pattern: '*.nupkg'
signType: nuget
- ${{ if eq(variables.SignFiles, true) }}:
- template: ci/sign-files.yml@eng
parameters:
displayName: Sign NugetPackages
folderPath: $(nuget_package_path)
pattern: '*.nupkg'
signType: nuget

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
inputs:
contents: '**/CodeSignSummary-*.md'
- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
inputs:
contents: '**/CodeSignSummary-*.md'

- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
inputs:
contents: '$(nuget_package_path)/**/CodeSignSummary-*.md'
- task: DeleteFiles@1
displayName: Delete CodeSignSummary files
inputs:
contents: '$(nuget_package_path)/**/CodeSignSummary-*.md'
Loading