Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-8255

[fabric8-maven-plugin] Attempts to generate BuildConfig with empty source.type (should be "Binary")

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: FIS 2.0
    • Fix Version/s: FIS 2.0
    • Component/s: FIS-Fabric8
    • Labels:
      None
    • Sprint:
      FIS 2.0 Sprint 7

      Description

      I have this error:

      [ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.1.0.redhat-000035:build (default) on project my-fuse-project: Execution default of goal io.fabric8:fabric8-maven-plugin:3.1.0.redhat-000035:build failed: Failure executing: POST at: https://10.1.2.2:8443/oapi/v1/namespaces/test/buildconfigs. Message: BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.source, message=Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=BuildConfig, name=my-fuse-project-s2i, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}). -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:fabric8-maven-plugin:3.1.0.redhat-000035:build (default) on project my-fuse-project: Execution default of goal io.fabric8:fabric8-maven-plugin:3.1.0.redhat-000035:build failed: Failure executing: POST at: https://10.1.2.2:8443/oapi/v1/namespaces/test/buildconfigs. Message: BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.source, message=Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=BuildConfig, name=my-fuse-project-s2i, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal io.fabric8:fabric8-maven-plugin:3.1.0.redhat-000035:build failed: Failure executing: POST at: https://10.1.2.2:8443/oapi/v1/namespaces/test/buildconfigs. Message: BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.source, message=Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=BuildConfig, name=my-fuse-project-s2i, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      	... 20 more
      Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://10.1.2.2:8443/oapi/v1/namespaces/test/buildconfigs. Message: BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.source, message=Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=BuildConfig, name=my-fuse-project-s2i, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=BuildConfig "my-fuse-project-s2i" is invalid: spec.source: Invalid value: {"Binary":null,"Dockerfile":null,"Git":null,"Images":null,"ContextDir":"","SourceSecret":null,"Secrets":null}: must provide a value for at least one of source, binary, or dockerfile, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
      	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:314)
      	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:267)
      	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:236)
      	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:229)
      	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:207)
      	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:578)
      	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:278)
      	at io.fabric8.openshift.client.handlers.BuildConfigHandler.create(BuildConfigHandler.java:43)
      	at io.fabric8.openshift.client.handlers.BuildConfigHandler.create(BuildConfigHandler.java:31)
      	at io.fabric8.kubernetes.client.dsl.internal.KubernetesListOperationsImpl.create(KubernetesListOperationsImpl.java:115)
      	at io.fabric8.kubernetes.client.dsl.internal.KubernetesListOperationsImpl.create(KubernetesListOperationsImpl.java:78)
      	at io.fabric8.kubernetes.client.dsl.internal.KubernetesListOperationsImpl.create(KubernetesListOperationsImpl.java:43)
      	at io.fabric8.maven.plugin.BuildMojo.applyResourceObjects(BuildMojo.java:554)
      	at io.fabric8.maven.plugin.BuildMojo.executeOpenShiftBuild(BuildMojo.java:310)
      	at io.fabric8.maven.plugin.BuildMojo.buildAndTag(BuildMojo.java:256)
      	at io.fabric8.maven.docker.BuildMojo.executeInternal(BuildMojo.java:47)
      	at io.fabric8.maven.plugin.BuildMojo.executeInternal(BuildMojo.java:237)
      	at io.fabric8.maven.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:193)
      	at io.fabric8.maven.plugin.BuildMojo.execute(BuildMojo.java:223)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	... 21 more
      

        Gliffy Diagrams

          Attachments

          1. config
            0.6 kB
          2. docker images pulled and tagged.png
            docker images pulled and tagged.png
            84 kB
          3. logFabric8MavenPlugin.txt
            504 kB
          4. my-fuse-project.zip
            14 kB
          5. screenshot-1.png
            screenshot-1.png
            90 kB

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  aurelien.pupier Aurélien Pupier
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: