[JIRA] (JENKINS-27508) Cannot use ENV variable for repository url in Git Publisher

13 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 8, 2020, 7:09:03 AM2/8/20
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
 
Jenkins / Bug JENKINS-27508
Cannot use ENV variable for repository url in Git Publisher
Change By: Mark Waite
Summary: Cannot used use ENV Variable variable for repository url in GIT-Plugin in GIT Git Publisher
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 1:41:02 PM2/10/20
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-27508
 
Re: Cannot use ENV variable for repository url in Git Publisher

This issue report is specifically about the git publisher within the git plugin. The git publisher is not available in Pipeline. The git publisher is available in Freestyle jobs.

  • Maciej Kubiak, lightweight checkout is not available in Freestyle jobs
  • jlpinardon git publisher does not perform a fetch and does not work with Pipelines
  • Daniel Carreira git publisher does not work with Pipelines

I'm unable to duplicate the issue as described. Steps I took while trying to duplicate the issue:

  1. Create a Freestyle job with a parameter, REPO_URL_FRAGMENT with choices MarkEWaite/jenkins-bugs, MarkEWaite/git-client-plugin, MarkEWaite/git-plugin, and MarkEWaite/platformlabeler-plugin
  2. Use git as the SCM in that Freestyle job from repository https://github.com//${REPO_URL}
  3. Checkout the master branch in that Freestyle job
  4. Enable the "Merge before build" git plugin extension with repository origin, branch master, and default settings for merge strategy and fast forward mode
  5. Add a conditional step to the Freestyle job that runs ant increment if the file build.xml is found in the workspace
  6. Enable Git Publisher as a Post-build Action, configured to push only if the build succeeds, merge the result to the branch master with remote named origin

When I perform those steps, the job runs successfully.

If I choose the REPO_URL_FRAGMENT value as MarkEWaite/jenkins-bugs, the job runs successfully, increments a build number, and pushes the change to the master branch of my jenkins-bugs repository.

If I choose the REPO_URL_FRAGMENT value as something other than MarkEWaite/jenkins-bugs, the job runs successfully, does not increment a build number, and does not push anything to the master branch of the selected repository.

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 1:42:05 PM2/10/20
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-27508
This issue report is specifically about the git publisher within the git plugin.  The git publisher is not available in Pipeline.  The git publisher is available in Freestyle jobs.

* [~qbix], lightweight checkout is not available in Freestyle jobs
* [~jlpinardon] git publisher does not perform a fetch and does not work with Pipelines
* [~dcarreira] git publisher does not work with Pipelines


I'm unable to duplicate the issue as described.  Steps I took while trying to duplicate the issue:

# Create a Freestyle job with a parameter, {{REPO_URL_FRAGMENT}} with choices MarkEWaite/jenkins-bugs, MarkEWaite/git-client-plugin, MarkEWaite/git-plugin, and MarkEWaite/platformlabeler-plugin
# Use git as the SCM in that Freestyle job from repository {{https://github.com//${REPO_URL}}}
# Checkout the master branch in that Freestyle job
# Enable the "Merge before build" git plugin extension with repository {{origin}}, branch {{master}}, and default settings for merge strategy and fast forward mode
# Add a conditional step to the Freestyle job that runs {{ant increment}} if the file {{build.xml}} is found in the workspace
# Enable Git Publisher as a Post-build Action, configured to push only if the build succeeds, merge the result to the branch {{master}} with remote named {{origin}}


When I perform those steps, the job runs successfully.  

If I choose the {{REPO_URL_FRAGMENT}} value as {{MarkEWaite/jenkins-bugs}}, the job runs successfully, increments a build number, and pushes the change to the master branch of my jenkins-bugs repository.

If I choose the {{REPO_URL_FRAGMENT}} value as something other than {{MarkEWaite/jenkins-bugs}}, the job runs successfully, does not increment a build number, and does not push anything to the master branch of the selected repository.

See my job definition for the precise details
  [^JENKINS-27508-config.xml]

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 1:42:06 PM2/10/20
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 2:16:04 PM2/10/20
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
Change By: Mark Waite
Attachment: JENKINS-27508-config.xml

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 2:16:06 PM2/10/20
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 2:17:05 PM2/10/20
to jenkinsc...@googlegroups.com
See my job definition for the precise details  [^JENKINS-27508-config.xml]

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 2:17:06 PM2/10/20
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 10, 2020, 2:48:04 PM2/10/20
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Cannot Reproduce
 
Change By: Mark Waite
Status: Open Closed
Resolution: Cannot Reproduce

yashjain96@hotmail.com (JIRA)

unread,
Feb 10, 2020, 3:14:02 PM2/10/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages