- Trying to get real signing to work
- Some reorg of file structure - Some other new piplines work
This commit is contained in:
Родитель
768337d4b6
Коммит
694edf6563
|
@ -18,10 +18,10 @@ parameters:
|
|||
default: '**/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj'
|
||||
|
||||
variables:
|
||||
- template: common/versioning.yml@self # Versions
|
||||
- template: common/version.yml@self
|
||||
|
||||
- name: SignType
|
||||
value: 'real'
|
||||
value: real
|
||||
|
||||
# The `resources` specify the location and version of the 1ES PT.
|
||||
resources:
|
||||
|
|
|
@ -3,19 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.33808.371
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{805140F8-CC9F-4C32-BB72-3D67D13BEBA7}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
|
||||
CONTRIBUTING.md = CONTRIBUTING.md
|
||||
LICENSE = LICENSE
|
||||
README.md = README.md
|
||||
SECURITY.md = SECURITY.md
|
||||
unit-tests.md = unit-tests.md
|
||||
WHATSNEW.md = WHATSNEW.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{558E0FEA-094D-4AA4-994A-8ED67ABEDED4}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{141FEF3E-C665-4D50-8E51-B9507C98040E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "demo", "demo", "{9468ADD1-3660-410D-8231-6F89384D135D}"
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
We uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the Fluent UI Blazor library software.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
fluentui-blazor@microsoft.com
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for Bootstrap
|
||||
---------------------------
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2023 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,191 @@
|
|||
# Build and test Core project.
|
||||
name: $(FileVersion).$(Year:yy)$(DayOfYear).$(Rev:r)
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- dev
|
||||
|
||||
paths:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- .github/*
|
||||
- .devcontainer/*
|
||||
- docs/*
|
||||
- CODE_OF_CONDUCT.md
|
||||
- README.md
|
||||
- SECURITY.md
|
||||
- LICENSE.TXT
|
||||
- THIRD-PARTY-NOTICES.TXT
|
||||
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- dev
|
||||
|
||||
paths:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- .github/*
|
||||
- .devcontainer/*
|
||||
- docs/*
|
||||
- CODE_OF_CONDUCT.md
|
||||
- README.md
|
||||
- SECURITY.md
|
||||
- LICENSE.TXT
|
||||
- THIRD-PARTY-NOTICES.TXT
|
||||
|
||||
variables:
|
||||
- template: /eng/pipelines/common-variables.yml@self
|
||||
- template: /eng/pipelines/common/version.yml@self
|
||||
|
||||
- name: _BuildConfig
|
||||
value: Release
|
||||
- name: Build.Arcade.ArtifactsPath
|
||||
value: $(Build.SourcesDirectory)/artifacts/
|
||||
- name: Build.Arcade.LogsPath
|
||||
value: $(Build.Arcade.ArtifactsPath)log/$(_BuildConfig)/
|
||||
- name: Build.Arcade.TestResultsPath
|
||||
value: $(Build.Arcade.ArtifactsPath)TestResults/$(_BuildConfig)/
|
||||
|
||||
# Produce test-signed build for PR and Public builds
|
||||
- ${{ if or(eq(variables['_RunAsPublic'], 'true'), eq(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
# needed for darc (dependency flow) publishing
|
||||
- name: _PublishArgs
|
||||
value: ''
|
||||
- name: _OfficialBuildIdArgs
|
||||
value: ''
|
||||
# needed for signing
|
||||
- name: _SignType
|
||||
value: test
|
||||
- name: _SignArgs
|
||||
value: ''
|
||||
- name: _Sign
|
||||
value: false
|
||||
|
||||
# Set up non-PR build from internal project
|
||||
- ${{ if and(ne(variables['_RunAsPublic'], 'true'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
# needed for darc (dependency flow) publishing
|
||||
- name: _PublishArgs
|
||||
value: >-
|
||||
/p:DotNetPublishUsingPipelines=true
|
||||
- name: _OfficialBuildIdArgs
|
||||
value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
||||
# needed for signing
|
||||
- name: _SignType
|
||||
value: real
|
||||
- name: _SignArgs
|
||||
value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:Sign=$(_Sign) /p:DotNetPublishUsingPipelines=true
|
||||
- name: _Sign
|
||||
value: true
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1ESPipelineTemplates
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
parameters:
|
||||
sdl:
|
||||
eslint:
|
||||
enabled: false
|
||||
justificationForDisabling: 'see https://portal.microsofticm.com/imp/v3/incidents/incident/482258316/summary'
|
||||
sourceAnalysisPool:
|
||||
name: NetCore1ESPool-Internal
|
||||
image: windows.vs2022preview.amd64
|
||||
os: windows
|
||||
|
||||
stages:
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# This stage performs build, test, packaging
|
||||
# ----------------------------------------------------------------
|
||||
- stage: build
|
||||
displayName: Build
|
||||
jobs:
|
||||
- template: /eng/common/templates-official/jobs/jobs.yml@self
|
||||
parameters:
|
||||
enableMicrobuild: true
|
||||
# Publish NuGet packages using v3
|
||||
# https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3
|
||||
enablePublishUsingPipelines: true
|
||||
enablePublishBuildAssets: true
|
||||
enableTelemetry: true
|
||||
enableSourceIndex: false
|
||||
# Publish build logs
|
||||
enablePublishBuildArtifacts: true
|
||||
# Publish test logs
|
||||
enablePublishTestResults: true
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
jobs:
|
||||
|
||||
- job: Windows
|
||||
# timeout accounts for wait times for helix agents up to 30mins
|
||||
timeoutInMinutes: 60
|
||||
|
||||
pool:
|
||||
name: NetCore1ESPool-Internal
|
||||
image: windows.vs2022preview.amd64
|
||||
os: windows
|
||||
|
||||
variables:
|
||||
- name: _buildScript
|
||||
value: $(Build.SourcesDirectory)/build.cmd -ci
|
||||
|
||||
preSteps:
|
||||
- checkout: self
|
||||
fetchDepth: 1
|
||||
clean: true
|
||||
|
||||
steps:
|
||||
- template: /eng/pipelines/templates/BuildAndTest.yml
|
||||
parameters:
|
||||
dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd
|
||||
buildScript: $(_buildScript)
|
||||
buildConfig: $(_BuildConfig)
|
||||
repoArtifactsPath: $(Build.Arcade.ArtifactsPath)
|
||||
repoLogPath: $(Build.Arcade.LogsPath)
|
||||
repoTestResultsPath: $(Build.Arcade.TestResultsPath)
|
||||
isWindows: true
|
||||
|
||||
- ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
|
||||
- template: /eng/common/templates-official/job/onelocbuild.yml@self
|
||||
parameters:
|
||||
LclSource: lclFilesfromPackage
|
||||
LclPackageId: 'LCL-JUNO-PROD-ASPIRE'
|
||||
MirrorRepo: aspire
|
||||
MirrorBranch: main
|
||||
|
||||
- template: /eng/common/templates-official/post-build/post-build.yml@self
|
||||
parameters:
|
||||
validateDependsOn:
|
||||
- build
|
||||
publishingInfraVersion: 3
|
||||
enableSymbolValidation: false
|
||||
enableSigningValidation: false
|
||||
enableNugetValidation: false
|
||||
enableSourceLinkValidation: false
|
||||
# these param values come from the DotNet-Winforms-SDLValidation-Params azdo variable group
|
||||
SDLValidationParameters:
|
||||
enable: false
|
||||
params: ' -SourceToolsList $(_TsaSourceToolsList)
|
||||
-TsaInstanceURL $(_TsaInstanceURL)
|
||||
-TsaProjectName $(_TsaProjectName)
|
||||
-TsaNotificationEmail $(_TsaNotificationEmail)
|
||||
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
|
||||
-TsaBugAreaPath $(_TsaBugAreaPath)
|
||||
-TsaIterationPath $(_TsaIterationPath)
|
||||
-TsaRepositoryName $(_TsaRepositoryName)
|
||||
-TsaCodebaseName $(_TsaCodebaseName)
|
||||
-TsaOnboard $(_TsaOnboard)
|
||||
-TsaPublish $(_TsaPublish)'
|
|
@ -0,0 +1,23 @@
|
|||
variables:
|
||||
- name: _TeamName
|
||||
value: fluentui-blazor
|
||||
- name: _RunAsPublic
|
||||
value: True
|
||||
- name: _RunAsInternal
|
||||
value: False
|
||||
|
||||
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
|
||||
- name: _RunAsPublic
|
||||
value: False
|
||||
- name: _RunAsInternal
|
||||
value: True
|
||||
- name: _SignType
|
||||
value: real
|
||||
- group: SDL_Settings
|
||||
- name: _InternalBuildArgs
|
||||
value: /p:DotNetSignType=$(_SignType)
|
||||
/p:TeamName=$(_TeamName)
|
||||
/p:DotNetPublishUsingPipelines=true
|
||||
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
||||
#- name: PostBuildSign
|
||||
# value: true
|
|
@ -0,0 +1,157 @@
|
|||
<#
|
||||
.DESCRIPTION
|
||||
Update all .csproj files, adding these properties, excluding the files from $excludePatterns
|
||||
- `AssemblyVersion = $assemblyVersion`,
|
||||
- `FileVersion = $assemblyVersion`,
|
||||
- `InformationalVersion = $assemblyVersion`,
|
||||
- `Version = $packageVersion`,
|
||||
|
||||
.PARAMETER sourcePath
|
||||
Source path to list all .csproj files, by default the current path is used.
|
||||
|
||||
.PARAMETER excludePatterns
|
||||
List of files to exclude so as not to update the contents of the .csproj file.
|
||||
|
||||
.PARAMETER assemblyVersion
|
||||
Assembly version.
|
||||
|
||||
.PARAMETER packageVersion
|
||||
Package version.
|
||||
|
||||
.EXAMPLE
|
||||
$> .\update-assembly-version -sourcePath "./" -excludePatterns "**/src/Templates/content/**/*.csproj", "**/tests/TemplateValidation/**/*.csproj" -assemblyVersion "1.2.3" -packageVersion "1.2.3"
|
||||
|
||||
.EXAMPLE
|
||||
# Set version number (exclude some folders)
|
||||
- task: PowerShell@2
|
||||
displayName: 'Versioning $(Build.BuildNumber)'
|
||||
inputs:
|
||||
targetType: 'filePath'
|
||||
filePath: $(System.DefaultWorkingDirectory)/.azure-devops/common/update-assembly-version.ps1
|
||||
arguments: > # Use this to avoid newline characters in multiline string
|
||||
-sourcePath "$(System.DefaultWorkingDirectory)/"
|
||||
-excludePatterns "**/src/Templates/content/**/*.csproj", "**/tests/TemplateValidation/**/*.csproj"
|
||||
-assemblyVersion "$(AssemblyVersion)"
|
||||
-packageVersion "$(PackageVersion)"
|
||||
#>
|
||||
|
||||
param (
|
||||
[string]$sourcePath,
|
||||
[string[]]$excludePatterns = @(),
|
||||
[Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()][string]$assemblyVersion,
|
||||
[string]$packageVersion
|
||||
)
|
||||
|
||||
|
||||
# Define the patterns
|
||||
$includePattern = "$sourcePath/**/*.csproj"
|
||||
|
||||
if ($assemblyVersion -eq $null) {
|
||||
$assemblyVersion = "0.0.1"
|
||||
}
|
||||
|
||||
if ($packageVersion -eq $null) {
|
||||
$packageVersion = $assemblyVersion
|
||||
}
|
||||
|
||||
Write-Host "Add or update assemblies versions '$assemblyVersion' and package versions '$packageVersion'."
|
||||
Write-Host " - include: $includePattern."
|
||||
Write-Host " - exclude: $excludePatterns."
|
||||
|
||||
# ------------------------------------------
|
||||
# Get all files matching the include pattern
|
||||
# And matching the exclude patterns
|
||||
# ------------------------------------------
|
||||
function Get-FilesFromDirectory {
|
||||
param (
|
||||
[string]$includePattern,
|
||||
[string[]]$excludePatterns
|
||||
)
|
||||
|
||||
# Get all files matching the include pattern
|
||||
$allFiles = Get-ChildItem -Path $includePattern -Recurse
|
||||
|
||||
|
||||
# Get all files matching the exclude pattern => $filteredFiles
|
||||
$excludedFiles = @() # Empty array
|
||||
if ($excludePatterns.Length -gt 0) {
|
||||
foreach ($pattern in $excludePatterns) {
|
||||
# Create a RegEx: replacing "**" by ".*", "*" by "[^/]*"
|
||||
$parts = $pattern -split '[\\/]'
|
||||
foreach ($i in 0..($parts.Length - 1)) {
|
||||
if ($parts[$i] -eq '**') {
|
||||
$parts[$i] = '.*'
|
||||
}
|
||||
if ($parts[$i] -eq '*') {
|
||||
$parts[$i] = '[^/]*'
|
||||
}
|
||||
}
|
||||
$excludeRegEx = $parts -join "\/"
|
||||
|
||||
# Check all files to detect the matching one
|
||||
foreach ($file in $allFiles) {
|
||||
$match1 = ($file.FullName -replace "\\", "/") -match $excludeRegEx
|
||||
if ($match1) {
|
||||
$excludedFiles += $file.FullName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Exclude found files
|
||||
$filteredFiles = $allFiles | Where-Object { $_.FullName -notin $excludedFiles }
|
||||
}
|
||||
|
||||
return $filteredFiles;
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# Add or update the PropertyName tag, to set the PropertyValue.
|
||||
# in the XML file name
|
||||
# -------------------------------------------------------------
|
||||
function Update-PropertyGroup {
|
||||
param (
|
||||
[string]$fileName,
|
||||
[string]$propertyName,
|
||||
[string]$propertyValue
|
||||
)
|
||||
|
||||
# Load the XML file and find the first "default" PropertyGroup
|
||||
$xmlDoc = New-Object System.Xml.XmlDocument
|
||||
$xmlDoc.Load($fileName)
|
||||
|
||||
$propertyGroup = $xmlDoc.SelectSingleNode("//Project//PropertyGroup")
|
||||
|
||||
# Find the VersionNumber element
|
||||
$propertyTag = $xmlDoc.SelectSingleNode("//Project//PropertyGroup//$propertyName")
|
||||
|
||||
if ($null -eq $propertyTag) {
|
||||
$propertyTag = $xmlDoc.CreateElement($propertyName)
|
||||
$propertyGroup.AppendChild($propertyTag) > $null # Suppress the output
|
||||
}
|
||||
|
||||
# Update the text value of the VersionNumber element
|
||||
$propertyTag.InnerText = $propertyValue
|
||||
|
||||
# Save the updated XML back to the file
|
||||
$xmlDoc.Save($fileName)
|
||||
}
|
||||
|
||||
# ------------------------------------------
|
||||
# Main calls
|
||||
# ------------------------------------------
|
||||
$filteredFiles = Get-FilesFromDirectory -includePattern $includePattern -excludePatterns $excludePatterns
|
||||
|
||||
# Update the PropertyGroup items...
|
||||
# - VersionNumber: '$(assemblyVersion)'
|
||||
# - FileVersionNumber: '$(assemblyVersion)'
|
||||
# - InformationalVersion: '$(assemblyVersion)'
|
||||
# - PackageVersion: '$(packageVersion)'
|
||||
foreach ($file in $filteredFiles) {
|
||||
$name = $file.Name
|
||||
$fileName = $file.FullName
|
||||
Write-Host " .. Updating $name"
|
||||
Update-PropertyGroup -fileName $fileName -propertyName "AssemblyVersion" -propertyValue $assemblyVersion
|
||||
Update-PropertyGroup -fileName $fileName -propertyName "FileVersion" -propertyValue $assemblyVersion
|
||||
Update-PropertyGroup -fileName $fileName -propertyName "InformationalVersion" -propertyValue $assemblyVersion
|
||||
Update-PropertyGroup -fileName $fileName -propertyName "Version" -propertyValue $packageVersion
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
variables:
|
||||
# File and Package version
|
||||
# dev branch: 1.2.4-Preview-23282-1' (PackageSuffix is always ignored in Dev branch)
|
||||
# main branch: 1.2.4-RC.1' (PackageSuffix is ignored, if empty, in Main branch)
|
||||
FileVersion: '4.6.0' # Set the next final version here.
|
||||
PackageSuffix: ''
|
Загрузка…
Ссылка в новой задаче