1

プロジェクトにtravis CIとカバーオールを使用しています。

エラーが発生します Processing of input or output data failed: Report submission to Coveralls API failed with HTTP status 422: Unprocessable Entity (Couldn't find a repository matching this job.)そこにビルドが表示されます。

私の pom.xml :

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <outputDirectory>${basedir}/target</outputDirectory>
                <format>xml</format>
                <maxmem>256m</maxmem>
                <!-- aggregated reports for multi-module projects -->
                <aggregate>true</aggregate>
            </configuration>
        </plugin>


        <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
             <version>3.0.1</version>
            
            <configuration>
                <coberturaReports>
                    <coberturaReport>
                        ${basedir}/target/coverage.xml
                    </coberturaReport>
                </coberturaReports>
                <sourceEncoding>UTF-8</sourceEncoding>
                <serviceName>travis-ci</serviceName>
                <serviceJobId>${env.TRAVIS_JOB_ID} </serviceJobId>
            </configuration>
        </plugin>

私は無料版のカバーオールを使用しています。カバーオールが私のビルドを取得できないのはなぜですか?

ありがとう

4

1 に答える 1

4

解決策は次のとおりです。

環境変数は travis 環境で使用できますが、カバーオール タスクのためにそれを注入する必要がありました。

つまり-DTRAVIS_JOB_ID=$TRAVIS_JOB_ID、 pom.xml で使用できるようにするために追加することを意味します

travis.yml の最終行:

- mvn clean -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID cobertura:cobertura coveralls:report

于 2015-01-25T22:13:47.400 に答える