Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkinsfile not found

Tags:

git

jenkins

I'm just starting out with Jenkins, and can't seem to get it to work. I created a text file called 'Jenkinsfile' in the root directory of my repository, but when I try to buil I'm getting the error "‘Jenkinsfile’ not found Does not meet criteria". This is the full Jenkins output:

Started by user Joshua Fishman [Thu Jul 20 11:44:10 EDT 2017]
Starting  branch indexing...
git.exe rev-parse --is-inside-work-tree # timeout=10 Setting origin to C:\Users\JoshuaF\git\<some_repo>
git.exe config remote.origin.url C:\Users\JoshuaF\git\<some_repo># timeout=10 Fetching origin...
Fetching upstream changes from origin
git.exe --version #timeout=10
git.exe fetch --tags --progress origin
+refs/heads/*:refs/remotes/origin/*
git.exe ls-remote --symref C:\Users\JoshuaF\git\<some_repo> # timeout=10    
git.exe rev-parse --is-inside-work-tree # timeout=10 Setting origin to C:\Users\JoshuaF\git\<some_repo>    
git.exe config remote.origin.url C:\Users\JoshuaF\git\<some_repo># timeout=10 
Fetching & pruning origin...  
Fetching upstream changes from origin   
git.exe --version # timeout=10    
git.exe fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune  
Getting remote branches... 
Seen branch in repository origin/master  
Seen 1 remote branch

Checking branch master
      'Jenkinsfile' not found
    Does not meet criteria 
Processed 1 branches [Thu Jul 20 11:44:11 EDT 2017]
Finished branch indexing. Indexing took 0.68 sec
Finished: SUCCESS

and this is my repository:repository

Totally new to this, so I appreciate any help.

like image 222
JoshuaF Avatar asked Jul 20 '17 16:07

JoshuaF


People also ask

Where can I find Jenkinsfile?

A Jenkinsfile created using the classic UI is stored by Jenkins itself (within the Jenkins home directory).

Is Jenkinsfile written in Groovy?

The Jenkinsfile is written using the Groovy Domain-Specific Language and can be generated using a text editor or the Jenkins instance configuration tab. The Declarative Pipelines is a relatively new feature that supports the concept of code pipeline.

How do I run Jenkinsfile from GitHub?

Configuring GitHubStep 1: go to your GitHub repository and click on 'Settings'. Step 2: Click on Webhooks and then click on 'Add webhook'. Step 3: In the 'Payload URL' field, paste your Jenkins environment URL. At the end of this URL add /github-webhook/.


1 Answers

The '.txt' extension may be the issue: Jenkins is looking for 'Jenkinsfile' without extension. git mv Jenkinsfile.txt Jenkinsfile && git commit will rename the file.

like image 73
zigarn Avatar answered Sep 20 '22 12:09

zigarn