ci: set timeouts for all steps on VSTS (#15051)
This commit is contained in:
parent
978d16b8ab
commit
0662dd6449
1 changed files with 35 additions and 1 deletions
36
vsts.yml
36
vsts.yml
|
@ -3,7 +3,7 @@ jobs:
|
||||||
displayName: Build
|
displayName: Build
|
||||||
# Build Electron only if we are NOT going to use artifacts produced by a different build.
|
# Build Electron only if we are NOT going to use artifacts produced by a different build.
|
||||||
condition: eq(variables['Custom.UseArtifacts.BuildId'], '')
|
condition: eq(variables['Custom.UseArtifacts.BuildId'], '')
|
||||||
timeoutInMinutes: 100
|
timeoutInMinutes: 120
|
||||||
variables:
|
variables:
|
||||||
CI: true
|
CI: true
|
||||||
steps:
|
steps:
|
||||||
|
@ -12,6 +12,7 @@ jobs:
|
||||||
displayName: 'Copy Files to: src/electron'
|
displayName: 'Copy Files to: src/electron'
|
||||||
inputs:
|
inputs:
|
||||||
TargetFolder: src/electron
|
TargetFolder: src/electron
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
export PATH="$PATH:/Users/electron/depot_tools"
|
export PATH="$PATH:/Users/electron/depot_tools"
|
||||||
|
@ -32,6 +33,7 @@ jobs:
|
||||||
export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
|
export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
|
||||||
echo "##vso[task.setvariable variable=CHROMIUM_BUILDTOOLS_PATH]`pwd`/buildtools"
|
echo "##vso[task.setvariable variable=CHROMIUM_BUILDTOOLS_PATH]`pwd`/buildtools"
|
||||||
displayName: gclient sync
|
displayName: gclient sync
|
||||||
|
timeoutInMinutes: 25 # Usually takes about 10-15 minutes.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
|
@ -46,6 +48,7 @@ jobs:
|
||||||
AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET)
|
AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET)
|
||||||
displayName: GN gen with sccache
|
displayName: GN gen with sccache
|
||||||
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
timeoutInMinutes: 1 # Shouldn't take more than 10 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
|
@ -53,16 +56,19 @@ jobs:
|
||||||
gn gen out/Default --args='import("'$GN_CONFIG'")'" $GN_EXTRA_ARGS"
|
gn gen out/Default --args='import("'$GN_CONFIG'")'" $GN_EXTRA_ARGS"
|
||||||
displayName: GN gen without sccache
|
displayName: GN gen without sccache
|
||||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
timeoutInMinutes: 1 # Shouldn't take more than 10 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default electron:electron_app
|
ninja -C out/Default electron:electron_app
|
||||||
displayName: Ninja build app
|
displayName: Ninja build app
|
||||||
|
timeoutInMinutes: 100 # Can take up to 80 minutes without compiler cache.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default third_party/electron_node:headers
|
ninja -C out/Default third_party/electron_node:headers
|
||||||
displayName: Build Node.js headers for testing
|
displayName: Build Node.js headers for testing
|
||||||
|
timeoutInMinutes: 1 # Usually takes less than 10 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
|
@ -70,6 +76,7 @@ jobs:
|
||||||
ninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
ninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
||||||
displayName: Non proprietary ffmpeg build
|
displayName: Non proprietary ffmpeg build
|
||||||
condition: and(succeeded(), or(eq(variables['RUN_TESTS'], '1'), eq(variables['ELECTRON_RELEASE'], '1')))
|
condition: and(succeeded(), or(eq(variables['RUN_TESTS'], '1'), eq(variables['ELECTRON_RELEASE'], '1')))
|
||||||
|
timeoutInMinutes: 2 # Usually takes less than 30 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
|
@ -83,11 +90,13 @@ jobs:
|
||||||
electron/script/zip-symbols.py
|
electron/script/zip-symbols.py
|
||||||
displayName: Collect symbols
|
displayName: Collect symbols
|
||||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
timeoutInMinutes: 5 # Usually takes less than two.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
"$SCCACHE_BINARY" --stop-server
|
"$SCCACHE_BINARY" --stop-server
|
||||||
displayName: Check sccache stats after build
|
displayName: Check sccache stats after build
|
||||||
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
|
@ -100,22 +109,26 @@ jobs:
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default electron:electron_dist_zip
|
ninja -C out/Default electron:electron_dist_zip
|
||||||
displayName: Build dist zip
|
displayName: Build dist zip
|
||||||
|
timeoutInMinutes: 2 # Usually takes less than 20 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default electron:electron_chromedriver_zip
|
ninja -C out/Default electron:electron_chromedriver_zip
|
||||||
displayName: Build chromedriver and zip
|
displayName: Build chromedriver and zip
|
||||||
|
timeoutInMinutes: 3 # Normally less than one minute.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src
|
cd src
|
||||||
ninja -C out/Default electron:electron_mksnapshot_zip
|
ninja -C out/Default electron:electron_mksnapshot_zip
|
||||||
displayName: Build mksnapshot and zip
|
displayName: Build mksnapshot and zip
|
||||||
|
timeoutInMinutes: 1 # Normally less than 10 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
npm run create-typescript-definitions
|
npm run create-typescript-definitions
|
||||||
displayName: Generate type declarations
|
displayName: Generate type declarations
|
||||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
timeoutInMinutes: 2 # Normally takes about 10-15 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
|
@ -135,34 +148,40 @@ jobs:
|
||||||
fi
|
fi
|
||||||
displayName: Upload distribution
|
displayName: Upload distribution
|
||||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||||
|
timeoutInMinutes: 5 # Normally takes about two minutes.
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Build Artifacts (application zip)
|
displayName: Publish Build Artifacts (application zip)
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/dist.zip'
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/dist.zip'
|
||||||
ArtifactName: Default
|
ArtifactName: Default
|
||||||
|
timeoutInMinutes: 2 # The file is relatively big, so it takes about 20 seconds.
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Build Artifacts (Node.js headers)
|
displayName: Publish Build Artifacts (Node.js headers)
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/gen/node_headers.tar.gz'
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/gen/node_headers.tar.gz'
|
||||||
ArtifactName: Default
|
ArtifactName: Default
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Build Artifacts (chromedriver.zip)
|
displayName: Publish Build Artifacts (chromedriver.zip)
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/chromedriver.zip'
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/src/out/Default/chromedriver.zip'
|
||||||
ArtifactName: Default
|
ArtifactName: Default
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
echo $BUILD_SOURCEVERSION > revision
|
echo $BUILD_SOURCEVERSION > revision
|
||||||
displayName: Save exact revision
|
displayName: Save exact revision
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Build Artifacts (revision)
|
displayName: Publish Build Artifacts (revision)
|
||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(System.DefaultWorkingDirectory)/revision'
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/revision'
|
||||||
ArtifactName: Default
|
ArtifactName: Default
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
# Notify about success only if we are supposed to, and we don't have to run tests first.
|
# Notify about success only if we are supposed to, and we don't have to run tests first.
|
||||||
- bash: |
|
- bash: |
|
||||||
|
@ -172,6 +191,7 @@ jobs:
|
||||||
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
||||||
displayName: Post Slack Notification on success
|
displayName: Post Slack Notification on success
|
||||||
condition: and(succeeded(), and(eq(variables['NOTIFY_SLACK'], '1'), ne(variables['RUN_TESTS'], '1')))
|
condition: and(succeeded(), and(eq(variables['NOTIFY_SLACK'], '1'), ne(variables['RUN_TESTS'], '1')))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
||||||
|
@ -180,6 +200,7 @@ jobs:
|
||||||
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
||||||
displayName: 'Post Slack Notification on Failure'
|
displayName: 'Post Slack Notification on Failure'
|
||||||
condition: and(failed(), eq(variables['NOTIFY_SLACK'], '1'))
|
condition: and(failed(), eq(variables['NOTIFY_SLACK'], '1'))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- job: run_tests
|
- job: run_tests
|
||||||
displayName: Run Tests
|
displayName: Run Tests
|
||||||
|
@ -200,6 +221,7 @@ jobs:
|
||||||
displayName: Copy Electron sources to "src/electron"
|
displayName: Copy Electron sources to "src/electron"
|
||||||
inputs:
|
inputs:
|
||||||
TargetFolder: src/electron
|
TargetFolder: src/electron
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
# Use Electron built in the current job, if a user didn't specify a build id.
|
# Use Electron built in the current job, if a user didn't specify a build id.
|
||||||
- task: DownloadBuildArtifacts@0
|
- task: DownloadBuildArtifacts@0
|
||||||
|
@ -208,6 +230,7 @@ jobs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: Default
|
artifactName: Default
|
||||||
condition: and(succeeded(), eq(variables['Custom.UseArtifacts.BuildId'], ''))
|
condition: and(succeeded(), eq(variables['Custom.UseArtifacts.BuildId'], ''))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
# Use Electron built in a different job.
|
# Use Electron built in a different job.
|
||||||
- task: DownloadBuildArtifacts@0
|
- task: DownloadBuildArtifacts@0
|
||||||
|
@ -220,6 +243,7 @@ jobs:
|
||||||
buildId: $(Custom.UseArtifacts.BuildId)
|
buildId: $(Custom.UseArtifacts.BuildId)
|
||||||
artifactName: Default
|
artifactName: Default
|
||||||
condition: and(succeeded(), ne(variables['Custom.UseArtifacts.BuildId'], ''))
|
condition: and(succeeded(), ne(variables['Custom.UseArtifacts.BuildId'], ''))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
TESTS_REVISION=$BUILD_SOURCEVERSION
|
TESTS_REVISION=$BUILD_SOURCEVERSION
|
||||||
|
@ -229,29 +253,34 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
displayName: Check if revisions of build sources and test sources match
|
displayName: Check if revisions of build sources and test sources match
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
displayName: Extract Electron app
|
displayName: Extract Electron app
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: $(System.ArtifactsDirectory)/Default/dist.zip
|
archiveFilePatterns: $(System.ArtifactsDirectory)/Default/dist.zip
|
||||||
destinationFolder: src/out/Default
|
destinationFolder: src/out/Default
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
displayName: Extract Node.js headers
|
displayName: Extract Node.js headers
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: $(System.ArtifactsDirectory)/Default/node_headers.tar.gz
|
archiveFilePatterns: $(System.ArtifactsDirectory)/Default/node_headers.tar.gz
|
||||||
destinationFolder: src/out/Default/gen
|
destinationFolder: src/out/Default/gen
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
# TODO(alexeykuzmin): Install Node when tests are run on Microsoft-hosted agents.
|
# TODO(alexeykuzmin): Install Node when tests are run on Microsoft-hosted agents.
|
||||||
# - task: NodeTool@0
|
# - task: NodeTool@0
|
||||||
# displayName: Install Node.js 10.x
|
# displayName: Install Node.js 10.x
|
||||||
# inputs:
|
# inputs:
|
||||||
# versionSpec: '10.x'
|
# versionSpec: '10.x'
|
||||||
|
# timeoutInMinutes: 2 # Should take less than a minute.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
npm install
|
npm install
|
||||||
displayName: Install Node.js modules
|
displayName: Install Node.js modules
|
||||||
|
timeoutInMinutes: 4 # Should take about 30 seconds.
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
if pgrep Electron; then
|
if pgrep Electron; then
|
||||||
|
@ -260,6 +289,7 @@ jobs:
|
||||||
rm -rf ~/Library/Saved\ Application\ State/com.github.electron.savedState
|
rm -rf ~/Library/Saved\ Application\ State/com.github.electron.savedState
|
||||||
rm -rf ~/Library/Application\ Support/Electron
|
rm -rf ~/Library/Application\ Support/Electron
|
||||||
displayName: Make sure Electron isn't running from previous tests
|
displayName: Make sure Electron isn't running from previous tests
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
export ELECTRON_OUT_DIR=Default
|
export ELECTRON_OUT_DIR=Default
|
||||||
|
@ -273,6 +303,7 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
displayName: Check test results existence
|
displayName: Check test results existence
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
|
@ -280,6 +311,7 @@ jobs:
|
||||||
testResultsFiles: '*.xml'
|
testResultsFiles: '*.xml'
|
||||||
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
||||||
condition: and(always(), eq(variables['MOCHA_FILE'], 'junit/test-results.xml'))
|
condition: and(always(), eq(variables['MOCHA_FILE'], 'junit/test-results.xml'))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
||||||
|
@ -288,6 +320,7 @@ jobs:
|
||||||
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
||||||
displayName: Post Slack Notification on failure
|
displayName: Post Slack Notification on failure
|
||||||
condition: and(failed(), eq(variables['NOTIFY_SLACK'], '1'))
|
condition: and(failed(), eq(variables['NOTIFY_SLACK'], '1'))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
|
||||||
|
@ -296,3 +329,4 @@ jobs:
|
||||||
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
|
||||||
displayName: Post Slack Notification on success
|
displayName: Post Slack Notification on success
|
||||||
condition: and(succeeded(), eq(variables['NOTIFY_SLACK'], '1'))
|
condition: and(succeeded(), eq(variables['NOTIFY_SLACK'], '1'))
|
||||||
|
timeoutInMinutes: 1
|
||||||
|
|
Loading…
Reference in a new issue