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
38 changes: 13 additions & 25 deletions .devops/templates/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,43 @@ parameters:
default: false
Comment thread
ecraig12345 marked this conversation as resolved.

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
displayName: Install Node.js
retryCountOnTaskFailure: 1
inputs:
# 👉 NOTE:
# - we can use only versions that ship with container, otherwise we will run into nodejs installation issues.
# - as 1es bumps those versions within container automatically we need to use `<major>.x` to not run into issues once they bump the versions.
# - `checkLatest: true` is required because some dependencies (e.g. @microsoft/fast-build) require node >=22.18.0,
# while the 1ES container may still ship an older 22.x (e.g. 22.14.0). This forces the task to install the latest 22.x.
# https://github.com/actions/runner-images/blob/ubuntu20/20230924.1/images/linux/Ubuntu2004-Readme.md#nodejs
version: '22.x'
version: 22.x
checkLatest: true
displayName: 'Install Node.js'
retryCountOnTaskFailure: 1

- script: |
echo "nodejs:" && node -v
echo "yarn:" && yarn -v
echo "npm:" && npm -v
displayName: 'print NodeJS,package managers versions'

# For multiline scripts, we want the whole task to fail if any line of the script fails.
# ADO doesn't have bash configured this way by default. To fix we override the SHELLOPTS built-in variable.
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# The options below include ADO defaults (braceexpand:hashall:interactive-comments) plus
# errexit:errtrace for better error behavior.
- script: |
echo "##vso[task.setvariable variable=shellopts]braceexpand:hashall:interactive-comments:errexit:errtrace"
displayName: Force exit on error (bash)
displayName: Print Node.js and package manager versions

# Log all the environment variables since it can be useful for debugging.
# (This happens automatically for the built-in agents, but not for custom agents.)
- script: |
printenv | sort
echo "SHELLOPTS $SHELLOPTS"
echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
displayName: Log environment variables (Linux)
condition: eq(variables['Agent.OS'], 'Linux')
set -x
git --no-pager config list
npm config list
yarn config --no-defaults
displayName: Log environment

- script: |
git config user.name "OGX bot"
git config user.email "257645319+office-ogx-auth-helper[bot]@users.noreply.github.com"
displayName: Configure git user (used by beachball)

- script: |
corepack enable
yarn install --immutable
# Do NOT run `corepack enable` - it's not needed since yarn is checked into the repo, and
# it causes a network request attempting to download yarn, which is not allowed.

- script: yarn install --immutable
displayName: yarn install
7 changes: 7 additions & 0 deletions .devops/templates/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ variables:
NX_PARALLEL: 8
NX_PREFER_TS_NODE: true
NX_VERBOSE_LOGGING: true

# For multiline scripts, we want the whole task to fail if any line of the script fails.
# ADO doesn't have bash configured this way by default. To fix we override the SHELLOPTS built-in variable.
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# The options below include ADO defaults (braceexpand:hashall:interactive-comments) plus
# errexit:errtrace for better error behavior.
SHELLOPTS: braceexpand:hashall:interactive-comments:errexit:errtrace
84 changes: 0 additions & 84 deletions azure-pipelines.hotfix.yml

This file was deleted.

6 changes: 1 addition & 5 deletions azure-pipelines.release-headless-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ parameters:
type: boolean
default: true

# Customize build number to include package prefix
# Example: headless_experimental_20201022.1
name: 'headless_experimental_$(Date:yyyyMMdd)$(Rev:.r)'
name: "headless_experimental_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -114,7 +111,6 @@ extends:

- script: |
yarn beachball publish -b origin/$(validation.branchPath) --no-push --tag experimental --config scripts/beachball/src/release-headless.config.js
git reset --hard origin/$(validation.branchPath)
displayName: Publish changes and bump versions
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
Expand Down
8 changes: 2 additions & 6 deletions azure-pipelines.release-vnext-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ parameters:
type: boolean
default: true

# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_experimental_$(Date:yyyyMMdd)$(Rev:.r)'
# Example: v9_experimental_20201022.1
name: "v9_experimental_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: release.vnext # Used to scope beachball to release only vnext packages
value: true
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -107,7 +104,6 @@ extends:

- script: |
yarn beachball publish -b origin/$(validation.branchPath) --no-push --tag experimental --config scripts/beachball/src/release-vNext.config.js
git reset --hard origin/$(validation.branchPath)
displayName: Publish changes and bump versions
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
Expand Down
10 changes: 2 additions & 8 deletions azure-pipelines.release-vnext-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ parameters:
type: boolean
default: false

# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_nightly_$(Date:yyyyMMdd)$(Rev:.r)'
# Example: v9_nightly_20201022.1
name: "v9_nightly_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: release.vnext # Used to scope beachball to release only vnext packages
value: true
- name: tags
value: production,externalfacing

schedules:
# Triggers the nightly release
Expand Down Expand Up @@ -92,7 +87,6 @@ extends:

