Skip to content

Commit

Permalink
[barefoot] 202006 pipeline (sonic-net#131)
Browse files Browse the repository at this point in the history
Signed-off-by: Volodymyr Boyko <[email protected]>
  • Loading branch information
vboykox authored Jul 21, 2020
1 parent 5f2bd9b commit 305d618
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions jenkins/barefoot/buildimage-bf-202006/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/202006']],
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)
}
}
}

0 comments on commit 305d618

Please sign in to comment.