Make FURN compliant by migrating to 1ESPT pipelines (#3192)

* Make FURN complaint by migrating to 1ESPT pipelines

* Change files
This commit is contained in:
Danny van Velzen 2023-10-27 14:50:31 -07:00 коммит произвёл GitHub
Родитель e6831e26cc
Коммит 1a236a7a49
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 240 добавлений и 279 удалений

Просмотреть файл

@ -30,95 +30,88 @@ variables:
value: production,externalfacing
- template: variables/vars.yml
jobs:
- job: NPMPublish
displayName: NPM Publish
pool: Azure-Pipelines-EO-Ubuntu20.04-Office
steps:
- template: templates/setup-repo.yml
resources:
repositories:
- repository: OfficePipelineTemplates
type: git
name: 1ESPipelineTemplates/OfficePipelineTemplates
ref: refs/tags/release
- script: |
git config user.name "UI-Fabric-RN-Bot"
git config user.email "uifrnbot@microsoft.com"
git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/ui-fabric-react-native.git
displayName: Git Authentication
- script: |
yarn
displayName: 'yarn install'
- script: |
yarn buildci
displayName: 'yarn buildci'
- script: |
echo ##vso[task.setvariable variable=SkipNpmPublishArgs]--no-publish
displayName: Enable No-Publish (npm)
condition: ${{ parameters.skipNpmPublish }}
- script: |
echo ##vso[task.setvariable variable=SkipGitPushPublishArgs]--no-push
displayName: Enable No-Publish (git)
condition: ${{ parameters.skipGitPush }}
- script: |
yarn publish:beachball $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --access public --token $(npmAuth) -b origin/main -y
displayName: 'Publish NPM Packages (for main branch)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- script: |
yarn publish:beachball $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --access public --token $(npmAuth) -y -t v${{ replace(variables['Build.SourceBranch'],'refs/heads/releases/','') }} -b origin/${{ replace(variables['Build.SourceBranch'],'refs/heads/','') }} --prerelease-prefix ${{ replace(variables['Build.SourceBranch'],'refs/heads/releases/','') }}
displayName: 'Publish NPM Packages (for other release branches)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 📒 Generate Manifest Npm
inputs:
BuildDropPath: $(System.DefaultWorkingDirectory)
- task: PublishPipelineArtifact@1
displayName: 📒 Publish Manifest Npm
inputs:
artifactName: SBom-Npm-$(System.JobAttempt)
targetPath: $(System.DefaultWorkingDirectory)/_manifest
- task: ComponentGovernanceComponentDetection@0
inputs:
ignoreDirectories: 'node_modules/react-native/template'
- job: NuGetPublish
displayName: Apple NuGet Publish
extends:
template: v1/Office.Official.PipelineTemplate.yml@OfficePipelineTemplates
parameters:
pool:
vmImage: $(VmImageApple)
variables:
- name: BUILDSECMON_OPT_IN
value: true
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows
sdl:
eslint:
configuration: 'recommended'
parser: '@typescript-eslint/parser'
parserOptions: 'sourceType:script\necmaVersion:2017'
customEnvironments: true
environmentsBrowser: true
environmentsEs6: true
environmentsNode: true
stages:
- stage: main
jobs:
- job: NPMPublish
displayName: NPM Publish
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)
artifactName: dist
steps:
- template: .ado/templates/setup-repo.yml@self
steps:
- template: templates/apple-nuget-publish.yml
parameters:
skipNugetPublish: ${{ parameters.skipNugetPublish }}
- script: |
git config user.name "UI-Fabric-RN-Bot"
git config user.email "uifrnbot@microsoft.com"
git remote set-url origin https://$(githubUser):$(githubPAT)@github.com/microsoft/ui-fabric-react-native.git
displayName: Git Authentication
- job: Win32NuGetPublish
displayName: Win32 FluentTester NuGet Publish
pool: OE-OfficePublic
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
- script: |
yarn
displayName: 'yarn install'
steps:
- template: templates/win32-nuget-publish.yml
parameters:
skipNugetPublish: ${{ parameters.skipNugetPublish }}
- script: |
yarn buildci
displayName: 'yarn buildci'
- job: Win32TestingDependenciesNuGetPublish
displayName: Win32 Automated Testing Dependencies NuGet Publish
pool: OE-OfficePublic
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
- script: |
echo ##vso[task.setvariable variable=SkipNpmPublishArgs]--no-publish
displayName: Enable No-Publish (npm)
condition: ${{ parameters.skipNpmPublish }}
steps:
- template: templates/e2e-dependency-nuget-publish.yml
parameters:
skipNugetPublish: ${{ parameters.skipNugetPublish }}
- script: |
echo ##vso[task.setvariable variable=SkipGitPushPublishArgs]--no-push
displayName: Enable No-Publish (git)
condition: ${{ parameters.skipGitPush }}
- script: |
yarn publish:beachball $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --access public --token $(npmAuth) -b origin/main -y
displayName: 'Publish NPM Packages (for main branch)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- script: |
yarn publish:beachball $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --access public --token $(npmAuth) -y -t v${{ replace(variables['Build.SourceBranch'],'refs/heads/releases/','') }} -b origin/${{ replace(variables['Build.SourceBranch'],'refs/heads/','') }} --prerelease-prefix ${{ replace(variables['Build.SourceBranch'],'refs/heads/releases/','') }}
displayName: 'Publish NPM Packages (for other release branches)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
- template: .ado/templates/apple-nuget-publish.yml@self
parameters:
skipNugetPublish: ${{ parameters.skipNugetPublish }}
- template: .ado/templates/win32-nuget-publish.yml@self
parameters:
skipNugetPublish: ${{ parameters.skipNugetPublish }}
- template: .ado/templates/e2e-dependency-nuget-publish.yml@self
parameters:
skipNugetPublish: ${{ parameters.skipNugetPublish }}

