kubernetes-cd-plugin icon indicating copy to clipboard operation
kubernetes-cd-plugin copied to clipboard

No matching configuration files

Open jeahoonchen opened this issue 5 years ago • 7 comments

test.yaml is in / test / on my jenkins server, /test/test.yaml my jenkinsjob configured Config Files :test/test.yaml jenkins console output ERROR: No matching configuration files found for test/test.yaml ERROR: ERROR: java.lang.IllegalStateException: No matching configuration files found for test/test.yaml

how should the config file be configured?

jeahoonchen avatar May 07 '20 03:05 jeahoonchen

Hi There, I got the same issue as @jeahoonchen mentioned above, I used docker command to start up jenkins: docker run -d -v /opt/jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts In order to consume the yaml file from container, I created a folder cnPolicy under /opt/jenkins_home and put yaml file under that folder, then got below build error:

ERROR: No matching configuration files found for var/jenkins_home/cnPolicy/sm-service.yaml 15:13:50 ERROR: ERROR: java.lang.IllegalStateException: No matching configuration files found for var/jenkins_home/cnPolicy/sm-service.yaml 15:13:50 hudson.remoting.ProxyException: java.lang.IllegalStateException: No matching configuration files found for var/jenkins_home/cnPolicy/sm-service.yaml Any suggestion?

hallliu1984831 avatar May 26 '20 07:05 hallliu1984831

The documentation surrounding - arguably - the most important feature for deployment, is non-existent.

When I include the deployment yaml in the application repo:

13:59:16 Starting Kubernetes deployment
13:59:16 ERROR: No matching configuration files found for ./deploy/kube-deployment.yaml
13:59:16 ERROR: ERROR: java.lang.IllegalStateException: No matching configuration files found for ./deploy/kube-deployment.yaml
13:59:16 hudson.remoting.ProxyException: java.lang.IllegalStateException: No matching configuration files found for ./deploy/kube-deployment.yaml

So should the "config files" (which presumably means kube yaml) be referenced as being system local for each executor, or from the workdir base?

jwarden avatar Jul 06 '20 19:07 jwarden

Same problem here... Anyone?

Beast12 avatar Sep 16 '20 20:09 Beast12

If someone would bump into this... Just put *.yml in you config field...

Beast12 avatar Sep 17 '20 07:09 Beast12

Hello. So how to resolve this problem ? I don't underestand. I have a similar problem. I have

  • K8s: Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:40:09Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:32:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}

  • Jenkins deployed to K8s and have a version: Jenkins 2.289.1

  • When I try deploy project to K8s I saw a errors Starting Kubernetes deployment ERROR: No matching configuration files found for \var\jenkins_home\config ERROR: ERROR: java.lang.IllegalStateException: No matching configuration files found for \var\jenkins_home\config hudson.remoting.ProxyException: java.lang.IllegalStateException: No matching configuration files found for \var\jenkins_home\config at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.doCall(DeploymentCommand.java:152) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:124) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:106) at hudson.FilePath.act(FilePath.java:1252) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:68) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:45) at com.microsoft.jenkins.azurecommons.command.CommandService.runCommand(CommandService.java:88) at com.microsoft.jenkins.azurecommons.command.CommandService.execute(CommandService.java:96) at com.microsoft.jenkins.azurecommons.command.CommandService.executeCommands(CommandService.java:75) at com.microsoft.jenkins.azurecommons.command.BaseCommandContext.executeCommands(BaseCommandContext.java:77) at com.microsoft.jenkins.kubernetes.KubernetesDeploy.perform(KubernetesDeploy.java:42) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803) at hudson.model.Build$BuildExecution.build(Build.java:197) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513) at hudson.model.Run.execute(Run.java:1906) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) ERROR: Kubernetes deployment ended with HasError Finished: FAILURE

timur206 avatar Jun 21 '21 06:06 timur206

having the same issue, trying to deploy a K8s deployment with jenkins pipeline, and getting the following error:

Starting Kubernetes deployment ERROR: No matching configuration files found for var/lib/jenkins/workspace/deployapp/part3/kube/*.yaml ERROR: ERROR: java.lang.IllegalStateException: No matching configuration files found for var/lib/jenkins/workspace/deployapp/part3/kube/*.yaml hudson.remoting.ProxyException: java.lang.IllegalStateException: No matching configuration files found for var/lib/jenkins/workspace/deployapp/part3/kube/*.yaml at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.doCall(DeploymentCommand.java:152) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:124) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:106) at hudson.FilePath.act(FilePath.java:1260) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:68) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:45) at com.microsoft.jenkins.azurecommons.command.CommandService.runCommand(CommandService.java:88) at com.microsoft.jenkins.azurecommons.command.CommandService.execute(CommandService.java:96) at com.microsoft.jenkins.azurecommons.command.CommandService.executeCommands(CommandService.java:75) at com.microsoft.jenkins.azurecommons.command.BaseCommandContext.executeCommands(BaseCommandContext.java:77) at com.microsoft.jenkins.kubernetes.KubernetesDeploy.perform(KubernetesDeploy.java:42) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806) at hudson.model.Build$BuildExecution.build(Build.java:198) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514) at hudson.model.Run.execute(Run.java:1888) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:99) at hudson.model.Executor.run(Executor.java:431) ERROR: Kubernetes deployment ended with HasError Finished: FAILURE

IlyaShav avatar Nov 24 '21 20:11 IlyaShav