Reputation: 13
I am new to Jenkins and want to build a CI-environment. I have a local repository with files to get built by Ant.
when I start the build manually I get this errors:
Building in workspace C:\ProgramData\Jenkins\workspace\ToolchainXQT
C:\Git\git-cmd.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository C:\Git\git-cmd.exe config remote.origin.url file:///C:/HelloWorld # timeout=10 Fetching upstream changes from file:///C:/HelloWorld C:\Git\git-cmd.exe --version # timeout=10 C:\Git\git-cmd.exe fetch --tags file:///C:/HelloWorld +refs/heads/:refs/remotes/origin/ C:\Git\git-cmd.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 FATAL: Invalid id: C:\ProgramData\Jenkins\workspace\ToolchainXQT> org.eclipse.jgit.errors.InvalidObjectIdException: Invalid id: C:\ProgramData\Jenkins\workspace\ToolchainXQT> at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:232) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:689) at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316) at hudson.plugins.git.util.DefaultBuildChooser.getHeadRevision(DefaultBuildChooser.java:130) at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:112) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:992) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1095) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1728) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Finished: FAILURE
When I leave the branch specifier blank, then I get this:
Building in workspace C:\ProgramData\Jenkins\workspace\ToolchainXQT
C:\Git\git-cmd.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository C:\Git\git-cmd.exe config remote.origin.url file:///C:/HelloWorld # timeout=10 Fetching upstream changes from file:///C:/HelloWorld C:\Git\git-cmd.exe --version # timeout=10 C:\Git\git-cmd.exe fetch --tags file:///C:/HelloWorld +refs/heads/:refs/remotes/origin/ Seen 0 remote branches ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Finished: FAILURE
I hope someone can help me, explain me this messages or tell me what you need to know to help me.
Thanks in advice, Max
Upvotes: 1
Views: 571
Reputation: 1500
Refer to https://stackoverflow.com/a/44847857/3043709 for a description why you should use git.exe from the cmd or the bin directory, instead of git-cmd.exe.
Upvotes: 1
Reputation: 1330
so you have a empty repository you must create a available git repository so your repo directory you do
you add your files do
in first time try to clone your repo from other consol by git clone if it works go a head to Jenkins and enjoy
Upvotes: 0