Adding artifacts generation for forks (#6324)

This commit is contained in:
Sébastien Ros 2019-01-28 18:02:57 -08:00 committed by GitHub
parent 1222d8de49
commit 768e9052dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,16 @@
# This configuration builds the repository and runs benchmarks
# Don't run CI for this config
trigger: none
jobs:
- template: jobs/default-build.yml
parameters:
jobName: Windows_Build
jobDisplayName: "Build only : Windows"
agentOs: Windows
buildArgs: -all -pack
artifacts:
path: artifacts/
publish: true
force: true

View File

@ -21,6 +21,8 @@
# Should artifacts be published
# path: string
# The file path to artifacts output
# force: boolean
# Should artifacts from forks be published
# name: string
# The name of the artifact container
# variables: { string: string }
@ -56,6 +58,7 @@ parameters:
artifacts:
publish: true
path: 'artifacts/'
force: false
buildDirectory: ''
buildScript: ''
@ -144,7 +147,7 @@ jobs:
- ${{ if eq(parameters.artifacts.publish, 'true') }}:
- task: PublishBuildArtifacts@1
displayName: Upload artifacts
condition: eq(variables['system.pullrequest.isfork'], false)
condition: or(eq(variables['system.pullrequest.isfork'], false), eq('${{ parameters.artifacts.force }}', 'true'))
continueOnError: true
inputs:
${{ if eq(parameters.buildDirectory, '') }}: