Skip to content

Commit

Permalink
build_projects.yml: change variable for main branch
Browse files Browse the repository at this point in the history
Eliminate the trigger for master branch and also change the
conditional variable for publish artifacts step.

Signed-off-by: Andreea Andrisan <[email protected]>
  • Loading branch information
AAndrisa authored and rbolboac committed Jan 11, 2024
1 parent bef3df1 commit c0fbb3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
3 changes: 0 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
trigger:
- main
- master
- staging/*
- next_stable
- 20*

pr:
- main
- master
- next_stable
- 20*

variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
runCondition: true
targetBranch: $[ variables['System.PullRequest.TargetBranchName'] ]

Expand Down
18 changes: 8 additions & 10 deletions build_projects.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
trigger:
- main
- master
- next_stable
- 20*

pr:
- main
- master
- next_stable
- 20*

variables:
- group: noos_releases_group_variables
- name: isMaster
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
- name: isMain
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
- name: isNextStable
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/next_stable')]
- name: isRelease
Expand All @@ -40,7 +38,7 @@ jobs:
displayName: 'Run project build'
- task: PublishPipelineArtifact@1
timeoutInMinutes: 10
condition: or(eq(variables.isMaster, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
condition: or(eq(variables.isMain, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
inputs:
targetPath: '$(Build.Repository.LocalPath)/$(RELEASE_DIR)'
artifact: '$(ARTIFACT_NAME)_Xilinx'
Expand Down Expand Up @@ -72,7 +70,7 @@ jobs:
displayName: 'Run project build'
- task: PublishPipelineArtifact@1
timeoutInMinutes: 10
condition: or(eq(variables.isMaster, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
condition: or(eq(variables.isMain, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
inputs:
targetPath: '$(Build.Repository.LocalPath)/$(RELEASE_DIR)'
artifact: '$(ARTIFACT_NAME)_STM32'
Expand Down Expand Up @@ -104,7 +102,7 @@ jobs:
displayName: 'Run project build'
- task: PublishPipelineArtifact@1
timeoutInMinutes: 10
condition: or(eq(variables.isMaster, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
condition: or(eq(variables.isMain, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
inputs:
targetPath: '$(Build.Repository.LocalPath)/$(RELEASE_DIR)'
artifact: '$(ARTIFACT_NAME)_Maxim'
Expand Down Expand Up @@ -136,7 +134,7 @@ jobs:
displayName: 'Run project build'
- task: PublishPipelineArtifact@1
timeoutInMinutes: 10
condition: or(eq(variables.isMaster, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
condition: or(eq(variables.isMain, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
inputs:
targetPath: '$(Build.Repository.LocalPath)/$(RELEASE_DIR)'
artifact: '$(ARTIFACT_NAME)_Mbed'
Expand Down Expand Up @@ -168,7 +166,7 @@ jobs:
displayName: 'Run project build'
- task: PublishPipelineArtifact@1
timeoutInMinutes: 10
condition: or(eq(variables.isMaster, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
condition: or(eq(variables.isMain, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
inputs:
targetPath: '$(Build.Repository.LocalPath)/$(RELEASE_DIR)'
artifact: '$(ARTIFACT_NAME)_Pico'
Expand Down Expand Up @@ -200,7 +198,7 @@ jobs:
displayName: 'Run project build'
- task: PublishPipelineArtifact@1
timeoutInMinutes: 10
condition: or(eq(variables.isMaster, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
condition: or(eq(variables.isMain, true), eq(variables.isNextStable, true), eq(variables.isRelease, true))
inputs:
targetPath: '$(Build.Repository.LocalPath)/$(RELEASE_DIR)'
artifact: '$(ARTIFACT_NAME)_ADuCM3029'
Expand Down

0 comments on commit c0fbb3a

Please sign in to comment.