- script: |
yarn beachball publish -b origin/$(Build.SourceBranchName) --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 }})
env:
Expand Down
17 changes: 5 additions & 12 deletions azure-pipelines.release-vnext.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
pr: none
trigger: none

# Customize build number to include major version
# Example: v9_20201022.1
name: 'v9_$(Date:yyyyMMdd)$(Rev:.r)'
name: "v9_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

parameters:
- name: dryRun
Expand All @@ -14,10 +13,6 @@ parameters:
variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: release.vnext # Used to scope beachball to release only vnext packages
value: true
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -68,6 +63,7 @@ extends:
- template: .devops/templates/run-with-token.yml@self
parameters:
steps:
# Publish, then reset to the updated origin/master state so manifest versions are correct.
- script: |
yarn beachball publish --config scripts/beachball/src/release-vNext.config.js --message 'release: applying package updates - react-components'
git reset --hard origin/master
Expand All @@ -78,12 +74,9 @@ extends:
condition: not(${{ parameters.dryRun }})

- script: |
node -r ./scripts/ts-node/src/register scripts/executors/src/tag-react-components.ts --token $(npmToken)
node -r ./scripts/ts-node/src/register scripts/executors/src/tag-react-components.ts
displayName: Tag prelease packages with prerelease tag
continueOnError: true
condition: not(${{ parameters.dryRun }})

# Since releases are scoped, this should warn for any packages that were mistakenly not included in scoping
- script: |
yarn syncpack list-mismatches
displayName: Check for dependency mismatches
env:
TOKEN: $(npmToken)
5 changes: 1 addition & 4 deletions azure-pipelines.release.headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ trigger: none

# Customize build number to include package prefix
# Example: headless_20201022.1
name: 'headless_$(Date:yyyyMMdd)$(Rev:.r)'
name: "headless_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"
Comment thread
ecraig12345 marked this conversation as resolved.

parameters:
- name: dryRun
Expand All @@ -14,8 +14,6 @@ parameters:
variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -75,7 +73,6 @@ extends:
steps:
- script: |
yarn beachball publish --config scripts/beachball/src/release-headless.config.js --message 'release: applying package updates - react-headless'
git reset --hard origin/master
env:
BEACHBALL_GIT_TOKEN: $(createToken.GITHUB_APP_TOKEN)
BEACHBALL_NPM_TOKEN: $(npmToken)
Expand Down
6 changes: 1 addition & 5 deletions azure-pipelines.release.tools-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ parameters:
type: boolean
default: true

# Customize build number to include tools experimental prefix
# Example: tools_experimental_20201022.1
name: 'tools_experimental_$(Date:yyyyMMdd)$(Rev:.r)'
name: "tools_experimental_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -106,7 +103,6 @@ extends:

- script: |
yarn beachball publish -b origin/$(validation.branchPath) --no-push --tag experimental --config scripts/beachball/src/release-tools.config.js
git reset --hard origin/$(validation.branchPath)
displayName: Publish changes and bump versions
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
Expand Down
5 changes: 1 addition & 4 deletions azure-pipelines.release.tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ trigger: none

# Customize build number to include major version
# Example: tools_20201022.1
name: 'tools_$(Date:yyyyMMdd)$(Rev:.r)'
name: "tools_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

parameters:
- name: dryRun
Expand All @@ -14,8 +14,6 @@ parameters:
variables:
- group: 'Github and NPM secrets'
- template: .devops/templates/variables.yml
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -74,7 +72,6 @@ extends:
steps:
- script: |
yarn beachball publish --config scripts/beachball/src/release-tools.config.js --message 'release: applying package updates - tools'
git reset --hard origin/master
env:
BEACHBALL_GIT_TOKEN: $(createToken.GITHUB_APP_TOKEN)
BEACHBALL_NPM_TOKEN: $(npmToken)
Expand Down
6 changes: 1 addition & 5 deletions azure-pipelines.release.web-components.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
pr: none
trigger: none

# Customize build number to include major version
# Example: web-components_20201022.1
name: 'web-components_$(Date:yyyyMMdd)$(Rev:.r)'
name: "web-components_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)"

parameters:
- name: dryRun
Expand All @@ -16,8 +15,6 @@ variables:
- template: .devops/templates/variables.yml
- name: release.web_components # Used to scope beachball to release only vnext packages
value: true
- name: tags
value: production,externalfacing

resources:
repositories:
Expand Down Expand Up @@ -72,7 +69,6 @@ extends:
steps:
- script: |
yarn beachball publish --config scripts/beachball/src/release-web-components.config.js --message 'release: applying package updates - web-components'
git reset --hard origin/master
env:
BEACHBALL_GIT_TOKEN: $(createToken.GITHUB_APP_TOKEN)
BEACHBALL_NPM_TOKEN: $(npmToken)
Expand Down
Loading
Loading