Skip to content

Pipeline Job Get SCM Element Bug Fix #892

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Sai-Raveendra-Kandregula

Fixes #891

@@ -539,6 +539,13 @@ def get_scm_type(self):
if scm_element:
# multibranch pipeline.
self._scm_prefix = multibranch_scm_prefix
if not scm_element:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we change this to be an else for line 539?
Would you add test coverage for this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clintonsteiner, I have updated the alternate scm_element fetch mechanism. Please check. As per the test coverage, I have added the test case for the change, but it seems like the Jenkins instance used in the tests does not have the Pipeline suite. Please advise on how to proceed.

@Sai-Raveendra-Kandregula Sai-Raveendra-Kandregula marked this pull request as draft April 24, 2025 03:21
@Sai-Raveendra-Kandregula Sai-Raveendra-Kandregula marked this pull request as ready for review April 24, 2025 03:32
@clintonsteiner
Copy link
Collaborator

Single test failures
FAILED jenkinsapi_tests/systests/test_job_pipeline_scm.py::test_pipeline_scm - jenkinsapi.custom_exceptions.JenkinsAPIException: Operation failed. url=http://localhost:50607/createItem?name=xthuwbefqg, data=



2

<hudson.plugins.git.UserRemoteConfig>
https://example.com/sairk/pipeline-test.git
</hudson.plugins.git.UserRemoteConfig>


<hudson.plugins.git.BranchSpec>
main
</hudson.plugins.git.BranchSpec>


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

Successfully merging this pull request may close these issues.

get_scm_type() throws NotSupportSCM for Standard Pipeline Jobs with SCM
2 participants