Skip to content

Commit

Permalink
[mellanox] Add SONiC bmtor ONE/RPC jobs (#55)
Browse files Browse the repository at this point in the history
* [mellanox] Add SONiC bmtor ONE/RPC jobs

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
  • Loading branch information
nazariig authored and lguohan committed Nov 13, 2019
1 parent eb5a780 commit 68d87af
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
56 changes: 56 additions & 0 deletions jenkins/mellanox/buildimage-mlnx-bmtor-rpc/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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/bmtor']],
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 ENABLE_DHCP_GRAPH_SERVICE=y ENABLE_SYNCD_RPC=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)
}
}
}
56 changes: 56 additions & 0 deletions jenkins/mellanox/buildimage-mlnx-bmtor/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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/bmtor']],
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 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)
}
}
}

0 comments on commit 68d87af

Please sign in to comment.