jenkinsci / kubernetes-cd-plugin

A Jenkins plugin to deploy to Kubernetes cluster
MIT License
139 stars 70 forks source link

No matching configuration files #129

Open jeahoonchen opened 4 years ago

jeahoonchen commented 4 years ago

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?

hallliu1984831 commented 4 years ago

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?

jwarden commented 3 years ago

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?

Beast12 commented 3 years ago

Same problem here... Anyone?

Beast12 commented 3 years ago

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

timur206 commented 3 years ago

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

IlyaShav commented 2 years ago

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

guozheng1 commented 1 week ago

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?