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.
- Loading branch information
1 parent
8b338ec
commit 05e0ed5
Showing
5 changed files
with
313 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,66 @@ | ||
pipeline { | ||
agent { node { label 'jenkins-workers-slow' } } | ||
|
||
options { | ||
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20')) | ||
} | ||
|
||
environment { | ||
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder') | ||
} | ||
|
||
triggers { | ||
pollSCM('H 2 * * *') | ||
} | ||
|
||
stages { | ||
stage('Prepare') { | ||
steps { | ||
milestone(ordinal: 1, label: "BUILD_START_MILESTONE") | ||
step([$class: 'WsCleanup']) | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/master']], | ||
extensions: [[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: false, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false], | ||
[$class: 'LocalBranch', | ||
localBranch: "**"]], | ||
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=barefoot | ||
BLDENV=stretch make stretch | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-barefoot.bin | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-barefoot.swi | ||
''' | ||
} | ||
} | ||
|
||
} | ||
post { | ||
success { | ||
archiveArtifacts(artifacts: 'target/*.gz, target/debs/*.deb, target/sonic-*.bin, target/sonic-*.swi, target/python-wheels/*.whl, target/python-wheels/*.log, target/*.log, target/debs/*.log') | ||
} | ||
fixed { | ||
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
regression { | ||
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
cleanup { | ||
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true) | ||
} | ||
} | ||
} |
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: '20')) | ||
} | ||
|
||
triggers { | ||
pollSCM('H */12 * * *') | ||
} | ||
|
||
stages { | ||
stage('Prepare') { | ||
steps { | ||
milestone(ordinal: 1, label: "BUILD_START_MILESTONE") | ||
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true) | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/201811']], | ||
extensions: [[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: false, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false], | ||
[$class: 'LocalBranch', | ||
localBranch: "**"]], | ||
userRemoteConfigs: [[url: 'http://github.com/Azure/sonic-buildimage']]]) | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
sh '''#!/bin/bash | ||
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git' | ||
make configure PLATFORM=broadcom | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.bin | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-broadcom.swi | ||
''' | ||
} | ||
} | ||
} | ||
|
||
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) | ||
} | ||
} | ||
} |
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: '20')) | ||
} | ||
|
||
triggers { | ||
pollSCM('H */12 * * *') | ||
} | ||
|
||
stages { | ||
stage('Prepare') { | ||
steps { | ||
milestone(ordinal: 1, label: "BUILD_START_MILESTONE") | ||
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true) | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/201911']], | ||
extensions: [[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: false, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false], | ||
[$class: 'LocalBranch', | ||
localBranch: "**"]], | ||
userRemoteConfigs: [[url: 'http://github.com/Azure/sonic-buildimage']]]) | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
sh '''#!/bin/bash | ||
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git' | ||
make configure PLATFORM=broadcom | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.bin | ||
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-broadcom.swi | ||
''' | ||
} | ||
} | ||
} | ||
|
||
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) | ||
} | ||
} | ||
} |
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,64 @@ | ||
pipeline { | ||
agent { node { label 'jenkins-workers-slow' } } | ||
|
||
options { | ||
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20')) | ||
} | ||
|
||
environment { | ||
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder') | ||
} | ||
|
||
triggers { | ||
pollSCM('@midnight') | ||
} | ||
|
||
stages { | ||
stage('Prepare') { | ||
steps { | ||
milestone(ordinal: 1, label: "BUILD_START_MILESTONE") | ||
step([$class: 'WsCleanup']) | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/201911-t0']], | ||
extensions: [[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: false, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false], | ||
[$class: 'LocalBranch', | ||
localBranch: "**"]], | ||
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 | ||
''' | ||
} | ||
} | ||
|
||
} | ||
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>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
regression { | ||
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
cleanup { | ||
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true) | ||
} | ||
} | ||
} |
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,65 @@ | ||
pipeline { | ||
agent { node { label 'jenkins-workers-slow' } } | ||
|
||
options { | ||
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20')) | ||
} | ||
|
||
environment { | ||
SONIC_TEAM_WEBHOOK = credentials('public-jenkins-builder') | ||
} | ||
|
||
triggers { | ||
pollSCM 'H 2 * * *' | ||
} | ||
|
||
stages { | ||
stage('Prepare') { | ||
steps { | ||
milestone(ordinal: 1, label: "BUILD_START_MILESTONE") | ||
step([$class: 'WsCleanup']) | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: 'refs/heads/master']], | ||
extensions: [[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: false, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false], | ||
[$class: 'LocalBranch', | ||
localBranch: "**"]], | ||
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 SKU=ACS-MSN2700 | ||
BLDENV=stretch make stretch | ||
make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_SYNCD_RPC=y all | ||
''' | ||
} | ||
} | ||
} | ||
|
||
post { | ||
success { | ||
archiveArtifacts(artifacts: 'target/*.gz, target/debs/*.deb, target/sonic-*.bin') | ||
} | ||
fixed { | ||
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
regression { | ||
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)") | ||
office365ConnectorSend(webhookUrl: "${env.SONIC_TEAM_WEBHOOK}") | ||
} | ||
cleanup { | ||
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true) | ||
} | ||
} | ||
} |