From 305d618f52be61e476799dd2cd4c52843cb34530 Mon Sep 17 00:00:00 2001 From: Volodymyr Boiko <66446128+vboykox@users.noreply.github.com> Date: Tue, 21 Jul 2020 13:44:28 +0300 Subject: [PATCH] [barefoot] 202006 pipeline (#131) Signed-off-by: Volodymyr Boyko --- .../barefoot/buildimage-bf-202006/Jenkinsfile | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 jenkins/barefoot/buildimage-bf-202006/Jenkinsfile diff --git a/jenkins/barefoot/buildimage-bf-202006/Jenkinsfile b/jenkins/barefoot/buildimage-bf-202006/Jenkinsfile new file mode 100644 index 000000000000..8202668e7a86 --- /dev/null +++ b/jenkins/barefoot/buildimage-bf-202006/Jenkinsfile @@ -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) + } + } +}