Skip to content

Commit 235dd6d

Browse files
authored
Add job config for buildimage-mlnx-201811 (sonic-net#59)
1 parent 05150a6 commit 235dd6d

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
17+
checkout([$class: 'GitSCM',
18+
branches: [[name: 'refs/heads/201811']],
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 target/sonic-mellanox.bin
38+
'''
39+
}
40+
}
41+
42+
}
43+
post {
44+
45+
success {
46+
archiveArtifacts(artifacts: 'target/**')
47+
}
48+
fixed {
49+
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
50+
}
51+
regression {
52+
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
53+
}
54+
cleanup {
55+
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)