[JIRA] (JENKINS-61210) Missing Git remote and browser URLs when executing Job DSL via CasC

9 views
Skip to first unread message

bryan.burke@cgifederal.com (JIRA)

unread,
Feb 24, 2020, 3:43:03 PM2/24/20
to jenkinsc...@googlegroups.com
Bryan Burke created an issue
 
Jenkins / Bug JENKINS-61210
Missing Git remote and browser URLs when executing Job DSL via CasC
Issue Type: Bug Bug
Assignee: Kristy Hughes
Attachments: casc_dsl_badxml.txt, casc_dsl_workaround.txt, direct_dsl_goodxml.txt, plugin_versions.txt
Components: atlassian-bitbucket-server-integration-plugin, configuration-as-code-plugin, job-dsl-plugin
Created: 2020-02-24 20:42
Environment: Docker image: jenkins/jenkins:lts
Jenkins version: 2.204.2
For plugin versions, see: plugin_versions.txt
Priority: Minor Minor
Reporter: Bryan Burke

When creating a Bitbucket Server SCM pipeline seed job using Job DSL in CasC, the generated XML is missing the Git remote and browser URLs, causing the job to fail. Opening the job configuration and immediately saving it without making any changes populates the URLs in the XML.

Steps to reproduce, with log entries and example CasC YAML: casc_dsl_badxml.txt

The key log entry appears to be:

c.a.b.j.i.scm.BitbucketSCM#<init>: No Bitbucket Server configuration for serverId Bitbucket

This message seems to indicate that CasC may be executing the Job DSL script before applying the CasC YAML that defines the Bitbucket server.

When executing the exact same Job DSL script via a freestyle job after CasC completes, the generated XML correctly contains the Git remote and browser URLs. Steps to verify: direct_dsl_goodxml.txt

Using the Job DSL Configure block to inject the Git remote and browser URLs provides a workaround. Steps to verify: casc_dsl_workaround.txt

This issue may affect other SCM provider plugins and may be related to JENKINS-60899 and possibly others, though I am not certain.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

pashalab@gmail.com (JIRA)

unread,
Mar 4, 2020, 10:56:03 AM3/4/20
to jenkinsc...@googlegroups.com
Pavel Sadikov commented on Bug JENKINS-61210
 
Re: Missing Git remote and browser URLs when executing Job DSL via CasC

Ran into this problem as well. The configure block is sufficient for resolving the issue at the job level, but there is no workaround I could find for the global library configuration as its configured via CasC directly.

After loading up Jenkins, I have to go into the Manage Jenkins -> Configure System and hit save without making any changes, which fixes the underlying XML.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

dkjellin@atlassian.com (JIRA)

unread,
Mar 15, 2020, 7:54:05 PM3/15/20
to jenkinsc...@googlegroups.com

mail@daniel-spilker.com (JIRA)

unread,
Mar 16, 2020, 5:13:03 PM3/16/20
to jenkinsc...@googlegroups.com
Daniel Spilker updated Bug JENKINS-61210
 

Closing this as duplicate of JENKINS-60899 as it's the same underlying problem.

Change By: Daniel Spilker
Status: Open Fixed but Unreleased
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages