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

OneBranch fixes #6728

Merged
merged 3 commits into from
Jan 11, 2024
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
19 changes: 0 additions & 19 deletions azure-pipelines.yml

This file was deleted.

80 changes: 31 additions & 49 deletions build/onebranch/ci.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,43 @@
#
# Replaces the classic BotBuilder-DotNet-master-Signed-daily.
#

# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber)
#name: $(Date:yyyyMMdd).$(Build.BuildId)

#pool:
# vmImage: $[ coalesce( variables['VMImage'], 'windows-2022' ) ] # or 'windows-latest'
# demands:
# - msbuild
# - visualstudio

#trigger: none # ci trigger is set in ADO
#pr: none # pr trigger is set in ADO

variables:
BuildConfiguration: Release-Windows
TestConfiguration: Release
BuildPlatform: any cpu
MSBuildArguments: -p:PublishRepositoryUrl=true -p:GeneratePackages=true -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
Packaging.EnableSBOMSigning: true
Parameters.solution: Microsoft.Bot.Builder.sln
# PreviewPackageVersion: 4.8.0-preview-$(Build.BuildNumber) # Consumed by projects in Microsoft.Bot.Builder.sln. Define this in Azure to be settable at queue time.
# ReleasePackageVersion: 4.8.0-preview-$(Build.BuildNumber) # Consumed by projects in Microsoft.Bot.Builder.sln. Define this in Azure to be settable at queue time.
# SDK_Dotnet_V4_org_Url: define this in Azure

jobs:
- job: Build_and_Sign
steps:
#variables:
# BuildConfiguration: Release-Windows
# TestConfiguration: Release
# BuildPlatform: any cpu
# MSBuildArguments: -p:PublishRepositoryUrl=true -p:GeneratePackages=true -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
# Packaging.EnableSBOMSigning: true
# Parameters.solution: Microsoft.Bot.Builder.sln
## PreviewPackageVersion: 4.8.0-preview-$(Build.BuildNumber) # Consumed by projects in Microsoft.Bot.Builder.sln. Define this in Azure to be settable at queue time.
## ReleasePackageVersion: 4.8.0-preview-$(Build.BuildNumber) # Consumed by projects in Microsoft.Bot.Builder.sln. Define this in Azure to be settable at queue time.
## SDK_Dotnet_V4_org_Url: define this in Azure

steps:
- powershell: |
# Replace {DateStamp} and {CommitHash} tokens with the actual values in vars ReleasePackageVersion and PreviewPackageVersion
$dateStamp = (Get-Date -format "yyyyMMdd");
$commitHash = "$(Build.SourceVersion)".SubString(0,7);

"Raw ReleasePackageVersion = $(ReleasePackageVersion)";
$v = "$(ReleasePackageVersion)".Replace("{DateStamp}",$dateStamp).Replace("{CommitHash}",$commitHash);
Write-Host "##vso[task.setvariable variable=ReleasePackageVersion;]$v";
"Resolved ReleasePackageVersion = $v";

"Raw PreviewPackageVersion = $(PreviewPackageVersion)";
$ppv = "$(PreviewPackageVersion)".Replace("{DateStamp}",$dateStamp).Replace("{CommitHash}",$commitHash);
Write-Host "##vso[task.setvariable variable=PreviewPackageVersion;]$ppv";
"Resolved PreviewPackageVersion = $ppv";
# Replace {DateStamp} and {CommitHash} tokens with the actual values in vars ReleasePackageVersion and PreviewPackageVersion
$dateStamp = (Get-Date -format "yyyyMMdd");
$commitHash = "$(Build.SourceVersion)".SubString(0,7);

"Raw ReleasePackageVersion = $(ReleasePackageVersion)";
$v = "$(ReleasePackageVersion)".Replace("{DateStamp}",$dateStamp).Replace("{CommitHash}",$commitHash);
Write-Host "##vso[task.setvariable variable=ReleasePackageVersion;]$v";
"Resolved ReleasePackageVersion = $v";

"Raw PreviewPackageVersion = $(PreviewPackageVersion)";
$ppv = "$(PreviewPackageVersion)".Replace("{DateStamp}",$dateStamp).Replace("{CommitHash}",$commitHash);
Write-Host "##vso[task.setvariable variable=PreviewPackageVersion;]$ppv";
"Resolved PreviewPackageVersion = $ppv";
displayName: 'Resolve package version variables'

- task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0
displayName: 'Tag build with release and preview versions'
inputs:
tags: |
Release: $(ReleasePackageVersion)
Preview: $(PreviewPackageVersion)
Release: $(ReleasePackageVersion)
Preview: $(PreviewPackageVersion)
continueOnError: true

- template: ci-build-steps.yml
- template: sign-steps.yml

#- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# displayName: 'Component Detection'
# inputs:
# failOnAlert: false
# - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# displayName: 'Component Detection'
# inputs:
# failOnAlert: false
9 changes: 9 additions & 0 deletions build/onebranch/onebranch-dotnet-signed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ variables:
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest # for Windows jobs
LinuxContainerImage: cdpxlinux.azurecr.io/user/lsg-linux/lsg-yocto-project:latest # for Linux jobs
IsOfficialBuild: True
BuildConfiguration: Release-Windows
TestConfiguration: Release
BuildPlatform: any cpu
MSBuildArguments: -p:PublishRepositoryUrl=true -p:GeneratePackages=true -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
Packaging.EnableSBOMSigning: true
Parameters.solution: Microsoft.Bot.Builder.sln
# PreviewPackageVersion: 4.8.0-preview-$(Build.BuildNumber) # Consumed by projects in Microsoft.Bot.Builder.sln. Define this in Azure to be settable at queue time.
# ReleasePackageVersion: 4.8.0-preview-$(Build.BuildNumber) # Consumed by projects in Microsoft.Bot.Builder.sln. Define this in Azure to be settable at queue time.
# SDK_Dotnet_V4_org_Url: define this in Azure

name: $(Date:yyyyMMdd).$(Build.BuildId)

Expand Down