-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ci: setup wc v3 daily releases #25808
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
Changes from all commits
558d4d5
30b09a7
c9c9605
1e39564
ac2ab6d
7545fcf
e48e679
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| pr: none | ||
| trigger: none | ||
|
|
||
| # Customize build number to include major version | ||
| # Example: web-components_20201022.1 | ||
| name: 'web-components_$(Date:yyyyMMdd)$(Rev:.r)' | ||
|
|
||
| variables: | ||
| - group: 'Github and NPM secrets' | ||
| - template: .devops/templates/variables.yml | ||
| parameters: | ||
| skipComponentGovernanceDetection: false | ||
| - name: release.web_components # Used to scope beachball to release only vnext packages | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is probably not needed - remove |
||
| value: true | ||
| - group: InfoSec-SecurityResults | ||
| - name: tags | ||
| value: production,externalfacing | ||
|
|
||
| schedules: | ||
| # Triggers the nightly release | ||
| # minute 0, hour 4 in UTC (5am in UTC+1), any day of month, any month, days 1-5 of week (M-F) | ||
| # https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax | ||
| - cron: '0 4 * * 1-5' | ||
| displayName: 'Daily release (M-F at 5am UTC+1)' | ||
| branches: | ||
| include: | ||
| - web-components-v3 | ||
|
|
||
| jobs: | ||
| - template: .devops/templates/compliance-job.yml | ||
|
|
||
| - job: Release | ||
| dependsOn: Compliance | ||
| pool: '1ES-Host-Ubuntu' | ||
| workspace: | ||
| clean: all | ||
| steps: | ||
| - template: .devops/templates/tools.yml | ||
|
|
||
| - script: | | ||
| git config user.name "Fluent UI Build" | ||
| git config user.email "[email protected]" | ||
| displayName: Configure git user (used by beachball) | ||
|
|
||
| - task: Bash@3 | ||
| inputs: | ||
| filePath: yarn-ci.sh | ||
| displayName: yarn | ||
|
|
||
| # --only makes it only run tests (otherwise due to the missing --production arg, lage would re-run the build) | ||
| # https://github.com/microsoft/fluentui/issues/21686 | ||
| - script: | | ||
| yarn lage format:check lint test build --to @fluentui/web-components | ||
| displayName: Build, Test, Lint | ||
|
|
||
| - script: | | ||
| yarn beachball publish -b origin/web-components-v3 --access public -y -n $(npmToken) --config scripts/beachball/release-web-components.config.js | ||
| git reset --hard origin/web-components-v3 | ||
| env: | ||
| GITHUB_PAT: $(githubPAT) | ||
| displayName: Publish changes and bump versions | ||
|
|
||
| - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 | ||
| displayName: 📒 Generate Manifest | ||
| inputs: | ||
| BuildDropPath: $(System.DefaultWorkingDirectory) | ||
|
|
||
| - task: PublishPipelineArtifact@1 | ||
| displayName: 📒 Publish Manifest | ||
| inputs: | ||
| artifactName: SBom-$(System.JobAttempt) | ||
| targetPath: $(System.DefaultWorkingDirectory)/_manifest | ||
|
|
||
| - task: ComponentGovernanceComponentDetection@0 | ||
| displayName: 'Component governance detection' | ||
| inputs: | ||
| sourceScanPath: $(Agent.BuildDirectory) | ||
| condition: succeeded() | ||
| timeoutInMinutes: 5 | ||
| continueOnError: true | ||
|
|
||
| - template: .devops/templates/cleanup.yml | ||
| parameters: | ||
| checkForModifiedFiles: false | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
| "comment": "chore: bump web-components to 3.0.0-alpha.0", | ||
| "packageName": "@fluentui/web-components", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "none" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| const path = require('path'); | ||
| const fs = require('fs'); | ||
|
|
||
| /** | ||
| * @typedef {{ | ||
| type: 'none' | 'prerelease' | 'patch' | 'minor' | 'major'; | ||
| comment: string; | ||
| packageName: string; | ||
| email: string; | ||
| dependentChangeType: 'none' | 'patch'; | ||
| }} ChangeFile | ||
| */ | ||
|
|
||
| const isExecutedFromCli = require.main === module; | ||
|
|
||
| if (isExecutedFromCli) { | ||
| const changefilesRootPath = path.resolve(__dirname, '../../change'); | ||
| main(changefilesRootPath); | ||
| } | ||
|
|
||
| /** | ||
| * Utility for web-components-v3 development branch to double check we dont accidentally introduce chain of changes, | ||
| * which could result in releasing/bumping monorepo packages beside `@fluentui/web-components` ! | ||
| * | ||
| * ⚠️ TODO: | ||
| * - This functionality NEEDS to be REMOVED prior merging to master | ||
| * - Usage needs to be removed from .github/workflows/check-packages.yml | ||
| */ | ||
| function main(/** @type {string} */ root) { | ||
| const changeFiles = fs.readdirSync(root, 'utf8'); | ||
|
|
||
| const invalidChangeFiles = /** @type string [] */ (changeFiles | ||
| .map(changeFilePath => { | ||
| const filePath = path.join(root, changeFilePath); | ||
| /** @type {ChangeFile} */ | ||
| const content = JSON.parse(fs.readFileSync(filePath, 'utf-8')); | ||
|
|
||
| if (content.packageName === '@fluentui/web-components') { | ||
| return; | ||
| } | ||
|
|
||
| if (content.type !== 'none' || content.dependentChangeType !== 'none') { | ||
| return changeFilePath; | ||
| } | ||
| }) | ||
| .filter(Boolean)); | ||
|
|
||
| if (invalidChangeFiles.length > 0) { | ||
| console.error('================'); | ||
| console.error(`You commited changefiles with not allowed type/dependentChangeType!`); | ||
| console.error( | ||
| `Changefiles that are not for @fluentui/web-components need to have type and dependentChangeType set to "none"`, | ||
| ); | ||
| console.error(); | ||
| console.error('Invalid change files:'); | ||
| console.error(invalidChangeFiles.join('\n')); | ||
| console.error('================'); | ||
|
|
||
| process.exit(1); | ||
| } | ||
|
|
||
| console.log('✅ All changefiles are valid.'); | ||
| } | ||
|
|
||
| exports.main = main; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing for wc3 branch ( v3 WC are not used here ). @miroslavstastny we could undo your commented code and use wc v2 from npm (would need tweaking of the stress-test setup ). Lemme know what do you wanna do. ty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just forgot to remove the dependency. Let's remove for now.