Make sure artifacts are properly saved for nightly release builds

Also fix VSTS slack integration and make sure tests don't run for GitHub releases.
Update to latest libchromiumcontent
This commit is contained in:
John Kleinschmidt 2018-07-12 10:34:10 -04:00
parent 6045d1218a
commit 1c70a1cccd
5 changed files with 51 additions and 40 deletions

View file

@ -102,9 +102,13 @@ build-steps: &build-steps
mkdir junit mkdir junit
script/test.py --ci --rebuild_native_modules script/test.py --ci --rebuild_native_modules
else else
if [ "$UPLOAD_TO_S3" == "1" ]; then
echo 'Testing Electron release build' echo 'Testing Electron release build'
mkdir junit mkdir junit
script/test.py --ci --rebuild_native_modules -c R script/test.py --ci --rebuild_native_modules -c R
else
echo 'Skipping tests on GitHub release'
fi
fi fi
else else
echo 'Skipping tests due to configuration' echo 'Skipping tests due to configuration'
@ -141,10 +145,7 @@ build-steps: &build-steps
- store_artifacts: - store_artifacts:
path: junit path: junit
- store_artifacts: - store_artifacts:
path: out/electron.d.ts path: out
- store_artifacts:
path: out/electron-api.json
build-defaults: &build-defaults build-defaults: &build-defaults
docker: docker:

2
DEPS
View file

@ -2,7 +2,7 @@ vars = {
'chromium_version': 'chromium_version':
'66.0.3359.181', '66.0.3359.181',
'libchromiumcontent_revision': 'libchromiumcontent_revision':
'ff1c994b0e4f5ddf664478aea0c836ba84479ea8', '83a05b94ef363d574030ec2f018ec758e8314c19',
'node_version': 'node_version':
'v10.2.0-35-g4879332def', 'v10.2.0-35-g4879332def',

View file

@ -1,28 +1,26 @@
version: 1.0.{build} version: 1.0.{build}
branches:
except:
- /^release$|^release-\d-\d-x$/
build_cloud: electron-16 build_cloud: electron-16
image: electron-16-vs2017 image: electron-16-vs2017
environment: environment:
DISABLE_CRASH_REPORTER_TESTS: true DISABLE_CRASH_REPORTER_TESTS: true
matrix:
- TARGET_ARCH: ia32
- TARGET_ARCH: x64
build_script: build_script:
- ps: >- - ps: >-
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) { if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
} else { } else {
Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64" Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64"
$env:path = "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64;$env:path" $env:path = "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64;$env:path"
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'True') {
$env:RUN_RELEASE_BUILD = "1"
}
$Message = (git log --format=%B -n 1 HEAD) | Out-String $Message = (git log --format=%B -n 1 HEAD) | Out-String
if ((Test-Path Env:\RUN_RELEASE_BUILD)) { if ((Test-Path Env:\RUN_RELEASE_BUILD)) {
$env:ELECTRON_RELEASE = '1' $env:ELECTRON_RELEASE = '1'
Write-Output "release build triggered from api" Write-Output "release build triggered from api"
} }
if ((Test-Path Env:\ELECTRON_RELEASE)) { if ((Test-Path Env:\ELECTRON_RELEASE)) {
Write-Output "Running release build" Write-Output "Running release build"
python script\bootstrap.py --target_arch=$env:TARGET_ARCH python script\bootstrap.py --target_arch=$env:TARGET_ARCH
@ -38,8 +36,8 @@ build_script:
} else { } else {
"Build succeeded." "Build succeeded."
} }
Push-AppveyorArtifact out
} }
test_script: test_script:
- ps: >- - ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) { if (Test-Path Env:\ELECTRON_RELEASE) {
@ -53,7 +51,6 @@ test_script:
Write-Output "Tests succeeded." Write-Output "Tests succeeded."
} }
python script\verify-ffmpeg.py python script\verify-ffmpeg.py
if ($LASTEXITCODE -ne '0') { if ($LASTEXITCODE -ne '0') {
throw "Verify ffmpeg failed with exit code $LASTEXITCODE" throw "Verify ffmpeg failed with exit code $LASTEXITCODE"
} else { } else {
@ -61,5 +58,16 @@ test_script:
} }
} }
artifacts: artifacts:
- path: out - path: test-results.xml
name: out name: test-results.xml
deploy_script:
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\RUN_RELEASE_BUILD) {
Write-Output "Uploading Electron release distribution to s3"
& python script\upload.py --upload_to_s3
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python script\upload.py
}
}

