Skip to content

Commit d19a72e

Browse files
authored
[jenkins] Add Mellanox 201911-rpc Jenkins job (sonic-net#66)
1 parent aeeea83 commit d19a72e

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
pipeline {
2+
agent { node { label 'jenkins-workers-slow' } }
3+
4+
options {
5+
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30'))
6+
7+
}
8+
9+
triggers {
10+
pollSCM('@midnight')
11+
}
12+
13+
stages {
14+
stage('Prepare') {
15+
steps {
16+
step([$class: 'WsCleanup'])
17+
checkout([$class: 'GitSCM',
18+
branches: [[name: 'refs/heads/201911']],
19+
extensions: [[$class: 'SubmoduleOption',
20+
disableSubmodules: false,
21+
parentCredentials: false,
22+
recursiveSubmodules: true,
23+
reference: '',
24+
trackingSubmodules: false]],
25+
userRemoteConfigs: [[url: 'http://github.com/Azure/sonic-buildimage']]])
26+
}
27+
}
28+
29+
stage('Build') {
30+
steps {
31+
sh '''
32+
#!/bin/bash -xe
33+
34+
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
35+
36+
make configure PLATFORM=mellanox
37+
make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_SYNCD_RPC=y all
38+
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-mellanox.bin
39+
'''
40+
}
41+
}
42+
43+
}
44+
post {
45+
46+
success {
47+
archiveArtifacts(artifacts: 'target/**')
48+
}
49+
fixed {
50+
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
51+
}
52+
regression {
53+
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
54+
}
55+
cleanup {
56+
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)