mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #14700 from trop-bot/1-8-x-bp-ci--skip-vsts-testing-builds-on-older-branches-1537376182355
ci: Skip VSTS testing builds on older branches (backport: 1-8-x)
This commit is contained in:
71
vsts.yml
71
vsts.yml
@@ -2,29 +2,21 @@ resources:
|
||||
- repo: self
|
||||
steps:
|
||||
- bash: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo 'Bootstrapping Electron for release build'
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH
|
||||
else
|
||||
echo 'Bootstrapping Electron for debug build'
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
||||
fi
|
||||
echo 'Non release VSTS builds do not run on older branches'
|
||||
displayName: Skip build on older branch
|
||||
condition: ne(variables['ELECTRON_RELEASE'], '1')
|
||||
|
||||
- bash: |
|
||||
echo 'Bootstrapping Electron for release build'
|
||||
script/bootstrap.py --target_arch=$TARGET_ARCH
|
||||
name: Bootstrap
|
||||
condition: eq(variables['ELECTRON_RELEASE'], '1')
|
||||
|
||||
- bash: |
|
||||
npm run lint
|
||||
name: Lint
|
||||
condition: and(succeeded(), ne(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- bash: |
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
echo 'Building Electron for release'
|
||||
script/build.py -c R
|
||||
else
|
||||
echo 'Building Electron for debug'
|
||||
script/build.py -c D
|
||||
fi
|
||||
echo 'Building Electron for release'
|
||||
script/build.py -c R
|
||||
name: Build
|
||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- bash: |
|
||||
echo 'Creating Electron release distribution'
|
||||
@@ -43,42 +35,11 @@ steps:
|
||||
name: Upload_distribution
|
||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- bash: |
|
||||
echo 'Testing Electron build'
|
||||
mkdir junit
|
||||
export MOCHA_FILE="junit/test-results.xml"
|
||||
export MOCHA_REPORTER="mocha-junit-reporter"
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
script/test.py --ci --rebuild_native_modules -c R
|
||||
else
|
||||
script/test.py --ci --rebuild_native_modules
|
||||
fi
|
||||
name: Test
|
||||
condition: or(ne(variables['ELECTRON_RELEASE'], '1'), eq(variables['UPLOAD_TO_S3'], '1'))
|
||||
|
||||
- bash: |
|
||||
echo 'Verifying ffmpeg on build'
|
||||
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
||||
script/verify-ffmpeg.py -R
|
||||
else
|
||||
script/verify-ffmpeg.py
|
||||
fi
|
||||
name: Verify_FFmpeg
|
||||
condition: or(ne(variables['ELECTRON_RELEASE'], '1'), eq(variables['UPLOAD_TO_S3'], '1'))
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish Test Results
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Build Artifacts
|
||||
inputs:
|
||||
testResultsFiles: 'test-results.xml'
|
||||
searchFolder: junit
|
||||
condition: and(always(), ne(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- task: kasunkodagoda.slack-notification.slack-notification-task.SlackNotification@3
|
||||
displayName: Post Slack Notification
|
||||
inputs:
|
||||
SlackApiToken: '$(slack_token)'
|
||||
Channel: '#bot-nightly-releases'
|
||||
Message: '$(Build.DefinitionName)-$(Build.BuildNumber) finished with a $(Agent.JobStatus) status.'
|
||||
condition: and(always(), eq(variables['Build.Reason'], 'Schedule'))
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/out'
|
||||
ArtifactName: out
|
||||
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
||||
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
|
||||
Reference in New Issue
Block a user