Просмотреть файл

@ -4,98 +4,97 @@ parameters:
type: boolean
default: false
steps:
- checkout: self
persistCredentials: true
jobs:
- job: NuGetPublish
displayName: Apple NuGet Publish
pool:
name: Azure Pipelines
vmImage: internal-macos12
os: macOS
variables:
- name: BUILDSECMON_OPT_IN
value: true
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
${{ if not(parameters.skipNugetPublish) }}:
templateContext:
outputs:
- output: nuget
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.ReactNative.*.nupkg'
packageParentPath: '$(Build.ArtifactStagingDirectory)'
publishVstsFeed: Office # Required when pushing to internal feed.
nuGetFeedType: internal # Change to external when publishing to external feed
publishPackageMetadata: true # Optional
steps:
- checkout: self
persistCredentials: true
- template: setup-repo-min-build.yml
- template: setup-repo-min-build.yml
# Clean Derived Data
- script: |
rm -rf $(Build.Repository.LocalPath)/DerivedData
displayName: 'Clean DerivedData'
# Clean Derived Data
- script: |
rm -rf $(Build.Repository.LocalPath)/DerivedData
displayName: 'Clean DerivedData'
- script: |
sudo gem install cocoapods
displayName: 'Install CocoaPods Environment'
- script: |
sudo gem install cocoapods
displayName: 'Install CocoaPods Environment'
- bash: |
sudo xcode-select --switch $(xcode_path)
displayName: Switch Xcode version $(xcode_version)
failOnStderr: true
- bash: |
sudo xcode-select --switch $(xcode_path)
displayName: Switch Xcode version $(xcode_version)
failOnStderr: true
- bash: |
echo "pod install --project-directory=ios"
pod install --project-directory=ios
workingDirectory: apps/fluent-tester
displayName: 'pod install iOS'
- bash: |
echo "pod install --project-directory=ios"
pod install --project-directory=ios
workingDirectory: apps/fluent-tester
displayName: 'pod install iOS'
- bash: |
echo "pod install --project-directory=macos"
pod install --project-directory=macos
workingDirectory: apps/fluent-tester
displayName: 'pod install macOS'
- bash: |
echo "pod install --project-directory=macos"
pod install --project-directory=macos
workingDirectory: apps/fluent-tester
displayName: 'pod install macOS'
# macOS Release
- template: apple-xcode-build.yml
parameters:
xcode_sdk: 'macosx'
xcode_workspacePath: 'apps/fluent-tester/macos/FluentTester.xcworkspace'
xcode_actions: 'build'
xcode_scheme: 'FluentTester'
xcode_configuration: 'Release'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/publish_overrides.xcconfig'
# macOS Release
- template: apple-xcode-build.yml
parameters:
xcode_sdk: 'macosx'
xcode_workspacePath: 'apps/fluent-tester/macos/FluentTester.xcworkspace'
xcode_actions: 'build'
xcode_scheme: 'FluentTester'
xcode_configuration: 'Release'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/publish_overrides.xcconfig'
# iPhone Simulator Release
- template: apple-xcode-build.yml
parameters:
xcode_sdk: 'iphonesimulator'
xcode_workspacePath: 'apps/fluent-tester/ios/FluentTester.xcworkspace'
xcode_actions: 'build'
xcode_scheme: 'FluentTester'
xcode_configuration: 'Release'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/publish_overrides_ios_simulator.xcconfig'
# iPhone Simulator Release
- template: apple-xcode-build.yml
parameters:
xcode_sdk: 'iphonesimulator'
xcode_workspacePath: 'apps/fluent-tester/ios/FluentTester.xcworkspace'
xcode_actions: 'build'
xcode_scheme: 'FluentTester'
xcode_configuration: 'Release'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/publish_overrides_ios_simulator.xcconfig'
# iPhone Device Release
- template: apple-xcode-build.yml
parameters:
xcode_sdk: 'iphoneos'
xcode_workspacePath: 'apps/fluent-tester/ios/FluentTester.xcworkspace'
xcode_actions: 'build'
xcode_scheme: 'FluentTester'
xcode_configuration: 'Release'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/publish_overrides_ios_device.xcconfig'
# iPhone Device Release
- template: apple-xcode-build.yml
parameters:
xcode_sdk: 'iphoneos'
xcode_workspacePath: 'apps/fluent-tester/ios/FluentTester.xcworkspace'
xcode_actions: 'build'
xcode_scheme: 'FluentTester'
xcode_configuration: 'Release'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/publish_overrides_ios_device.xcconfig'
# generate the sanitizedBuildNumber environment variable
- bash: '.ado/scripts/generate_build_number.sh'
displayName: 'Generate Build Number'
# generate the sanitizedBuildNumber environment variable
- bash: '.ado/scripts/generate_build_number.sh'
displayName: 'Generate Build Number'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 📒 Generate Manifest Apple
inputs:
BuildDropPath: $(System.DefaultWorkingDirectory)
- task: PublishPipelineArtifact@1
displayName: 📒 Publish Manifest Apple
inputs:
artifactName: SBom-Apple-$(System.JobAttempt)
targetPath: $(System.DefaultWorkingDirectory)/_manifest
# pack the nuspec
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: pack
packagesToPack: 'package.nuspec'
buildProperties: buildNumber=$(sanitizedBuildNumber);commitId=$(Build.SourceVersion);repoUri=$(Build.Repository.Uri)
- task: ComponentGovernanceComponentDetection@0
# push the package package
- task: NuGetCommand@2
displayName: 'NuGet push'
condition: not(${{ parameters.skipNugetPublish }})
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.ReactNative.*.nupkg'
publishVstsFeed: Office
# pack the nuspec
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: pack
packagesToPack: 'package.nuspec'
buildProperties: buildNumber=$(sanitizedBuildNumber);commitId=$(Build.SourceVersion);repoUri=$(Build.Repository.Uri)

