|
| 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