Skip to content

Commit 3855ce2

Browse files
authored
[ci]: Support azp for cisco 8000 (#8654)
Why I did it Setup Azure pipeline for cisco 8000.
1 parent 77b6bc3 commit 3855ce2

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

.azure-pipelines/azure-pipelines-image-template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
jobVariables: ${{ parameters.jobVariables }}
2727
preSteps:
2828
- template: cleanup.yml
29-
- ${{ parameters. preSteps }}
29+
- ${{ parameters.preSteps }}
3030
- script: |
3131
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then
3232
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
@@ -36,6 +36,7 @@ jobs:
3636
displayName: "Set cache options"
3737
- checkout: self
3838
submodules: recursive
39+
condition: eq(variables.SKIP_CHECKOUT, '')
3940
displayName: 'Checkout code'
4041
- script: |
4142
BRANCH_NAME=$(Build.SourceBranchName)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Starter pipeline
2+
# Start with a minimal pipeline that you can customize to build and deploy your code.
3+
# Add steps that build, run tests, deploy, and more:
4+
# https://aka.ms/yaml
5+
6+
schedules:
7+
- cron: "0 8 * * *"
8+
displayName: Daily midnight build
9+
branches:
10+
include:
11+
- master
12+
- 202012
13+
always: true
14+
15+
trigger: none
16+
pr: none
17+
18+
resources:
19+
repositories:
20+
- repository: cisco-8000
21+
type: github
22+
name: Cisco-8000-sonic/platform-cisco-8000
23+
endpoint: cisco-connection
24+
25+
stages:
26+
- stage: Build
27+
pool: sonic
28+
variables:
29+
CACHE_MODE: wcache
30+
SKIP_CHECKOUT: true
31+
TERM: ''
32+
33+
jobs:
34+
- template: azure-pipelines-build.yml
35+
parameters:
36+
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
37+
preSteps:
38+
- checkout: self
39+
submodules: recursive
40+
path: s
41+
displayName: 'Checkout code'
42+
- checkout: cisco-8000
43+
submodules: recursive
44+
path: s/platform/cisco-8000
45+
displayName: 'Checkout cisco-8000'
46+
- script: |
47+
cisco_ref=(cat platform/checkout/cisco-8000.ini | grep '^ref=' | cut -d= -f2)
48+
echo "The cisco 8000 release version is $cisco_ref"
49+
echo "##vso[task.setvariable variable=cisco.ref]$cisco_ref"
50+
displayName: 'Export cisco release version'
51+
- task: DownloadGitHubRelease@0
52+
inputs:
53+
connection: cisco-connection
54+
userRepository: Cisco-8000-sonic/platform-cisco-8000
55+
defaultVersionType: specificTag
56+
version: $(cisco.ref)
57+
itemPattern: 'artifactory-*.tar.gz'
58+
downloadPath: '$(System.ArtifactsDirectory)'
59+
- script: |
60+
make PLATFORM=cisco-8000 platform/cisco-8000
61+
tar xfz $(System.ArtifactsDirectory)/artifactory-*.tar.gz -C platform/cisco-8000
62+
displayName: 'Setup cisco artifacts'
63+
jobGroups:
64+
- name: cisco-8000

0 commit comments

Comments
 (0)