-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci]: Add yaml for azure pipeline official build #6588
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
5298dff
add azure pipeline for nightly build
liushilongbuaa 2c43a47
try cron
liushilongbuaa b810f8e
update azure-pipelines.yml
liushilongbuaa de2310f
fix script
liushilongbuaa 60144f2
change totally
liushilongbuaa 32fb3aa
change totally
liushilongbuaa 5faa2ad
Update official.yml for Azure Pipelines
liushilongbuaa 1cce65d
Update official.yml for Azure Pipelines
liushilongbuaa 607a100
Update official.yml for Azure Pipelines
liushilongbuaa a40428f
update
liushilongbuaa b9d1f9f
update
liushilongbuaa d76d876
update
liushilongbuaa 486c8da
update
liushilongbuaa 48d2733
update
liushilongbuaa 5f33ba9
change directory
liushilongbuaa c564ca5
update
liushilongbuaa a47df6e
update
liushilongbuaa 2a21fc1
update
liushilongbuaa 8ffa54f
add post cleanup
liushilongbuaa e615a71
add post cleanup
liushilongbuaa 4e7541d
add post cleanup
liushilongbuaa 1c8dd8a
add post cleanup
liushilongbuaa 0423ebf
update
liushilongbuaa 6a47703
update
liushilongbuaa 243cc3f
Update cleanup.yml
liushilongbuaa 1d7790d
update
liushilongbuaa cb26972
Update official.yml for Azure Pipelines
liushilongbuaa d9fa028
update
liushilongbuaa eea9b3a
update
liushilongbuaa 965d50a
update
liushilongbuaa 307c888
update
liushilongbuaa 8fdb258
update
liushilongbuaa 8e11f3f
update
liushilongbuaa 93dfbca
update
liushilongbuaa 162958e
update
liushilongbuaa e799a2c
update
liushilongbuaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
parameters: | ||
- name: platform | ||
type: string | ||
values: | ||
- broadcom | ||
- mellanox | ||
|
||
- name: platform_short | ||
type: string | ||
values: | ||
- brcm | ||
- mlnx | ||
|
||
- name: cache_mode | ||
type: string | ||
values: | ||
- wcache | ||
- rcache | ||
- cache | ||
|
||
- name: dbg_image | ||
type: boolean | ||
|
||
- name: swi_image | ||
type: boolean | ||
|
||
- name: raw_image | ||
type: boolean | ||
|
||
- name: sync_rpc_image | ||
type: boolean | ||
|
||
jobs: | ||
- job: | ||
displayName: ${{ parameters.platform }} | ||
timeoutInMinutes: 600 | ||
steps: | ||
- checkout: self | ||
submodules: recursive | ||
displayName: 'Checkout code' | ||
- template: cleanup.yml | ||
- script: | | ||
set -e | ||
sudo modprobe overlay | ||
liushilongbuaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=${{ parameters.cache_mode }} SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/${{ parameters.platform }}" | ||
ENABLE_DOCKER_BASE_PULL=y make configure PLATFORM=${{ parameters.platform }} | ||
trap "sudo rm -rf fsroot" EXIT | ||
if [ ${{ parameters.dbg_image }} ];then | ||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) INSTALL_DEBUG_TOOLS=y target/sonic-${{ parameters.platform }}.bin && \ | ||
mv target/sonic-${{ parameters.platform }}.bin target/sonic-${{ parameters.platform }}-dbg.bin | ||
fi | ||
if [ ${{ parameters.swi_image }} ];then | ||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y target/sonic-aboot-${{ parameters.platform }}.swi | ||
fi | ||
if [ ${{ parameters.raw_image }} ];then | ||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.raw | ||
fi | ||
if [ ${{ parameters.sync_rpc_image }} ];then | ||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y target/docker-syncd-${{ parameters.platform_short }}-rpc.gz | ||
fi | ||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.bin | ||
displayName: 'Build sonic image' | ||
- publish: $(System.DefaultWorkingDirectory)/ | ||
artifact: sonic-buildimage.${{ parameters.platform }} | ||
displayName: "Archive sonic image" | ||
- template: cleanup.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
steps: | ||
- script: | | ||
sudo kill -9 `sudo cat /var/run/march/docker.pid` || true | ||
sudo rm -f /var/run/march/docker.pid || true | ||
sudo rm -rf fsroot || true | ||
git clean -xfdf || true | ||
git reset --hard || true | ||
git submodule foreach --recursive 'git clean -xfdf || true' || true | ||
git submodule foreach --recursive 'git reset --hard || true' || true | ||
git submodule foreach --recursive 'git remote update || true' || true | ||
git submodule update --init --recursive || true | ||
displayName: "Clean Workspace" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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 | ||
always: true | ||
|
||
stages: | ||
- stage: Build | ||
pool: sonicbld | ||
|
||
jobs: | ||
- template: build-template.yml | ||
parameters: | ||
platform: broadcom | ||
platform_short: brcm | ||
cache_mode: wcache | ||
dbg_image: true | ||
swi_image: true | ||
raw_image: true | ||
sync_rpc_image: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about to move the script from the template to the official.yml, only keep the most common part in the template, like init, checkout, publish, cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each plat form write their own script. this will make yml file more different with each other, like current Jenkinsfiles.