@ -1 +1 @@
Subproject commit ff1c994b0e4f5ddf664478aea0c836ba84479ea8 Subproject commit 83a05b94ef363d574030ec2f018ec758e8314c19

View file

@ -54,6 +54,7 @@ steps:
script/test.py --ci --rebuild_native_modules script/test.py --ci --rebuild_native_modules
fi fi
name: Test name: Test
condition: or(ne(variables['ELECTRON_RELEASE'], '1'), eq(variables['UPLOAD_TO_S3'], '1'))
- bash: | - bash: |
echo 'Verifying ffmpeg on build' echo 'Verifying ffmpeg on build'
@ -63,6 +64,7 @@ steps:
script/verify-ffmpeg.py script/verify-ffmpeg.py
fi fi
name: Verify_FFmpeg name: Verify_FFmpeg
condition: or(ne(variables['ELECTRON_RELEASE'], '1'), eq(variables['UPLOAD_TO_S3'], '1'))
- task: PublishTestResults@2 - task: PublishTestResults@2
displayName: Publish Test Results displayName: Publish Test Results
@ -70,26 +72,26 @@ steps:
testResultsFiles: '**/test-*.xml' testResultsFiles: '**/test-*.xml'
condition: and(always(), eq(variables['MOCHA_FILE'], 'test-results.xml')) condition: and(always(), eq(variables['MOCHA_FILE'], 'test-results.xml'))
- task: kasunkodagoda.slack-notification.slack-notification-task.SlackNotification@3 - bash: |
displayName: Post Slack Notification on Failure export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
inputs: export MESSAGE="Build failed for *<$BUILD_URL|$BUILD_DEFINITIONNAME>* nightly build."
SlackApiToken: '$(slack_token)' curl -g -H "Content-Type: application/json" -X POST \
Channel: '#bot-nightly-releases' -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
Message: 'Build failed for *<$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)|$(Build.DefinitionName)>* nightly build.' name: Post_Slack_Notification_on_Failure
Title: '$(Build.DefinitionName) nightly build results' condition: failed()
TitleLink: '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)'
Color: '#FC5C3C'
condition: and(failed(), eq(variables['Build.Reason'], 'Schedule'))
- task: kasunkodagoda.slack-notification.slack-notification-task.SlackNotification@3 - bash: |
displayName: Post Slack Notification on Success export BUILD_URL="${SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${SYSTEM_TEAMPROJECT}/_build/results?buildId=${BUILD_BUILDID}"
export MESSAGE="Build succeeded for *<$BUILD_URL|$BUILD_DEFINITIONNAME>* nightly build."
curl -g -H "Content-Type: application/json" -X POST \
-d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$BUILD_DEFINITIONNAME nightly build results\",\"title_link\": \"$BUILD_URL\"}]}" $(slack_webhook)
name: Post_Slack_Notification_on_Success
condition: succeeded()
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs: inputs:
SlackApiToken: '$(slack_token)' PathtoPublish: '$(Build.SourcesDirectory)/out'
Channel: '#bot-nightly-releases' ArtifactName: out
Message: 'Build succeeded for *<$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)|$(Build.DefinitionName)>* nightly build.'
Title: '$(Build.DefinitionName) nightly build results'
TitleLink: '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)'
Color: 'good'
condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule'))
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 - task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3