Skip to content

Commit

Permalink
Add new Jenkins job to build multiasic vs image from 201911 branch. (#…
Browse files Browse the repository at this point in the history
…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
SuvarnaMeenakshi authored Nov 6, 2020
1 parent 333f170 commit a22ee3c
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions jenkins/vs/buildimage-multiasic-vs-image-201911/Jenkinsfile
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)
}
}
}

0 comments on commit a22ee3c

Please sign in to comment.