[JIRA] (JENKINS-38679) Constant builds when svn url contains parameter

31 views
Skip to first unread message

bmarwell@gmail.com (JIRA)

unread,
Mar 13, 2020, 8:25:05 AM3/13/20
to jenkinsc...@googlegroups.com
Ben M updated an issue
 
Jenkins / Bug JENKINS-38679
Constant builds when svn url contains parameter
Change By: Ben M
Priority: Minor Major
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

bmarwell@gmail.com (JIRA)

unread,
Mar 13, 2020, 8:25:06 AM3/13/20
to jenkinsc...@googlegroups.com
Ben M updated an issue
Change By: Ben M
Summary: Polling using legacy SCM fails: “Workspace doesn't contain https:// Constant builds when svn /global-library-repo${library.myib.version}” url contains parameter

bmarwell@gmail.com (JIRA)

unread,
Mar 13, 2020, 9:52:05 AM3/13/20
to jenkinsc...@googlegroups.com
Ben M commented on Bug JENKINS-38679
 
Re: Constant builds when svn url contains parameter

Problematic code is in SubversionSCM.java.

Lines 1435 following:

 

                try {
                    url = loc.getSVNURL().toDecodedString();
                } catch (SVNException ex) {
                    listener.error(Messages.SubversionSCM_pollChanges_exception(loc.getURL()));
                    return BUILD_NOW;
                }
                if (!baseline.revisions.containsKey(url)) {
                    listener.getLogger().println(Messages.SubversionSCM_pollChanges_locationNotInWorkspace(url));
                    return BUILD_NOW;
                }

The if checks on the variable url, when it is not yet expanded.

Shouldn't be too hard to fix?

 

 

bmarwell@gmail.com (JIRA)

unread,
Mar 13, 2020, 10:06:03 AM3/13/20
to jenkinsc...@googlegroups.com
Ben M commented on Bug JENKINS-38679

It think it is just: {

{url = loc.getExpandedLocation(env).getSVNURL().toDecodedString();}

}

bmarwell@gmail.com (JIRA)

unread,
Mar 13, 2020, 10:07:04 AM3/13/20
to jenkinsc...@googlegroups.com
Ben M edited a comment on Bug JENKINS-38679
It think it is just: \  

 
{ { code:java}
url = loc.getExpandedLocation(env).getSVNURL().toDecodedString(); {code } }

bmarwell@gmail.com (JIRA)

unread,
Mar 13, 2020, 10:13:03 AM3/13/20
to jenkinsc...@googlegroups.com
Ben M updated an issue
Change By: Ben M
Comment:
It think it is just: 

 
{code:java}
url = loc.getExpandedLocation(env).getSVNURL().toDecodedString();{code}

mortenbreum@gmail.com (JIRA)

unread,
Mar 30, 2020, 3:15:02 PM3/30/20
to jenkinsc...@googlegroups.com
Morten Breum commented on Bug JENKINS-38679
 
Re: Constant builds when svn url contains parameter

I observe the same issue, and I agree with Ben M's comment.

My polling log continuously says (base URL replaced)

Started on Mar 30, 2020 5:38:00 PM
Workspace doesn't contain https://<base_url>/products/product_a/${CODE_REPO_SUB_LOC}. Need a new build.
Workspace doesn't contain https://<base_url>/products/product_a/${CODE_REPO_SUB_LOC}. Need a new build.
Done. Took 0 ms
Changes found

My svn repository contains products/product_a/trunk/ and products/product_a/trunk/tags/1.0.0. There is no difference between building trunk and a tag, so there is one job, Build_ProductA, to do that. That job is invoked from either:

  • job Release_ProductA
    with the parameter CODE_REPO_SUB_LOC set to /tags/1.0.0
    And the build output is uploaded to a public nexus server
  • job Snapshot_ProductA
    with the parameter CODE_REPO_SUB_LOC set to /trunk
    And the build output is uploaded to a private stash
  • SCM polling
    with the parameter set to /trunk (from default)

Because of this bug, I have to have an extra separate job to avoid building when there are no changes.

Reply all
Reply to author
Forward
0 new messages