Просмотреть файл

@ -4,42 +4,35 @@ parameters:
type: boolean
default: false
steps:
- checkout: self
persistCredentials: true
jobs:
- job: Win32TestingDependenciesNuGetPublish
displayName: Win32 Automated Testing Dependencies NuGet Publish
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
${{ if not(parameters.skipNugetPublish) }}:
templateContext:
outputs:
- output: nuget
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.WebDriverIO.Appium.Deps.nupkg'
packageParentPath: '$(Build.ArtifactStagingDirectory)'
publishVstsFeed: Office # Required when pushing to internal feed.
nuGetFeedType: internal # Change to external when publishing to external feed
publishPackageMetadata: true # Optional
steps:
- checkout: self
persistCredentials: true
- template: setup-repo.yml
- template: setup-repo.yml
- script: |
yarn
workingDirectory: tester_deps/
displayName: 'yarn install'
- script: |
yarn
workingDirectory: tester_deps/
displayName: 'yarn install'
# Pack the NuGet package
- task: CmdLine@1
displayName: 'Create NuGet package for tester_deps.'
inputs:
filename: nuget
arguments: 'pack Microsoft.FluentUI.WebDriverIO.Appium.Deps.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -OutputFileNamesWithoutVersion -Verbosity detailed -Version $(Build.BuildNumber) -properties CommitId=$(Build.SourceVersion)'
workingFolder: 'tester_deps/nuget'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 📒 Generate Manifest Tester Dependencies
inputs:
BuildDropPath: $(System.DefaultWorkingDirectory)
- task: PublishPipelineArtifact@1
displayName: 📒 Publish Tester Dependencies
inputs:
artifactName: SBom-TesterDeps-$(System.JobAttempt)
targetPath: $(System.DefaultWorkingDirectory)/_manifest
- task: ComponentGovernanceComponentDetection@0
# Push the NuGet package
- task: NuGetCommand@2
displayName: 'NuGet push WebDriverIO/Appium dependencies'
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.WebDriverIO.Appium.Deps.nupkg'
publishVstsFeed: Office
# Pack the NuGet package
- task: CmdLine@1
displayName: 'Create NuGet package for tester_deps.'
inputs:
filename: nuget
arguments: 'pack Microsoft.FluentUI.WebDriverIO.Appium.Deps.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -OutputFileNamesWithoutVersion -Verbosity detailed -Version $(Build.BuildNumber) -properties CommitId=$(Build.SourceVersion)'
workingFolder: 'tester_deps/nuget'

Просмотреть файл

@ -4,63 +4,47 @@ parameters:
type: boolean
default: false
steps:
- checkout: self
persistCredentials: true
jobs:
- job: Win32NuGetPublish
displayName: Win32 FluentTester NuGet Publish
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
${{ if not(parameters.skipNugetPublish) }}:
templateContext:
outputs:
- output: nuget
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.FluentTesterWin32.nupkg;$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.E2E.Testing.Data.nupkg'
packageParentPath: '$(Build.ArtifactStagingDirectory)'
publishVstsFeed: Office # Required when pushing to internal feed.
nuGetFeedType: internal # Change to external when publishing to external feed
publishPackageMetadata: true # Optional
steps:
- checkout: self
persistCredentials: true
- template: setup-repo-min-build.yml
- template: setup-repo-min-build.yml
- script: |
yarn buildci
displayName: 'Building the repo'
- script: |
yarn buildci
displayName: 'Building the repo'
- script: |
yarn bundle
workingDirectory: apps/win32
displayName: 'Bundling FluentTester Win32 app'
- script: |
yarn bundle
workingDirectory: apps/win32
displayName: 'Bundling FluentTester Win32 app'
# Pack the NuGet package
- task: CmdLine@1
displayName: 'Create NuGet package for FluentTester Win32 bundle.'
inputs:
filename: nuget
arguments: 'pack Microsoft.FluentUI.FluentTesterWin32.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -OutputFileNamesWithoutVersion -Verbosity detailed -Version $(Build.BuildNumber) -properties CommitId=$(Build.SourceVersion)'
workingFolder: 'apps/win32/nuget'
# Pack the NuGet package
- task: CmdLine@1
displayName: 'Create NuGet package for FluentTester Win32 bundle.'
inputs:
filename: nuget
arguments: 'pack Microsoft.FluentUI.FluentTesterWin32.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -OutputFileNamesWithoutVersion -Verbosity detailed -Version $(Build.BuildNumber) -properties CommitId=$(Build.SourceVersion)'
workingFolder: 'apps/win32/nuget'
# Pack the NuGet package
- task: CmdLine@1
displayName: 'Create NuGet package for E2E testing directory'
inputs:
filename: nuget
arguments: 'pack Microsoft.FluentUI.E2E.Testing.Data.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -OutputFileNamesWithoutVersion -Verbosity detailed -Version $(Build.BuildNumber) -properties CommitId=$(Build.SourceVersion)'
workingFolder: 'apps/E2E/nuget'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 📒 Generate Manifest FluentTester
inputs:
BuildDropPath: $(System.DefaultWorkingDirectory)
- task: PublishPipelineArtifact@1
displayName: 📒 Publish Manifest FluentTester
inputs:
artifactName: SBom-FluentTester-$(System.JobAttempt)
targetPath: $(System.DefaultWorkingDirectory)/_manifest
- task: ComponentGovernanceComponentDetection@0
# Push the NuGet package
- task: NuGetCommand@2
displayName: 'NuGet push'
condition: not(${{ parameters.skipNugetPublish }})
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.FluentTesterWin32.nupkg'
publishVstsFeed: Office
# Push the NuGet package
- task: NuGetCommand@2
displayName: 'NuGet push E2E testing package'
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.FluentUI.E2E.Testing.Data.nupkg'
publishVstsFeed: Office
# Pack the NuGet package
- task: CmdLine@1
displayName: 'Create NuGet package for E2E testing directory'
inputs:
filename: nuget
arguments: 'pack Microsoft.FluentUI.E2E.Testing.Data.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -OutputFileNamesWithoutVersion -Verbosity detailed -Version $(Build.BuildNumber) -properties CommitId=$(Build.SourceVersion)'
workingFolder: 'apps/E2E/nuget'

