[JIRA] [workflow-multibranch-plugin] (JENKINS-35310) "Trigger builds remotely" doesn't save authToken

96 views
Skip to first unread message

nmaclennan@cimpress.com (JIRA)

unread,
Jun 2, 2016, 12:53:01 PM6/2/16
to jenkinsc...@googlegroups.com
Norm MacLennan created an issue
 
Jenkins / Bug JENKINS-35310
"Trigger builds remotely" doesn't save authToken
Issue Type: Bug Bug
Assignee: Manuel Recena Soto
Components: workflow-multibranch-plugin, workflow-plugin
Created: 2016/Jun/02 4:52 PM
Environment: Jenkins: 1.651.2
Pipeline Multibranch: 2.5
Priority: Minor Minor
Reporter: Norm MacLennan

Trying to use the "Trigger builds remotely (e.g., from scripts)" Build Trigger from a multibranch pipeline project doesn't seem to work.

If I check off the box and type in a token and click save, the job saves successfully but it does not write an authToken element to the job config and the item is unchecked in the configuration when I reload the page. Even manually setting an authToken and POSTing the config doesn't work. While the element is there in the config, I'm not able to kick a job off with the token.

I can post some screenshots and config snippets if that will be helpful, but this seems to be reproducible easily enough that it might be overkill.

I've been able to reproduce this with a fresh Jenkins 2.x install as well.

Repro case

Given: A Jenkins 1.651.2 instance with some kind of security enabled (e.g. anonymous users cannot build jobs). And the pipeline plugins installed.

