From 699cc1cf81056884a6703104a0919c2ccf4323c0 Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Tue, 16 Jul 2019 00:39:07 +0300 Subject: [PATCH] [jenkins] Add Mellanox 201811-rpc Jenkins job (#42) Signed-off-by: Andriy Moroz --- .../buildimage-mlnx-201811-rpc/Jenkinsfile | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 jenkins/mellanox/buildimage-mlnx-201811-rpc/Jenkinsfile diff --git a/jenkins/mellanox/buildimage-mlnx-201811-rpc/Jenkinsfile b/jenkins/mellanox/buildimage-mlnx-201811-rpc/Jenkinsfile new file mode 100644 index 000000000000..6db907aa6174 --- /dev/null +++ b/jenkins/mellanox/buildimage-mlnx-201811-rpc/Jenkinsfile @@ -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/201811']], + extensions: [[$class: 'SubmoduleOption', + disableSubmodules: false, + parentCredentials: false, + recursiveSubmodules: true, + reference: '', + trackingSubmodules: false]], + 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=mellanox +make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_DHCP_GRAPH_SERVICE=y ENABLE_SYNCD_RPC=y all +make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_DHCP_GRAPH_SERVICE=y target/sonic-mellanox.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) + } + } +}