Skip to content

Commit

Permalink
[202012] Add pipelines for all 202012 image builds (sonic-net#209)
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Allen <daall@microsoft.com>
  • Loading branch information
daall authored Jan 7, 2021
1 parent 443d343 commit ba5bb5d
Show file tree
Hide file tree
Showing 13 changed files with 842 additions and 0 deletions.
65 changes: 65 additions & 0 deletions jenkins/barefoot/buildimage-bf-202012/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
pipeline {
agent { node { label 'jenkins-workers-slow' } }

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/202012']],
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=barefoot
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-barefoot.bin
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-barefoot.swi
'''
}
}

}
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)
}
}
}
59 changes: 59 additions & 0 deletions jenkins/broadcom/buildimage-brcm-202012/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
pipeline {
agent { node { label 'jenkins-workers-slow' } }

options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20'))
}

triggers {
pollSCM('H */12 * * *')
}

stages {
stage('Prepare') {
steps {
milestone(ordinal: 1, label: "BUILD_START_MILESTONE")
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
checkout([$class: 'GitSCM',
branches: [[name: 'refs/heads/202012']],
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
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
make configure PLATFORM=broadcom
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.bin
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-broadcom.swi
'''
}
}
}

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>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
cleanup {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
67 changes: 67 additions & 0 deletions jenkins/centec-arm64/buildimage-centec-arm64-202012/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
pipeline {
agent { node { label 'jenkins-workers-slow' } }

options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30'))
}

environment {
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder')
}

triggers {
pollSCM('@midnight')
}

stages {
stage('Prepare') {
steps {
step([$class: 'WsCleanup'])
checkout([$class: 'GitSCM',
branches: [[name: 'refs/heads/202012']],
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'
export DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker
make configure PLATFORM=centec-arm64 PLATFORM_ARCH=arm64
make SONIC_BUILD_JOBS=4 INSTALL_DEBUG_TOOLS=y target/sonic-centec-arm64.bin
mv target/sonic-centec-arm64.bin target/sonic-centec-dbg.bin
make SONIC_BUILD_JOBS=4 NOJESSIE=1 target/sonic-centec-arm64.bin
sudo docker -H unix:///var/run/march/docker.sock system prune -f
'''
}
}

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

67 changes: 67 additions & 0 deletions jenkins/centec/buildimage-centec-202012/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
pipeline {
agent { node { label 'jenkins-workers-slow' } }

options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30'))
}

environment {
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder')
}

triggers {
pollSCM('@midnight')
}

stages {
stage('Prepare') {
steps {
step([$class: 'WsCleanup'])
checkout([$class: 'GitSCM',
branches: [[name: 'refs/heads/202012']],
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=centec
make SONIC_CONFIG_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-centec.bin
mv target/sonic-centec.bin target/sonic-centec-dbg.bin
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-centec.bin
make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_SYNCD_RPC=y target/docker-syncd-centec-rpc.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)
}
}
}
59 changes: 59 additions & 0 deletions jenkins/innovium/buildimage-invm-202012-rpc/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
pipeline {
agent { node { label 'jenkins-workers-slow' } }

options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30'))

}

triggers {
pollSCM('@midnight')
}

stages {
stage('Prepare') {
steps {
step([$class: 'WsCleanup'])
checkout([$class: 'GitSCM',
branches: [[name: 'refs/heads/202012']],
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=innovium
make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_SYNCD_RPC=y target/sonic-innovium.bin
'''
}
}

}
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>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
cleanup {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
64 changes: 64 additions & 0 deletions jenkins/innovium/buildimage-invm-202012/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
pipeline {
agent { node { label 'jenkins-workers-slow' } }

options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30'))
}

environment {
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder')
}

triggers {
pollSCM('@midnight')
}

stages {
stage('Prepare') {
steps {
step([$class: 'WsCleanup'])
checkout([$class: 'GitSCM',
branches: [[name: 'refs/heads/202012']],
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=innovium
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-innovium.bin
'''
}
}

}
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)
}
}
}
Loading

0 comments on commit ba5bb5d

Please sign in to comment.