-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new Jenkins job to build multiasic vs image from 201911 branch. (#…
…184) Adding a new Jenkins Job to build multi-asic VS image to bring up multi-asic VS for hwsku: msft_multi_asic_vs with 6 asics. This job will create a sonic-vs.img.gz with asic.conf updated with NUM_ASIC=6.
- Loading branch information
1 parent
333f170
commit a22ee3c
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
jenkins/vs/buildimage-multiasic-vs-image-201911/Jenkinsfile
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,69 @@ | ||
pipeline { | ||
agent { node { label 'jenkins-kvm-workers' } } | ||
|
||
options { | ||
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30')) | ||
} | ||
|
||
environment { | ||
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder') | ||
} | ||
|
||
triggers { | ||
pollSCM('@midnight') | ||
} | ||
|
||
stages { | ||
stage('Prepare') { | ||
steps { | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/201911']], | ||
extensions: [[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: false, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false], | ||
[$class: 'LocalBranch', | ||
localBranch: "**"]], | ||
userRemoteConfigs: [[url: 'http://github.com/Azure/sonic-buildimage']]]) | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
sh '''#!/bin/bash -xe | ||
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git' | ||
make configure PLATFORM=vs | ||
sudo bash -c "echo "NUM_ASIC=6" > ./device/virtual/x86_64-kvm_x86_64-r0/asic.conf" | ||
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory" | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-vs.img.gz | ||
mv target/sonic-vs.img.gz target/sonic-multiasic-vs.img.gz | ||
''' | ||
} | ||
} | ||
|
||
} | ||
post { | ||
|
||
success { | ||
archiveArtifacts(artifacts: 'target/**') | ||
} | ||
fixed { | ||
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
regression { | ||
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
cleanup { | ||
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true) | ||
} | ||
} | ||
} |