Skip to content

Commit de48b5f

Browse files
Update Azure templates (#600)
* (CI) small update of azure single pkg template * (CI) conditional displayname in multi pkg azure template * Bump version to 1.0.5
1 parent 5cc2e66 commit de48b5f

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.4
1+
1.0.5

ci/azure-pipelines.example.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ trigger:
22
batch: true
33

44
schedules:
5-
- cron: "MM HH * * *" # Update cron string
6-
displayName: "Nightly"
5+
- cron: 'MM HH * * *' # Update cron string
6+
displayName: 'Nightly'
77
branches:
88
include:
99
- master # Update to default branch

ci/azure-pipelines.multiple_pkgs.example.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ trigger:
22
batch: true
33

44
schedules:
5-
- cron: "MM HH * * *" # Update cron string
6-
displayName: "Nightly"
5+
- cron: 'MM HH * * *' # Update cron string
6+
displayName: 'Nightly'
77
branches:
88
include:
99
- master # Update to default branch
@@ -13,26 +13,37 @@ variables:
1313

1414
jobs:
1515
- job: package_selection
16-
displayName: 'Package selection'
16+
${{ if eq(variables['Build.Reason'], 'PullRequest')}}:
17+
displayName: 'Package selection (PR)'
18+
${{ else }}:
19+
displayName: 'Package selection'
1720
pool:
1821
vmImage: 'ubuntu latest'
1922
condition: and(succeeded(), not(canceled()))
2023
steps:
2124
- task: Bash@3
22-
displayName: 'Determine packages to be build'
23-
name: matrix
25+
displayName: 'Get CI scripts'
2426
inputs:
2527
targetType: 'inline'
2628
script: |
2729
wget https://raw.githubusercontent.com/tue-robotics/tue-env/master/ci/packages.sh
2830
wget https://raw.githubusercontent.com/tue-robotics/tue-env/master/ci/azure_commit_range.py
31+
- task: Bash@3
32+
displayName: 'Determine packages to be build'
33+
name: matrix
34+
inputs:
35+
targetType: 'inline'
36+
script: |
2937
export COMMIT_RANGE=$(python3 ./azure_commit_range.py)
3038
ALL=$([ $BUILD_REASON == "Schedule" ] && echo "true")
3139
source ./packages.sh --pullrequest=${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-false} --branch=$SYSTEM_PULLREQUEST_TARGETBRANCH --commit-range=$COMMIT_RANGE --all=$ALL # add all folders which need to be excluded as an argument
3240
echo "##vso[task.setVariable variable=json_string;isOutput=true]$PACKAGES_DICT"
3341
3442
- job: install_build_test
35-
displayName: 'Install, build & test:'
43+
${{ if eq(variables['Build.Reason'], 'PullRequest')}}:
44+
displayName: 'Install, build & test (PR):'
45+
${{ else }}:
46+
displayName: 'Install, build & test:'
3647
pool:
3748
vmImage: 'ubuntu latest'
3849
dependsOn: package_selection
@@ -51,31 +62,31 @@ jobs:
5162
displayName: 'Get CI scripts'
5263
condition: and(succeeded(), not(canceled()))
5364
- task: Bash@3
65+
displayName: 'Set Branch'
5466
inputs:
5567
targetType: 'inline'
5668
script: |
5769
source ./set-branch.sh --branch=${SYSTEM_PULLREQUEST_TARGETBRANCH:-${BUILD_SOURCEBRANCH#refs/heads/}}
5870
echo "##vso[task.setvariable variable=BRANCH]$BRANCH"
59-
displayName: 'Set Branch'
6071
condition: and(succeeded(), not(canceled()))
6172
- task: Bash@3
73+
displayName: 'Install'
6274
inputs:
6375
targetType: 'inline'
6476
script: |
6577
bash install-package.sh --package=$PACKAGE --branch=$BRANCH --commit=$BUILD_SOURCEVERSION --pullrequest=${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-false} --image="tuerobotics/tue-env"
66-
displayName: 'Install'
6778
condition: and(succeeded(), not(canceled()))
6879
- task: Bash@3
80+
displayName: 'Build'
6981
inputs:
7082
targetType: 'inline'
7183
script: |
7284
bash build-package.sh --package=$PACKAGE
73-
displayName: 'Build'
7485
condition: and(succeeded(), not(canceled()))
7586
- task: Bash@3
87+
displayName: 'Test'
7688
inputs:
7789
targetType: 'inline'
7890
script: |
7991
bash test-package.sh --package=$PACKAGE
80-
displayName: 'Test'
8192
condition: and(succeeded(), not(canceled()))

0 commit comments

Comments
 (0)