-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* cherry-pick (#3075) to 4.7, fix merge conflicts * add .yaml-based Azure DevOps pipelines to 4.8 branch * add readableFlowing property to INodeSocket (#2515) * fix cherry-pick 8d9a3e3 Co-authored-by: Michael Richardson <[email protected]> * change from adaptive-expressions to botframework-expressions * manually pick tokenResolver test fixes * from f1b6fc2 * address PR feedback re: INodeSocket * remove unused internal AddressInfo interface
- Loading branch information
Showing
6 changed files
with
338 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# This runs under botbuilder-js-ci.yml. Runs unit tests on Node versions 10 and 12. | ||
# | ||
|
||
# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber) | ||
name: $(Build.BuildId) | ||
|
||
pool: | ||
vmImage: 'macOS-10.15' | ||
|
||
variables: | ||
PackageVersion: 4.8.0-preview.$(Build.BuildNumber) | ||
PreviewPackageVersion: 4.8.0-preview.$(Build.BuildNumber) | ||
|
||
stages: | ||
- stage: Node10CI | ||
dependsOn: [] # Run this stage in parallel | ||
displayName: 'Node 10.x CI' | ||
variables: | ||
NodeVersion: 10.x | ||
jobs: | ||
- job: Node10UnitTests | ||
displayName: 'Node 10.x Unit Tests' | ||
steps: | ||
- template: js-build-steps.yml | ||
|
||
- powershell: | | ||
pushd .. | ||
Get-ChildItem -Recurse -Force | Where {$_.FullName -notlike "*node_modules*"} | ||
displayName: 'Dir workspace except node-modules (takes 5 seconds)' | ||
continueOnError: true | ||
condition: succeededOrFailed() | ||
- stage: Node12CI | ||
dependsOn: [] # Run this stage in parallel | ||
displayName: 'Node 12.x CI' | ||
variables: | ||
NodeVersion: 12.x | ||
jobs: | ||
- job: Node12UnitTests | ||
displayName: 'Node 12.x Unit Tests' | ||
steps: | ||
- template: js-build-steps.yml | ||
|
||
- powershell: | | ||
pushd .. | ||
Get-ChildItem -Recurse -Force | Where {$_.FullName -notlike "*node_modules*"} | ||
displayName: 'Dir workspace except node-modules (takes 5 seconds)' | ||
continueOnError: true | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# This runs under BotBuilder-JS-daily-yaml. | ||
|
||
# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber) | ||
name: $(Build.BuildId) | ||
|
||
pool: | ||
vmImage: 'macOS-10.15' | ||
|
||
variables: | ||
NodeVersion: 12.x | ||
# PackageVersion: Define this in Azure to be settable at queue time. Ex: 4.8.0-dev.{DateStamp}.{CommitHash} | ||
# PreviewPackageVersion: Define this in Azure to be settable at queue time. Ex: 4.8.0-dev.{DateStamp}.{CommitHash} | ||
|
||
steps: | ||
- powershell: | | ||
# Replace {DateStamp} and {CommitHash} tokens with the actual values in vars PackageVersion and PreviewPackageVersion | ||
$dateStamp = (Get-Date -format "yyyyMMdd"); | ||
$commitHash = "$(Build.SourceVersion)".SubString(0,7); | ||
"Raw PackageVersion = $(PackageVersion)"; | ||
$v = "$(PackageVersion)".Replace("{DateStamp}",$dateStamp).Replace("{CommitHash}",$commitHash); | ||
Write-Host "##vso[task.setvariable variable=PackageVersion;]$v"; | ||
"Resolved PackageVersion = $v"; | ||
"Raw PreviewPackageVersion = $(PreviewPackageVersion)"; | ||
$ppv = "$(PreviewPackageVersion)".Replace("{DateStamp}",$dateStamp).Replace("{CommitHash}",$commitHash); | ||
Write-Host "##vso[task.setvariable variable=PreviewPackageVersion;]$ppv"; | ||
"Resolved PreviewPackageVersion = $ppv"; | ||
displayName: 'Resolve package version variables' | ||
|
||
- template: js-daily-build-steps.yml | ||
|
||
- script: 'lerna exec --no-private npm pack' | ||
displayName: 'lerna exec --no-private npm pack' | ||
|
||
- task: CopyFiles@2 | ||
displayName: 'Copy TGZ files to staging' | ||
inputs: | ||
SourceFolder: libraries | ||
Contents: '*/*.tgz' | ||
TargetFolder: '$(Build.ArtifactStagingDirectory)' | ||
flattenFolders: true | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish staging to Build Artifacts' | ||
|
||
- powershell: | | ||
[string[]]$outvar = (Get-ChildItem *.tgz -Path $(Build.ArtifactStagingDirectory) ).Name; | ||
[int] $packageCount = $outvar.Length; | ||
$PackagesDescription = "$packageCount packages"; | ||
$PackagesDescription; | ||
$outvar; | ||
"##vso[task.setvariable variable=PackagesDescription;]$PackagesDescription"; | ||
[int] $maxTags = 5; | ||
if ($packageCount -gt $maxTags) { | ||
# Too many packages for tags. | ||
# Set a few package name variables for tags | ||
for ($i = 0; $i -lt $maxTags; $i++ ) { | ||
$p = $outvar[$i]; | ||
"##vso[task.setvariable variable=pkg$i;]$p"; | ||
} | ||
$message = "(See 'Package names' task log for full list)"; | ||
Write-Host "##vso[task.setvariable variable=pkg$i;]$message"; | ||
Write-Host $message; | ||
$packageCount = ++$i; | ||
} else { | ||
# Set package name variables for tags | ||
for ($i = 0; $i -lt $packageCount; $i++ ) { | ||
$p = $outvar[$i]; | ||
"##vso[task.setvariable variable=pkg$i;]$p"; | ||
} | ||
} | ||
for ($i = $packageCount; $i -le 30; $i++ ) { | ||
# Set remaining variables to an empty string | ||
"##vso[task.setvariable variable=pkg$i;]"; | ||
} | ||
displayName: 'Package names' | ||
continueOnError: true | ||
|
||
- task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 | ||
displayName: 'Tag Build with package names' | ||
inputs: | ||
tags: | | ||
$(PACKAGESDESCRIPTION) | ||
$(PKG0) | ||
$(PKG1) | ||
$(PKG2) | ||
$(PKG3) | ||
$(PKG4) | ||
$(PKG5) | ||
$(PKG6) | ||
$(PKG7) | ||
$(PKG8) | ||
$(PKG9) | ||
$(PKG10) | ||
$(PKG11) | ||
$(PKG12) | ||
continueOnError: true | ||
|
||
- powershell: | | ||
pushd .. | ||
ls -R | ||
displayName: 'Dir workspace' | ||
continueOnError: true | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#variables: | ||
# PackageVersion: Define this in the calling pipeline. | ||
|
||
steps: | ||
- task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 | ||
displayName: 'Tag Build with version number. (Skip if a fork PR to avoid access denied error.)' | ||
inputs: | ||
tags: | | ||
v: $(PackageVersion) | ||
preview v: $(PreviewPackageVersion) | ||
continueOnError: true | ||
condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'false')) | ||
|
||
- task: NodeTool@0 | ||
displayName: 'Use Node $(NodeVersion)' | ||
inputs: | ||
versionSpec: $(NodeVersion) | ||
|
||
- task: Npm@1 | ||
displayName: 'npm install lerna ...' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'install --global [email protected] nyc mocha eslint-plugin-jsdoc' | ||
|
||
- task: Npm@1 | ||
displayName: '/tools npm install' | ||
inputs: | ||
workingDir: tools | ||
verbose: false | ||
|
||
- bash: | | ||
set -o xtrace | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' package.json | ||
sed -i '' 's/${Version}/$(PreviewPackageVersion)/g' libraries/botframework-expressions/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-ai/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-applicationinsights/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-azure/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-core/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-dialogs/package.json | ||
sed -i '' 's/${Version}/$(PreviewPackageVersion)/g' libraries/botbuilder-lg/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-testing/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-config/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-connector/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-schema/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-streaming/package.json | ||
displayName: 'Replace version number in package.json files' | ||
continueOnError: true | ||
|
||
- bash: | | ||
npm run update-versions | ||
displayName: 'npm run update-versions' | ||
env: | ||
Version: $(PackageVersion) | ||
PreviewPackageVersion: $(PreviewPackageVersion) | ||
|
||
- powershell: | | ||
$fileName = 'package-lock.json' | ||
Get-ChildItem -Path ./tools -File | Where-Object {$_.Name -eq $fileName}; | ||
Write-Host "`nDeleting any files listed above"; | ||
Get-ChildItem -Path ./tools -File | Where-Object {$_.Name -eq $fileName} | Remove-Item -Force; | ||
displayName: 'Delete tools/package-lock.json. Maybe avoids intermittent error in \"npm run postinstall\" ENOENT: no such file or directory, lchown ''/Users/runner/.npm/_locks/staging-7c222bec8116519f.lock''' | ||
continueOnError: true | ||
|
||
- task: Npm@1 | ||
displayName: 'npm run postinstall' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run postinstall' | ||
|
||
- task: Npm@1 | ||
displayName: 'npm run build' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run build' | ||
|
||
- task: Npm@1 | ||
displayName: 'npm run test' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#variables: | ||
# PackageVersion: Define this in the calling pipeline. | ||
# PreviewPackageVersion: Define this in Azure to be settable at queue time. Ex: 4.9.0-dev.{DateStamp}.{CommitHash} | ||
|
||
steps: | ||
- task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 | ||
displayName: 'Tag Build with version number. (Skip if a fork PR to avoid access denied error.)' | ||
inputs: | ||
tags: | | ||
v: $(PackageVersion) | ||
preview v: $(PreviewPackageVersion) | ||
continueOnError: true | ||
condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'false')) | ||
|
||
- task: NodeTool@0 | ||
displayName: 'Use Node $(NodeVersion)' | ||
inputs: | ||
versionSpec: $(NodeVersion) | ||
|
||
- task: Npm@1 | ||
displayName: 'npm install lerna ...' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'install --global [email protected] nyc mocha eslint-plugin-jsdoc' | ||
|
||
- task: Npm@1 | ||
displayName: '/tools npm install' | ||
inputs: | ||
workingDir: tools | ||
verbose: false | ||
|
||
- bash: | | ||
set -o xtrace | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' package.json | ||
sed -i '' 's/${Version}/$(PreviewPackageVersion)/g' libraries/botframework-expressions/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-ai/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-applicationinsights/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-azure/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-core/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-dialogs/package.json | ||
sed -i '' 's/${Version}/$(PreviewPackageVersion)/g' libraries/botbuilder-lg/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botbuilder-testing/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-config/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-connector/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-schema/package.json | ||
sed -i '' 's/${Version}/$(PackageVersion)/g' libraries/botframework-streaming/package.json | ||
displayName: 'Replace version number in package.json files' | ||
continueOnError: true | ||
|
||
- bash: | | ||
npm run update-versions | ||
displayName: 'npm run update-versions' | ||
env: | ||
Version: $(PackageVersion) | ||
PreviewPackageVersion: $(PreviewPackageVersion) | ||
|
||
- powershell: | | ||
$fileName = 'package-lock.json' | ||
Get-ChildItem -Path ./tools -File | Where-Object {$_.Name -eq $fileName}; | ||
Write-Host "`nDeleting any files listed above"; | ||
Get-ChildItem -Path ./tools -File | Where-Object {$_.Name -eq $fileName} | Remove-Item -Force; | ||
displayName: 'Delete tools/package-lock.json. Maybe avoids intermittent error in \"npm run postinstall\" ENOENT: no such file or directory, lchown ''/Users/runner/.npm/_locks/staging-7c222bec8116519f.lock''' | ||
continueOnError: true | ||
|
||
- task: Npm@1 | ||
displayName: 'npm run postinstall' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run postinstall' | ||
|
||
- task: Npm@1 | ||
displayName: 'npm run build' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run build' | ||
|
||
- task: Npm@1 | ||
displayName: 'npm run test' | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters