0

尝试使用fabric8构建和推送图像,但失败并出现以下异常-

org.apache.maven.lifecycle.LifecycleExecutionException: 无法在项目上执行目标 io.fabric8:fabric8-maven-plugin:4.3.1:build (default-cli) :无法执行构建:io.fabric8.maven.core .service.Fabric8ServiceException:尝试构建映像时出错原因:org.apache.maven.plugin.MojoExecutionException:无法执行构建:io.fabric8.maven.core.service.Fabric8ServiceException:尝试构建映像时出错[2022-01-20T13:28:34.708Z] 在 io.fabric8.maven.plugin.mojo.build.BuildMojo.buildAndTag (BuildMojo.java:299)

我正在执行的命令 - maven: commands: build_and_push_image: enable: true goal: "fabric8:build fabric8:push" maven_options: "-B -Ddocker.image.release=${SINGLE_CI_BUILD_VERSION} -pl ${SINGLE_CI_MICROSERVICE_NAME}-tests -P词"

Pom.xml

<plugins>
           <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-maven-plugin</artifactId>
                <configuration>
                    <!-- need to disable this to be able to test -->
                    <buildStrategy>docker</buildStrategy>
                    <mode>kubernetes</mode>
                    <enricher>
                        <excludes>
                            <exclude>fmp-project</exclude>
                        </excludes>
                    </enricher>
                    <verbose>true</verbose>
                    <images>
                        <image>
                            <name>${docker.push.registry}/${docker.image.name}-wiremock:${docker.image.release}</name>
                            <build>
                                <from>${base.wiremock.docker.image}</from>
                                <labels>
                                    <imageName>${docker.image.name}</imageName>
                                    <imageVersion>${docker.image.release}</imageVersion>
                                </labels>
                                <assembly>
                                    <mode>dir</mode>
                                    <basedir>/home</basedir>
                                    <inline>
                                        <id>add-wiremock-files</id>
                                        <fileSets>
                                            <fileSet>
                                                <directory>${project.build.directory}/wiremock/</directory>
                                                <includes>
                                                    <include>**/*</include>
                                                </includes>
                                                <outputDirectory>wiremock</outputDirectory>
                                            </fileSet>
                                        </fileSets>
                                    </inline>
                                </assembly>
                            </build>
                        </image>
                    </images>
                </configuration>
                <executions>
                    <execution>
                        <id>fmp</id>
                        <goals>
                            <goal>resource</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
</plugins>
4

0 回答 0