Просмотреть файл

@ -1,17 +0,0 @@
{
"Enabled": true,
"Tools": {
"ESLint": {
"Enabled": true,
"Inputs": {
"Configuration": "recommended",
"Parser": "@typescript-eslint/parser",
"ParserOptions": "sourceType:script\necmaVersion:2017",
"CustomEnvironments": true,
"EnvironmentsBrowser": true,
"EnvironmentsEs6": true,
"EnvironmentsNode": true
}
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Make FURN complaint by migrating to 1ESPT pipelines",
"packageName": "@fluentui-react-native/tablist",
"email": "dannyvv@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -15,7 +15,8 @@ import type { TextProps } from '@fluentui-react-native/text';
import { Text } from '@fluentui-react-native/text';
import { useTabSlotProps } from './Tab.styling';
import { tabName, type TabProps, type TabState, type TabTokens } from './Tab.types';
import { tabName } from './Tab.types';
import type { TabProps, TabState, TabTokens } from './Tab.types';
import { tabStates, useTabTokens } from './TabTokens';
import { useTab } from './useTab';
import { useTabAnimation } from './useTabAnimation';

Просмотреть файл

@ -1,4 +1,5 @@
import { buildUseTokens, type Theme } from '@fluentui-react-native/framework';
import { buildUseTokens } from '@fluentui-react-native/framework';
import type { Theme } from '@fluentui-react-native/framework';
import type { TokensFromTheme } from '@fluentui-react-native/use-styling';
import type { TabTokens } from '..';