forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new job to build Mellanox 201911 branch (sonic-net#60)
- Loading branch information
1 parent
2985d2e
commit c578888
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { | ||
|
||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/201911']], | ||
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 target/sonic-mellanox.bin | ||
ENABLE_SYNCD_RPC=y make SONIC_CONFIG_BUILD_JOBS=1 target/docker-syncd-mlnx-rpc.gz target/docker-ptf-mlnx.gz | ||
''' | ||
} | ||
} | ||
|
||
} | ||
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) | ||
} | ||
} | ||
} |