diff --git a/Jenkinsfile b/Jenkinsfile index 75df32646ff9c4ac70086430abb66b5290e1beb9..91c02a5db731f29fa5a511fd19f047d253173548 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -268,6 +268,26 @@ def buildOStree(architecture, type, board, debosarguments = "", repo = "repo") { --filename ${image_name}.delta""") } +def buildOStreeRollbackDelta(architecture, type, board, debosarguments = "", repo = "repo") { + def image_name = imageName(architecture, type, board, true) + def branch = "${osname}/${release}/${architecture}-${board}/${type}" + def rollback_branch = "${osname}/${release}/${architecture}-${board}/${type}-rollback" + + sh(script: """ + cd ${PIPELINE_VERSION}/${architecture}/${type} + echo "/usr/bin/updatectl" > skip_list + ostree --repo=${repo} commit \ + --tree=ref=${branch} \ + --branch=${rollback_branch} \ + --skip-list="skip_list" + ostree --repo=${repo} static-delta generate \ + --from=${branch} \ + --to=${rollback_branch} \ + --inline \ + --min-fallback-size=1024 \ + --filename ${image_name}_rollback.delta""") +} + /** Generate the image name * * To have a single place for image name generation. @@ -323,6 +343,7 @@ def buildOStreeImage(architecture, type, board, debosarguments = "") { stage("${architecture} ${type} ${board} OStree image build") { buildOStree(architecture, type, board, debosarguments, repo) + buildOStreeRollbackDelta(architecture, type, board, debosarguments, repo) sh(script: """ cd ${PIPELINE_VERSION}/${architecture}/${type}