Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find GitSCM for project for workflow project? #234

Closed
cliles opened this issue Mar 15, 2016 · 6 comments
Closed

Could not find GitSCM for project for workflow project? #234

cliles opened this issue Mar 15, 2016 · 6 comments

Comments

@cliles
Copy link

cliles commented Mar 15, 2016

Is there any tips/tricks/documentation for setup with a workflow project? Trying to trigger and build MRs.

I can see some recent PR's that "fixed" support, like #206, but when I setup a workflow job and point my hook to it I get something like

Mar 15, 2016 1:01:51 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger onPost
workflow-project-test triggered for merge request.
Mar 15, 2016 1:01:51 AM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger createAction
Trying to get name and URL for job: workflow-project-test
Mar 15, 2016 1:01:51 AM WARNING com.dabsquared.gitlabjenkins.GitLabPushTrigger$DescriptorImpl getSourceRepoNameDefault
Could not find GitSCM for project. Project = 2, next build = {2}

@omehegan - plz assist.

@omehegan
Copy link
Member

@cliles we talked about this in IRC, but did you have any more luck with this? "Works on my machine!" :)

@cliles
Copy link
Author

cliles commented Mar 29, 2016

ok, so I started fresh.

New pipeline job set to pull Jenkinsfile from scm. Manually ran job, worked fine. Change configuration of the job to build on gitlab MRs, following the directions in the README for single-repository setup.

Running the job via MR hook fails. You had previously stated something about manually running the job with parameters that "worked." This was required to be done 1 time before being able to build for MRs. What is this step?

@cliles
Copy link
Author

cliles commented Mar 29, 2016

When configured for MRs, I get something like the following

using GIT_SSH to set credentials 
 > git -c core.askpass=true fetch --tags --progress [email protected]:org/repo.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/${gitlabSourceBranch}^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/${gitlabSourceBranch}^{commit} # timeout=10
 > git rev-parse origin/${gitlabSourceBranch}^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

@omehegan
Copy link
Member

After much discussion in IRC, we have determined that @cliles is hitting this Jenkins bug: https://issues.jenkins-ci.org/browse/JENKINS-28447 The plugin will work OK with WorkFlow jobs which define the workflow script in the Jenkins UI. If you use the git checkout method of pulling the script, it does not work because these variables are not expanded.

@adumat
Copy link

adumat commented Apr 28, 2016

i'm trying to configure a jenkins job using "multibranch pipeline", there is a mode to use this plugin for trigger the jobs?

@omehegan
Copy link
Member

@adumat it should just work. Please update to version 1.2.1 of the plugin and report if you have any issues. Note the Jenkins bug I mentioned in #234 (comment). If you have any problems, please open a separate issue.

exceed-alae pushed a commit to exceed-alae/gitlab-plugin that referenced this issue May 20, 2022
[JENKINS-31827] Use default timeouts for URLConnections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants