Fixed reporting of configured / detected OSD device.
[betaflight.git] / azure-pipelines.yml
blobe70b5ae4d9999415f6b7272dffb199f59725772d
1 # Builds the Betaflight firmware
3 # After building, artifacts are released to a seperate repository.
5 # Azure Pipelines requires the following extensions to be installed:
6 # - GitHub Tool: https://marketplace.visualstudio.com/items?itemName=marcelo-formentao.github-tools
8 # You'll also need to setup the follwing pipeline variables: 
9 #     "releaseNotes" - This is used to add the release notes in the windows job in the build stage so they can be published as part of the github release in the release stage
10 #     "endpoint" - The name of the github endpoint link setup in AzDo - setup when linking AzDo and GitHub
11 #     "owner" - The owner of the repository to release to e.g. betaflight
12 #     "repoName" - The name of the repository to release to e.g. betaflight-configurator-nightly
15 variables:
16   owner: betaflight
17   repoName: betaflight-pull-requests
18   releaseNotes: This is a build of a community provided pull request. It may be unstable and result in corrupted configurations or data loss. **Use only for testing.**
20 name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID)
22 trigger: none
24 stages:
25 - stage: Build
26   jobs:
27   - job: 'Linux'
28     pool:
29       vmImage: 'ubuntu-16.04'
30     steps:
31     - script: make arm_sdk_install
32       displayName: 'Install the build toolchain'
33     - script: make unified
34       displayName: 'Build the Unified Targets'
35     - script: mkdir release; cp obj/*.hex release/
36       displayName: 'Copy artefacts'
37     - task: PublishPipelineArtifact@1
38       displayName: 'Publish Linux release'
39       inputs: 
40         artifactName: betaflight
41         targetPath: '$(System.DefaultWorkingDirectory)/release/'
43 - stage: Release
44   jobs:
45   - job: Release
47     steps:
48     - task: DownloadPipelineArtifact@2
49       inputs:
50         buildType: 'current'
51         targetPath: '$(Pipeline.Workspace)'
52     - powershell: Write-Output ("##vso[task.setvariable variable=today;]$(Get-Date -Format yyyyMMdd)")
53     - task: GitHubReleasePublish@1
54       inputs:
55         githubEndpoint: '$(endpoint)'
56         manuallySetRepository: true
57         githubOwner: '$(owner)'
58         githubRepositoryName: '$(repoName)'
59         githubTag: $(today).$(Build.Repository.Name).$(Build.SourceBranchName)
60         githubReleaseTitle: '$(Build.Repository.Name): $(Build.SourceBranchName) ($(today))'
61         githubReleaseNotes: |+
62           $(releaseNotes)
64           ### Repository:
65           $(Build.Repository.Name) ([link]($(Build.Repository.Uri)))
67           ### Pull request branch:
68           $(Build.SourceBranchName) ([link]($(Build.Repository.Uri)/tree/$(Build.SourceBranchName)))
70           ### Author:
71           $(Build.RequestedFor)
73           ### Latest changeset:
74           $(Build.SourceVersion) ([link]($(Build.Repository.Uri)/commit/$(Build.SourceVersion)))
76           ### Changes:
77           $(Build.SourceVersionMessage)
79           ### Debug:
80           Build.SourceBranchName
81           $(Build.SourceBranchName)
82           Build.Repository.Name
83           $(Build.Repository.Name)
84           Build.Repository.ID
85           $(Build.Repository.ID)
86           Build.Repository.Uri
87           $(Build.Repository.Uri)
88           Build.RequestedFor
89           $(Build.RequestedFor)
90           Build.QueuedBy
91           $(Build.QueuedBy)
92         githubReleaseDraft: false
93         githubReleasePrerelease: false
94         githubIgnoreAssets: false
95         githubReleaseAsset: |
96           $(Pipeline.Workspace)/betaflight/**
97         githubReuseRelease: true
98         githubReuseDraftOnly: false
99         githubSkipDuplicatedAssets: false
100         githubEditRelease: true
101         githubDeleteEmptyTag: false