2021-04-07 18:05:31 -05:00
|
|
|
# The azure pipeline template for Official build, and upgrade version build
|
|
|
|
|
2021-02-24 23:44:58 -06:00
|
|
|
parameters:
|
|
|
|
- name: 'jobFilters'
|
|
|
|
type: object
|
|
|
|
default: ''
|
|
|
|
- name: 'buildOptions'
|
|
|
|
type: string
|
|
|
|
default: 'SONIC_CONFIG_BUILD_JOBS=1'
|
2021-04-07 18:05:31 -05:00
|
|
|
- name: 'preSteps'
|
|
|
|
type: stepList
|
|
|
|
default: []
|
2021-02-24 23:44:58 -06:00
|
|
|
- name: 'postSteps'
|
|
|
|
type: stepList
|
|
|
|
default: []
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: 'jobGroups'
|
|
|
|
type: object
|
2021-04-22 23:56:09 -05:00
|
|
|
default: ''
|
2021-02-24 23:44:58 -06:00
|
|
|
|
|
|
|
jobs:
|
2021-04-07 18:05:31 -05:00
|
|
|
- template: azure-pipelines-image-template.yml
|
2021-02-24 23:44:58 -06:00
|
|
|
parameters:
|
|
|
|
jobFilters: ${{ parameters.jobFilters }}
|
2021-04-07 18:05:31 -05:00
|
|
|
preSteps: ${{ parameters.preSteps }}
|
|
|
|
postSteps: ${{ parameters.postSteps }}
|
|
|
|
jobVariables:
|
2021-04-08 18:36:53 -05:00
|
|
|
PLATFORM_AZP: $(GROUP_NAME)
|
2021-04-07 18:05:31 -05:00
|
|
|
PLATFORM_ARCH: amd64
|
2021-04-23 04:58:46 -05:00
|
|
|
BUILD_NUMBER: $(Build.BuildId)
|
2021-04-07 18:05:31 -05:00
|
|
|
BUILD_OPTIONS: ${{ parameters.buildOptions }}
|
2021-04-15 01:32:08 -05:00
|
|
|
DOCKER_DATA_ROOT_FOR_MULTIARCH: /data/march/docker
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
dbg_image: no
|
|
|
|
swi_image: no
|
|
|
|
raw_image: no
|
2021-06-21 01:12:25 -05:00
|
|
|
docker_syncd_rpc_image: no
|
|
|
|
syncd_rpc_image: no
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
platform_rpc: no
|
|
|
|
${{ if ne(parameters.jobGroups, '') }}:
|
|
|
|
jobGroups: ${{ parameters.jobGroups }}
|
|
|
|
${{ if eq(parameters.jobGroups, '') }}:
|
|
|
|
jobGroups:
|
|
|
|
- name: vs
|
|
|
|
variables:
|
|
|
|
dbg_image: yes
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: barefoot
|
|
|
|
variables:
|
2021-06-21 01:12:25 -05:00
|
|
|
docker_syncd_rpc_image: yes
|
2021-06-08 11:43:00 -05:00
|
|
|
platform_rpc: bfn
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
swi_image: yes
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: broadcom
|
|
|
|
variables:
|
|
|
|
dbg_image: yes
|
|
|
|
swi_image: yes
|
|
|
|
raw_image: yes
|
2021-06-21 01:12:25 -05:00
|
|
|
docker_syncd_rpc_image: yes
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
platform_rpc: brcm
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: centec
|
|
|
|
variables:
|
|
|
|
dbg_image: yes
|
2021-06-21 01:12:25 -05:00
|
|
|
docker_syncd_rpc_image: yes
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
platform_rpc: centec
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: centec-arm64
|
|
|
|
pool: sonicbld_8c
|
2021-05-02 11:55:15 -05:00
|
|
|
timeoutInMinutes: 2160
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
variables:
|
|
|
|
PLATFORM_ARCH: arm64
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: generic
|
|
|
|
variables:
|
|
|
|
dbg_image: yes
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: innovium
|
|
|
|
variables:
|
2021-06-15 18:38:02 -05:00
|
|
|
dbg_image: yes
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: marvell-armhf
|
|
|
|
pool: sonicbld_8c
|
2021-05-02 11:55:15 -05:00
|
|
|
timeoutInMinutes: 2160
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
variables:
|
|
|
|
PLATFORM_ARCH: armhf
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: mellanox
|
|
|
|
variables:
|
|
|
|
dbg_image: yes
|
2021-06-21 01:12:25 -05:00
|
|
|
docker_syncd_rpc_image: yes
|
|
|
|
syncd_rpc_image: yes
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
platform_rpc: mlnx
|
2021-05-03 14:31:52 -05:00
|
|
|
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
- name: nephos
|
|
|
|
variables:
|
|
|
|
dbg_image: yes
|
2021-06-21 01:12:25 -05:00
|
|
|
docker_syncd_rpc_image: yes
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
platform_rpc: nephos
|
2021-05-03 14:31:52 -05:00
|
|
|
|
2021-04-07 18:05:31 -05:00
|
|
|
buildSteps:
|
|
|
|
- bash: |
|
2021-05-03 14:31:52 -05:00
|
|
|
set -ex
|
2021-04-07 18:05:31 -05:00
|
|
|
if [ $(GROUP_NAME) == vs ]; then
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
if [ $(dbg_image) == yes ]; then
|
2021-04-07 18:05:31 -05:00
|
|
|
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz && mv target/sonic-vs.img.gz target/sonic-vs-dbg.img.gz
|
|
|
|
fi
|
|
|
|
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
|
|
|
|
else
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
if [ $(dbg_image) == yes ]; then
|
2021-04-07 18:05:31 -05:00
|
|
|
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-$(GROUP_NAME).bin && \
|
|
|
|
mv target/sonic-$(GROUP_NAME).bin target/sonic-$(GROUP_NAME)-dbg.bin
|
|
|
|
fi
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
if [ $(swi_image) == yes ]; then
|
2021-04-07 18:05:31 -05:00
|
|
|
make $BUILD_OPTIONS ENABLE_IMAGE_SIGNATURE=y target/sonic-aboot-$(GROUP_NAME).swi
|
|
|
|
fi
|
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines
When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.
Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-22 20:26:16 -05:00
|
|
|
if [ $(raw_image) == yes ]; then
|
2021-04-07 18:05:31 -05:00
|
|
|
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw
|
|
|
|
fi
|
2021-06-21 01:12:25 -05:00
|
|
|
if [ $(docker_syncd_rpc_image) == yes ]; then
|
2021-04-07 18:05:31 -05:00
|
|
|
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz
|
|
|
|
fi
|
2021-06-21 01:12:25 -05:00
|
|
|
if [ $(syncd_rpc_image) == yes ]; then
|
|
|
|
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/sonic-$(GROUP_NAME).bin
|
|
|
|
mv target/sonic-mellanox.bin target/sonic-$(GROUP_NAME)-rpc.bin
|
|
|
|
fi
|
2021-04-07 18:05:31 -05:00
|
|
|
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
|
|
|
|
fi
|
2021-04-11 18:43:06 -05:00
|
|
|
displayName: "Build sonic image"
|