[ci]: Support azp for cisco 8000 (#8654)
Why I did it Setup Azure pipeline for cisco 8000.
This commit is contained in:
parent
a76dcdf130
commit
6e08bf2584
@ -26,7 +26,7 @@ jobs:
|
||||
jobVariables: ${{ parameters.jobVariables }}
|
||||
preSteps:
|
||||
- template: cleanup.yml
|
||||
- ${{ parameters. preSteps }}
|
||||
- ${{ parameters.preSteps }}
|
||||
- script: |
|
||||
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then
|
||||
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
|
||||
@ -36,6 +36,7 @@ jobs:
|
||||
displayName: "Set cache options"
|
||||
- checkout: self
|
||||
submodules: recursive
|
||||
condition: eq(variables.SKIP_CHECKOUT, '')
|
||||
displayName: 'Checkout code'
|
||||
- script: |
|
||||
BRANCH_NAME=$(Build.SourceBranchName)
|
||||
|
64
.azure-pipelines/official-build-cisco-8000.yml
Normal file
64
.azure-pipelines/official-build-cisco-8000.yml
Normal file
@ -0,0 +1,64 @@
|
||||
# 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:
|
||||
- master
|
||||
- 202012
|
||||
always: true
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: cisco-8000
|
||||
type: github
|
||||
name: Cisco-8000-sonic/platform-cisco-8000
|
||||
endpoint: cisco-connection
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
pool: sonic
|
||||
variables:
|
||||
CACHE_MODE: wcache
|
||||
SKIP_CHECKOUT: true
|
||||
TERM: ''
|
||||
|
||||
jobs:
|
||||
- template: azure-pipelines-build.yml
|
||||
parameters:
|
||||
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
|
||||
preSteps:
|
||||
- checkout: self
|
||||
submodules: recursive
|
||||
path: s
|
||||
displayName: 'Checkout code'
|
||||
- checkout: cisco-8000
|
||||
submodules: recursive
|
||||
path: s/platform/cisco-8000
|
||||
displayName: 'Checkout cisco-8000'
|
||||
- script: |
|
||||
cisco_ref=(cat platform/checkout/cisco-8000.ini | grep '^ref=' | cut -d= -f2)
|
||||
echo "The cisco 8000 release version is $cisco_ref"
|
||||
echo "##vso[task.setvariable variable=cisco.ref]$cisco_ref"
|
||||
displayName: 'Export cisco release version'
|
||||
- task: DownloadGitHubRelease@0
|
||||
inputs:
|
||||
connection: cisco-connection
|
||||
userRepository: Cisco-8000-sonic/platform-cisco-8000
|
||||
defaultVersionType: specificTag
|
||||
version: $(cisco.ref)
|
||||
itemPattern: 'artifactory-*.tar.gz'
|
||||
downloadPath: '$(System.ArtifactsDirectory)'
|
||||
- script: |
|
||||
make PLATFORM=cisco-8000 platform/cisco-8000
|
||||
tar xfz $(System.ArtifactsDirectory)/artifactory-*.tar.gz -C platform/cisco-8000
|
||||
displayName: 'Setup cisco artifacts'
|
||||
jobGroups:
|
||||
- name: cisco-8000
|
Loading…
Reference in New Issue
Block a user