diff options
author | Evan Lojewski <github@meklort.com> | 2020-10-10 22:26:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 22:26:56 -0600 |
commit | 009d22780ad8a9000a5d3c4abc2530df2f77d82a (patch) | |
tree | 36886fc136fa351dd2fa9fc7aa3fdc6c359301df /.jenkins.groovy | |
parent | bdd96c76c078fd72ee99b78e9dd93015b5efb4be (diff) | |
download | bcm5719-ortega-009d22780ad8a9000a5d3c4abc2530df2f77d82a.tar.gz bcm5719-ortega-009d22780ad8a9000a5d3c4abc2530df2f77d82a.zip |
jenkins: Ensure images can be build using the packages source code. (#137)
* jenkins: Ensure release source can build firmware images.
* fwupd: Enable deterministic builds for .cab files.
Diffstat (limited to '.jenkins.groovy')
-rw-r--r-- | .jenkins.groovy | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/.jenkins.groovy b/.jenkins.groovy index e8765a7..97add3b 100644 --- a/.jenkins.groovy +++ b/.jenkins.groovy @@ -55,7 +55,7 @@ def notify(status, description) targetUrl: BUILD_URL } -def build(nodeName, archive = false, archive_cab = false, analyze = true) +def build(nodeName, archive = false, archive_cab = false, analyze = true, test_archive = false) { node(nodeName) { @@ -141,6 +141,30 @@ def build(nodeName, archive = false, archive_cab = false, analyze = true) } } + if (test_archive) + { + cleanWs() + + stage('build-release') + { + copyArtifacts filter: '*Source.tar.gz', fingerprintArtifacts: true, projectName: JOB_NAME, selector: specific(currentBuild.id) + sh ''' + tar -xvf *Source.tar.gz + cd *Source + ./build.sh -DDISABLE_CLANG_ANALYZER=True + ''' + + // Check resulting .cab files match + copyArtifacts filter: '*.cab', fingerprintArtifacts: true, projectName: JOB_NAME, selector: specific(currentBuild.id) + sh ''' + find *Source -type f -iname '*.cab' -print0 | + while read -d $'\0' -r file; do + cmp $file `basename $file` + done + ''' + } + } + cleanWs() } } @@ -149,9 +173,9 @@ try { notify('PENDING', 'Build Pending ') parallel( - "fedora": { build('master', true, true, true) }, - "ubuntu-18.04": { build('ubuntu-18.04', false, false, false) }, - "ubuntu-20.04": { build('ubuntu-20.04', true, false, false) }, + "fedora": { build('master', true, true, true, true) }, + "ubuntu-18.04": { build('ubuntu-18.04', false, false, false, false) }, + "ubuntu-20.04": { build('ubuntu-20.04', true, false, false, false) }, ) } catch(e) @@ -161,6 +185,8 @@ catch(e) } finally { + cleanWs() + def currentResult = currentBuild.result ?: 'SUCCESS' if(currentResult == 'SUCCESS') { |