Skip to content
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
18 changes: 12 additions & 6 deletions .devops/templates/tools.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Install versions of Node and Yarn required by build pipelines.
parameters:
- name: dryRun
displayName: Dry Run Mode
type: boolean
default: false

steps:
# Logs a message when dry run mode is enabled.
- script: |
echo "DRY RUN mode enabled!"
displayName: DRY RUN mode status
condition: eq(${{ parameters.dryRun }}, true)

- task: UseNode@1
inputs:
# 👉 NOTE:
Expand Down Expand Up @@ -38,9 +50,3 @@ steps:
echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
displayName: Log environment variables (Linux)
condition: eq(variables['Agent.OS'], 'Linux')

# Logs a message when dry run mode is enabled.
- script: |
echo "dry run mode enabled!"
displayName: dry run mode notification
condition: eq(variables.dryRun, true)
3 changes: 0 additions & 3 deletions .devops/templates/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ variables:
deployBasePath: ${{ coalesce(parameters.deployBasePath, replace(variables['Build.SourceBranch'], 'refs/', '')) }}

skipComponentGovernanceDetection: ${{ parameters.skipComponentGovernanceDetection }}

# Dry run mode for testing the pipeline without making changes
dryRun: false
2 changes: 2 additions & 0 deletions azure-pipelines.deprecate-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}
- script: |
npm deprecate ${{ parameters.packageSpec }} "${{ parameters.message }}" --registry https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=$(npmToken)
displayName: 'Deprecate package'
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
node -e "if('$(targetNpmVersion)' === '') throw new Error('targetNpmVersion is not specified');"
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.release-vnext-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
git config user.name "Fluent UI Build"
Expand Down
9 changes: 9 additions & 0 deletions azure-pipelines.release-vnext-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pr: none
trigger: none

parameters:
- name: dryRun
displayName: Dry Run Mode
type: boolean
default: false

# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_nightly_$(Date:yyyyMMdd)$(Rev:.r)'
Expand Down Expand Up @@ -56,6 +62,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
git config user.name "Fluent UI Build"
Expand Down Expand Up @@ -98,6 +106,7 @@ extends:
yarn publish:beachball -b origin/$(Build.SourceBranchName) -n $(npmToken) --no-push --tag nightly --config scripts/beachball/src/release-vNext.config.js
git reset --hard origin/$(Build.SourceBranchName)
displayName: Publish changes and bump versions
condition: not(${{ parameters.dryRun }})

- template: .devops/templates/cleanup.yml@self
parameters:
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.release-vnext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
git config user.name "Fluent UI Build"
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.release.tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
git config user.name "Fluent UI Build"
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.release.web-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ extends:
artifactName: output
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
git config user.name "Fluent UI Build"
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ extends:
displayName: api-json
steps:
- template: .devops/templates/tools.yml@self
parameters:
dryRun: ${{ parameters.dryRun }}

- script: |
git config user.name "Fluent UI Build"
Expand Down