0

我尝试通过 Jenkins 管道从源代码构建一个 debian 包。

我将源代码签入一个名为 source 的目录(debian pbuilder 插件查找的默认名称),尽管当 Irun debianPbuilder 失败时:

我的管道:

pipeline{
    agent any
    stages{
        stage("Checkout"){
            steps{
                echo "========Checkout ${params.PACKAGE_NAME} ========"
                dir('source'){
                    git branch: 'some branch',
                        credentialsId: 'git_user',
                        url: "https://coderepository.com"
                }
            }
        }
        
        stage("Build deb"){
            steps {
                echo "========Building The Debian Package========"
                dir('source'){
                    sh 'debian/rules debian/control'
                }
                debianPbuilder additionalBuildResults: '', architecture: 'all', distribution: 'all', keyring: '', mirrorSite: 'myrepo.com'
            }
        }
    }
}

管道执行输出为:

$ dpkg-parsechangelog --version
[source] $ dpkg-parsechangelog --count 1
[source] $ dpkg-parsechangelog --show-field source
[source] $ dpkg-parsechangelog --show-field version
[source] $ dpkg-parsechangelog --show-field distribution
This does not appear to be a debian package.  Possible reasons include: no debian/source/format file; package is neither native or quilt

“/var/lib/jenkins/workspace/my-job”的文件树是

source |
       debian
            |
            source
                  |
                   format

此处管道执行输出的图像

4

0 回答 0