Skip to content

Commit

Permalink
Add pipeline yml for nvidia-bluefield (sonic-net#90)
Browse files Browse the repository at this point in the history
Why I did it
Setup a build pipeline to build the image on the daily basis, and PR will also trigger build pipeline.

How I did it
Add new pipeline.yml for nvidia-sonic repo.
Build pipeline only supports sonic-nvidia-bluefield.bin for now, and I will add support for sonic-nvidia-bluefield.tar.gz and sonic-nvidia-bluefield.bfb.

How to verify it
I have verified with my private repo. And when this PR is merged, I will create azure pipeline to make it work.
  • Loading branch information
ganglyu authored Sep 23, 2022
1 parent 493ec89 commit e25e92f
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
variables:
PLATFORM_ARCH: arm64

- name: nvidia-bluefield
${{ if not(parameters.qemuOrCrossBuild) }}:
pool: sonicbld-arm64
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: arm64

- name: generic
variables:
dbg_image: yes
Expand Down
7 changes: 1 addition & 6 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
variables:
${{ if eq(variables['Build.Reason'],'PullRequest') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([[ "$(System.PullRequest.TargetBranch)" =~ ^20[2-9][0-9]{3}$ ]] && echo deb,py2,py3,web,git,docker)'
${{ elseif ne(variables['Build.SourceBranchName'],'master') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
${{ else }}:
VERSION_CONTROL_OPTIONS: ''
VERSION_CONTROL_OPTIONS: ''
2 changes: 2 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
values:
- broadcom
- centec-arm64
- nvidia-bluefield
- marvell-armhf
- mellanox
- vs
Expand All @@ -21,6 +22,7 @@ parameters:
values:
- brcm
- centec-arm64
- nvidia-bluefield
- marvell-armhf
- mlnx
- vs
Expand Down
63 changes: 63 additions & 0 deletions azure-pipelines-bluefield.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

schedules:
- cron: "0 8 * * *"
displayName: Daily midnight build
branches:
include:
- bluefield
always: true

trigger: none

pr:
branches:
include:
- bluefield
paths:
exclude:
- .github

name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)

resources:
repositories:
- repository: buildimage
type: github
name: nvidia-sonic/sonic-buildimage
endpoint: nvidia-sonic
ref: bluefield

variables:
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
- template: .azure-pipelines/template-variables.yml@buildimage
- name: CACHE_MODE
value: rcache
- name: ENABLE_FIPS
value: y

stages:
- stage: Build
dependsOn: []
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
preSteps:
- task: InstallSSHKey@0
displayName: 'Install an SSH key'
inputs:
knownHostsEntry: '$(myHostsEntry)'
sshPublicKey: '$(myPubKey)'
sshKeySecureFile: 'id_rsa'
jobGroups:
- name: nvidia-bluefield
pool: sonicbld-arm64
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: arm64


0 comments on commit e25e92f

Please sign in to comment.