Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ stages:
- 'test-build\Source\codegenTest\codegen1.vi'
- 'test-build\Source\codegenTest\codegen2.vi'

# Test Pre Build Script Steps
preBuildScript:
script: |
Write-Host "Running custom PowerShell logic..."
Get-ChildItem -Path "$(Build.SourcesDirectory)"
displayName: "Testing Custom Pre Build Step"

# Test Individual Build Specs using standard build operations in LabVIEW, and exclusion rules
buildSteps:
- projectLocation: 'test-build\Source\Individual Build Specs.lvproj'
Expand Down
15 changes: 15 additions & 0 deletions azure-templates/stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ parameters:
- name: archiveLocation
type: string

# preBuildScript (optional): inline script to run before build
- name: preBuildScript
type: object
default:
script: ''
displayName: 'Run Custom Script Before Build'

# Note: If custom build steps are needed for a particular custom device, copy this entire template into the azure-pipeline and add steps before/after as needed
stages:
- stage: ${{ parameters.stageName }}_DiffVIs
Expand Down Expand Up @@ -122,6 +129,14 @@ stages:
codegenVis: ${{ parameters.codegenVis }}
submodules: ${{ parameters.submodules }}

- ${{ if ne(parameters.preBuildScript.script, '') }}:
- task: PowerShell@2
displayName: ${{ parameters.preBuildScript.displayName }}
inputs:
targetType: 'inline'
script: ${{ parameters.preBuildScript.script }}
failOnStdErr: True

- ${{ if ne( parameters.buildSteps, '' )}}:
- ${{ each buildStep in parameters.buildSteps }}:
- template: steps-build.yml
Expand Down
Loading