1. Create a freestyle or single pipeline job.
2. Under "Build Triggers," select "Trigger builds remotely (e.g., from scripts)"
3. Enter "hello" in the "Authentication Token" field
4. Save the job.
5. POST to jobUrl/build?token=hello (e.g. curl -XPOST http://172.17.0.2:8080/job/freestyle/build?token=hello)
6. Observe the job is triggered.
7. Create a multibranch pipeline job.
8. Add an authentication token as above.
9. Save the job.
10. POST to jobUrl/build?token=hello (e.g. curl -XPOST http://172.17.0.2:8080/job/multibranch/build?token=hello)
11. Observe you receive an "Authentication required" error.
12. Go back to the job configuration and observe the Build Trigger isn't enabled.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

recena@gmail.com (JIRA)

unread,
Jun 2, 2016, 2:21:01 PM6/2/16
to jenkinsc...@googlegroups.com
Manuel Recena Soto assigned an issue to Jesse Glick
Change By: Manuel Recena Soto
Assignee: Manuel Recena Soto Jesse Glick

jglick@cloudbees.com (JIRA)

unread,
Jun 6, 2016, 1:02:02 PM6/6/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-35310
 
Re: "Trigger builds remotely" doesn't save authToken

Add an authentication token as above. Save the job.

Can you be more specific? This is currently impossible: there is no “trigger builds remotely” option on the multibranch folder; and the branch projects are read-only so they have no Save button.

As noted in

JENKINS-30519 , it could be made possible somehow.

nmaclennan@cimpress.com (JIRA)

unread,
Jun 6, 2016, 1:20:01 PM6/6/16
to jenkinsc...@googlegroups.com
Norm MacLennan updated an issue
 
Change By: Norm MacLennan
Attachment: config-screen.png

nmaclennan@cimpress.com (JIRA)

unread,
Jun 6, 2016, 1:24:01 PM6/6/16
to jenkinsc...@googlegroups.com
Norm MacLennan commented on Bug JENKINS-35310
 
Re: "Trigger builds remotely" doesn't save authToken

Hi Jesse Glick,

I do see the option in my multibranch folder (or maybe we're talking about different things).

I'm doing this in a docker container, so I don't (or shouldn't) have any other plugins or weird configuration messing things up.

I ran: docker run -it --rm jenkins:2.3. Then I went through the set-up flow, installed recommended plugins, and created an admin user. I clicked "New Item" and chose to make a MutliBranch Pipeline. The config screen looks like the below. If I fill in that box and click save, the setting doesn't get put into the job config.

This happens for regular (non-multibranch) pipeline projects as well. The same thing also happens in latest jenkins 1.x image, but it is a lengthier repro case.

warren.strange@gmail.com (JIRA)

unread,
Jun 6, 2016, 4:38:02 PM6/6/16
to jenkinsc...@googlegroups.com

I am seeing the same issue with multi-branch pipeline

The "Trigger builds remotely" will not save the Authentication token. You can enter it - but it never gets saved

benh@swimfrog.com (JIRA)

unread,
Jun 6, 2016, 7:35:03 PM6/6/16
to jenkinsc...@googlegroups.com

I am also experiencing this issue.

lars.povlsen@microsemi.com (JIRA)

unread,
Jun 7, 2016, 3:32:02 AM6/7/16
to jenkinsc...@googlegroups.com

Jesse, I'm also seeing this. I thing the confusion is between the top-level project "Configure" and the branch object "View Configuration".

Btw, if anyone has a workaround for this I'ld be happy to hear about it. (I'm using periodic build atm, which just doesn't scale will....).

I'm on 2.7 for the record.

lars.povlsen@microsemi.com (JIRA)

unread,
Jun 8, 2016, 6:08:02 AM6/8/16
to jenkinsc...@googlegroups.com
Lars Povlsen edited a comment on Bug JENKINS-35310
Jesse, I'm also seeing this. I  thing  think  the confusion is between the top-level project "Configure" and the branch object "View Configuration".

Btw, if anyone has a workaround for this I'ld be happy to hear about it. (I'm using periodic build atm, which just doesn't scale
 will  well ....).


I'm on 2.7 for the record.

akaempfe@aknetworx.de (JIRA)

unread,
Jun 9, 2016, 1:46:02 AM6/9/16
to jenkinsc...@googlegroups.com

Hey, i can confirm this also on the latest versions of Jenkins (2.8) and with up-to-date plugins list.

i have created a fresh multibranch-pipeline (MBP) project where i want to call depending, also MBP projects to be build after each other.
unfortunately, in the "main" project config ( not in the branch specific ) it is not possible to save the option "Trigger builds remotely"

nick.heap@oneadvanced.com (JIRA)

unread,
Jun 22, 2016, 9:22:02 AM6/22/16
to jenkinsc...@googlegroups.com

Also seeing this in my Multibranch Pipeline job on 2.10.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

parra.pj@gmail.com (JIRA)

unread,
Jun 28, 2016, 10:34:05 AM6/28/16
to jenkinsc...@googlegroups.com

I also have this problem in a Multibranch Pipeline job on 2.11

sven.brunner@codeculture.de (JIRA)

unread,
Jul 1, 2016, 5:38:01 AM7/1/16
to jenkinsc...@googlegroups.com

We also got this problem. It would be very nice to see this resolved soon since we need this feature for our projekts.

tino.decker@codeculture.de (JIRA)

unread,
Jul 5, 2016, 9:31:02 AM7/5/16
to jenkinsc...@googlegroups.com

We are also seeing this in our Multibranch Pipeline and it's a real blocker. Is there any progress on this?

knsk.mtzk@gmail.com (JIRA)

unread,
Jul 6, 2016, 5:36:02 AM7/6/16
to jenkinsc...@googlegroups.com

As a workaround, I created a simple project 'multibranch-project-trigger' that receive build trigger events,
and run indexer by calling
"curl -X POST -u me:xxxxxxxxxx http://jenkins/job/multibranch-project/build?delay=0"

dev@mickaelperrin.fr (JIRA)

unread,
Aug 6, 2016, 5:23:03 AM8/6/16
to jenkinsc...@googlegroups.com

Can confirm the issue, really annoying.

pieter@kokx.nl (JIRA)

unread,
Aug 11, 2016, 6:41:01 AM8/11/16
to jenkinsc...@googlegroups.com

This is a problem for us as well. Because of this issue, there is no good way to trigger creation of new jobs for new pull requests, other than with active polling.

jglick@cloudbees.com (JIRA)

unread,
Aug 16, 2016, 11:43:06 AM8/16/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
 
Change By: Jesse Glick
Component/s: workflow-multibranch-plugin

stefan.thurnherr@gmail.com (JIRA)

unread,
Aug 22, 2016, 7:34:01 AM8/22/16
to jenkinsc...@googlegroups.com
Stefan Thurnherr commented on Bug JENKINS-35310
 
Re: "Trigger builds remotely" doesn't save authToken

Also confirming this issue, running Jenkins 2.18 with all plugins up-to-date.

My usecase: Trying to use this to trigger builds upon push events in GitLab Community Edition, since the "Gitlab Hook Plugin" doesnt seem to work anyway for multi-branch projects, and anyway seems to be deprecated in favour of the "GitLab plugin" (but only available in GitLab EE).

stefan.thurnherr@gmail.com (JIRA)

unread,
Aug 22, 2016, 11:39:02 AM8/22/16
to jenkinsc...@googlegroups.com
Stefan Thurnherr edited a comment on Bug JENKINS-35310
Also confirming this issue, running Jenkins 2.18 with all plugins up-to-date.

My usecase: Trying to use this to trigger builds upon push events in GitLab Community Edition, since the "Gitlab Hook Plugin" doesnt seem to work anyway for multi-branch projects, and anyway seems to be [deprecated in favour of the "GitLab plugin" |http://docs.gitlab.com/ee/integration/jenkins.html] (but only available in GitLab EE).

A possible workaround could be what is described in the [first comment of JENKINS-33295|https://issues.jenkins-ci.org/browse/JENKINS-33295?focusedCommentId=263464&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-263464]. But I dont have EnvInject installed (yet), so havent had the chance to try it.

stefan.thurnherr@gmail.com (JIRA)

unread,
Aug 22, 2016, 11:40:01 AM8/22/16
to jenkinsc...@googlegroups.com
Stefan Thurnherr edited a comment on Bug JENKINS-35310
Also confirming this issue, running Jenkins 2.18 with all plugins up-to-date.

My usecase: Trying to use this to trigger builds upon push events in GitLab Community Edition, since the "Gitlab Hook Plugin" doesnt seem to work anyway for multi-branch projects, and anyway seems to be [deprecated in favour of the "GitLab plugin" |http://docs.gitlab.com/ee/integration/jenkins.html] (but only available in GitLab EE).

A possible workaround could be what is described in the [first comment of JENKINS-33295|https://issues.jenkins-ci.org/browse/JENKINS-33295?focusedCommentId=263464&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-263464] : Basically having a simple freestyle job that gets the build triggers and then starts the job from the multi-branch project that corresponds to the changed branch . But I dont have EnvInject installed (yet), so havent had the chance to try it.

jglick@cloudbees.com (JIRA)

unread,
Aug 29, 2016, 4:31:05 PM8/29/16
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Duplicate
 
Change By: Jesse Glick
Status: Open Resolved
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages