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:
Totally new to this, so I appreciate any help.
A Jenkinsfile created using the classic UI is stored by Jenkins itself (within the Jenkins home directory).
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.
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/.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With