From 44994a55c69e8944f525f6dafd2362ddc9ac5113 Mon Sep 17 00:00:00 2001 From: geans-pin Date: Thu, 4 Jun 2020 19:14:13 -0700 Subject: [PATCH] ADD for broadcom PDE build PR --- .../broadcom/buildimage-brcm-pde/Jenkinsfile | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 jenkins/broadcom/buildimage-brcm-pde/Jenkinsfile diff --git a/jenkins/broadcom/buildimage-brcm-pde/Jenkinsfile b/jenkins/broadcom/buildimage-brcm-pde/Jenkinsfile new file mode 100644 index 0000000000..97fb0571d8 --- /dev/null +++ b/jenkins/broadcom/buildimage-brcm-pde/Jenkinsfile @@ -0,0 +1,51 @@ +pipeline { + agent { node { label 'jenkins-workers' } } + + options { + buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '60')) + + } + + stages { + stage('Prepare') { + steps { + step([$class: 'WsCleanup']) + checkout([$class: 'GitSCM', + branches: [[name: '${sha1}']], + extensions: [[$class: 'SubmoduleOption', + disableSubmodules: false, + parentCredentials: false, + recursiveSubmodules: true, + reference: '', + trackingSubmodules: false]], + userRemoteConfigs: [[url: 'http://github.com/Azure/sonic-buildimage', + refspec: '+refs/pull/*:refs/remotes/origin/pr/*']]]) + } + } + + stage('Build') { + steps { + sh ''' +#!/bin/bash -xe + +git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git' + +CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom" +make initpde +make configure PLATFORM=broadcom +make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-broadcom-pde.bin +''' + } + } + + } + post { + + failure { + archiveArtifacts(artifacts: 'target/**/*.log') + } + success { + archiveArtifacts(artifacts: 'target/**') + } + } +}