Problem when configure Jenkins with LDAP(fail to bind to specified groups)

2016-11-16 Thread Frank Yu
Hi All,

Sorry for disturb, I do have a problem when configure Jenkins with LDAP.
The case is I have a LDAP Server(ApacheDS), and there are three groups. I 
only want member of one group can access Jenkins. 


I tried many times, but failed. Can anyone tell me how should I write in 
"Group search base", "Group search filter", "Group membership"?

Thanks so much!!!






-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/042d9989-da52-4333-99e9-6b4094dbbe28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Missing configuration section for plugin

2016-11-16 Thread Daniel Lo Nigro
Hey Oleg, thanks for the reply. I worked out the problem. It was a simple
mistake - The casing of the resources directory was incorrect. I called it
"GithubIssueNotifier" when it should have been "GitHubIssueNotifier"
(capital H). I was developing on Windows and NTFS is not case sensitive, so
I didn't notice the problem in my dev environment. Renaming the directory
fixed it :)

Thanks!

--
Regards,
Daniel Lo Nigro
http://dan.cx/ | Twitter  | Facebook


On Wed, Nov 16, 2016 at 7:17 AM, Oleg Nenashev 
wrote:

> Do you see any warnings in the Jenkins startup log? If no, try setting up
> the FINE level and restarting, maybe there will be something useful.
> The plugin itself looks good.
>
> Just in case, I would recommend to update to the latest Parent POM and to
> remove the explicit Jenkins Test Harness specification
>
> среда, 9 ноября 2016 г., 7:36:27 UTC+1 пользователь Daniel Lo Nigro
> написал:
>>
>> Hi!
>>
>> I recently released a Jenkins plugin, the GitHub Issue Plugin
>> . I
>> created a global configuration section through a global.jelly file as shown
>> in the tutorial. I see it fine in my development environment (testing with
>> "mvn hpi:run"), but I don't see it when I install the plugin in my
>> production environment. Everything else in the plugin is working fine, it's
>> just the configuration section that's missing. I'm testing with the exact
>> same version of Jenkins I have in prod (2.19.2).
>>
>> Any ideas what I should look for to determine why it's not appearing?
>>
>> Thanks!
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/3kCvNGZA5a4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/83264393-6160-49b0-b86c-d0592929a36c%
> 40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAB1r_%2BVgPE_H2YO9a8s3TsyynTJD4eg-X5%2BaJgx9%3DjmFxizJNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Git Parameter plugin ambiguous log messages

2016-11-16 Thread Michael Giroux
The following log message would be a lot more informative if it provided 
the job name so we could go adjust the configuration.

Git Parameter Version 0.7.0
Jenkins 2.19.2 LTS
JDK 1.8

Nov 16, 2016 8:36:01 PM 
net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition 
getBranch
INFO: Specified branchFilter is not a valid regex. Setting to .*



-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/28d82fad-08fa-40c9-9865-1a6bfb7f80a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Backporting for LTS 2.19.3 started

2016-11-16 Thread Oleg Nenashev
Hi guys,

In 2.31 we have fixed one regression, which has been introduced in 2.14.
It is "Prevent NullPointerException when rendering 
CauseOfInterruption.UserInterruption in build summary pages for 
non-existent users." (JENKINS-37282 
 and JENKINS-38721 
) => Impacts MultiJob 
and Pipeline job types at least. The fix 
 is pretty trivial.

Since we need to respin the RC due to the security release, I would propose 
to backport this fix as well.

Best regards,
Oleg

среда, 9 ноября 2016 г., 20:19:16 UTC+1 пользователь ogondza написал:
>
> On 2016-11-08 23:44, Oleg Nenashev wrote: 
> > Thanks Oliver! 
> > 
> > So we have JENKINS-35845 in the list. 
> > Let's proceed in the PR 
> > . Maybe James Dumay and 
> > Jesse want to join the discussion here as well. 
>
> I have backported the fix with amendment. I will push the RC tomorrow 
> unless it breaks tests badly. 
>
> -- 
> oliver 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/e2ff3afa-703f-45aa-be6c-77cbee635c50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Mission Control (extended) Dashboard Plugin - Help Needed

2016-11-16 Thread PF66
Hello guys, new Jenkins Dev here.

I'm currently working for my thesis with a company and they asked me to 
implement a better looking visual dashboard for stakeholders that aren't 
used to Jenkins, to better know how the development of each project is 
going.
So I started by forking Mission Control Plugin 
(https://wiki.jenkins-ci.org/display/JENKINS/Mission+Control+Plugin) since 
it's a nice base for what I'm looking for.

What I pretend to add to this view:

   - Separate status by View (I'll call it Project, since each View has 
   it's list of Jobs) instead of Jobs
  - Example: Project 1 has Jobs 1 and 2, Project 2 has Jobs 3 and 4.
 - The hole project is success if only all his jobs are.
  - Clicking on a Project, opens another view only with it's respective 
   jobs and pre-defined information (Project description for example)
  - On this new view, I want to sort the Jobs by some kind of category.
   

I need help on the 2nd point here, there's why I'm posting this. 
Since I need information to separate the jobs and each job's build, I'm 
thinking of using the metadata plugin. Can someone help me the best way to 
do this? I've checked the code of this plugin but isn't very clear to me 
how can I search for items inside a job, or inside builds.

One example of what I want to do:

   - Job 1 has 3 builds with a metadata field 'version'
   - Build 1 and 2 have 'version' = 1.0
  - Build 3 have 'version' = 2.0
  - On the view I want only to check all the builds that are 'version' 
  = 1 (with a checkbox), so I can create some kind of hyperlink to them 
  within jenkins.
   
Also, what's the best way to show and treat this information? All in the 
same view or change to another after opening the project? Don't know the 
best way to carry the information, since I didn't look up to other View 
plugins.

I hope I made myself clear. Kind of panicking with this, since I think I'm 
taking a longer step than my leg!

Thanks in advance,
PF

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/89bce952-6291-47fa-8ffd-0b5bb561f0fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Promoted Build plugin change the promotion status

2016-11-16 Thread avinash . upadhya28
On successful promotion, build metadata file (build.xml) will gets updated 
with following status.



  Promotion
  


  Custom Groovy script condition
  



  
  
1479318413549
Asia/Calcutta
  
  16
  
15
16
  

   



If i remove this section from xml and restart the jenkin promotion status 
will be unmarked. But i am exploring a programmatic option to do this meta 
data change without restarting the jenkins!  Any suggestions/clue ? 


On Wednesday, 16 November 2016 21:14:11 UTC+5:30, avinash@gmail.com 
wrote:
>
> I am using Promoted Build plugin to mark the stable build. 
>
>
> I have a scenario where i need to unmark the build from promotion. Any 
> suggestion to achieve this ?
>
>
> The idea is having am multiple builds with the promotion flag will make 
> the deploy team confuse. So as soon as we get a new stable build, i want to 
> unmark the build from promotion.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/0d3c97a7-8798-4aa7-ba08-f8ad8fd32ade%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to Add Custom Build Step to behave exactly same as Execute Windows Batch Command.

2016-11-16 Thread Robert Sandell
Abstract classes cannot be instanciated, so you can't annotate the
constructor with DataBoundConstructor since the class can't be directly
instanciated but will need to be subclassed.

/B

On Wed, Nov 16, 2016 at 3:59 PM, Kul Bhushan Srivastava 
wrote:

> Thanks Robert.
>
> I am facing maven compilation issue. Saying @DataBoundConstructor cannot
> be used inside abstract class.
>
> Please suggest.
>
> My Java File:
>
> import org.kohsuke.stapler.DataBoundConstructor;
> import hudson.Extension;
> import hudson.FilePath;
> import hudson.Launcher;
> import hudson.tasks.Messages;
> import hudson.Proc;
> import hudson.Util;
> import hudson.EnvVars;
> import hudson.model.AbstractBuild;
> import hudson.model.BuildListener;
> import hudson.model.Node;
> import hudson.model.Result;
> import hudson.model.TaskListener;
> import hudson.remoting.ChannelClosedException;
> import hudson.model.AbstractProject;
> import hudson.tasks.BuildStepDescriptor;
> import hudson.tasks.Builder;
> import hudson.tasks.CommandInterpreter;
> import java.io.IOException;
> import java.util.Map;
> import java.util.logging.Level;
> import java.util.logging.Logger;
> import javax.annotation.Nonnull;
>
> public abstract class BuildStepCreator extends Builder {
>
> private String text1, text2, text3;
>
> public String getText1(){
> return text1;
> }
> public String getText2(){
> return text2;
> }
> public String getText3(){
> return text3;
> }
>
>
> @DataBoundConstructor
> public BuildStepCreator(OptionalTextBlock1 enableText1,
> OptionalTextBlock2 enableText2, OptionalTextBlock3 enableText3) {
> this.text1 = (enableText1 != null) ? enableText1.text1 : null;
> this.text2 = (enableText2 != null) ? enableText2.text2 : null;
> this.text3 = (enableText3 != null) ? enableText3.text3 : null;
> }
>
> public static class OptionalTextBlock1 {
> private String text1;
> @DataBoundConstructor
> public OptionalTextBlock1(String text1) {
> this.text1 = text1;
> }
> }
> public static class OptionalTextBlock2 {
> private String text2;
> @DataBoundConstructor
> public OptionalTextBlock2(String text2) {
> this.text2 = text2;
> }
> }
> public static class OptionalTextBlock3 {
> private String text3;
> @DataBoundConstructor
> public OptionalTextBlock3(String text3) {
> this.text3 = text3;
> }
> }
>
> @Extension
> public static final class DescriptorImpl extends
> BuildStepDescriptor{
>
> /*public FormValidation doCheckTask(@QueryParameter String value){
> try{
> if(value.equalsIgnoreCase(null) ||
> value.equalsIgnoreCase("")){
> return FormValidation.error("Invalid Details.");
> }
> }catch(Exception e){
> return FormValidation.error("Error validating the form
> details.");
> }
> return FormValidation.ok();
> }
>
> public FormValidation doCheckGoal(@QueryParameter String value){
> try{
> Integer.parseInt(value);
> }catch(Exception e){
> return FormValidation.error("Please provide integer in the
> Goal.");
> }
> return FormValidation.ok();
> }*/
>
> @Override
> public boolean isApplicable(Class
> jobType) {
> // TODO Auto-generated method stub
> return true;
> }
>
> @Override
> public String getDisplayName() {
> // TODO Auto-generated method stub
> return "Job Orchestration";
> }
> }
>
> /*@Override
> public boolean perform(hudson.model.AbstractBuild build,
> hudson.Launcher launcher, hudson.model.BuildListener listener) {
> listener.getLogger().println("OptionalBlockSampleBuilder " +
> text1);
> return true;
> }*/
>
> @Override
> public boolean perform(AbstractBuild build, Launcher launcher,
> BuildListener listener) throws InterruptedException {
> return perform(build,launcher,(TaskListener)listener);
> }
>
> /**
>  * Determines whether a non-zero exit code from the process should
> change the build
>  * status to {@link Result#UNSTABLE} instead of default {@link
> Result#FAILURE}.
>  *
>  * Changing to {@link Result#UNSTABLE} does not abort the build, next
> steps are continued.
>  *
>  */
> protected boolean isErrorlevelForUnstableBuild(int exitCode) {
> return false;
> }
>
> public boolean perform(AbstractBuild build, Launcher launcher,
> TaskListener listener) throws InterruptedException{
> FilePath ws = build.getWorkspace();
> if (ws == null) {
> Node node = build.getBuiltOn();
> if (node == null) {
> throw new NullPointerException("no such 

Re: zaproxy-plugin weirdness and request

2016-11-16 Thread JordanGS
Okay let's make the description just "zap-plugin 

"

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/0ce5c43f-a683-4301-896e-42f41aa2e754%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Promoted Build plugin change the promotion status

2016-11-16 Thread avinash . upadhya28


I am using Promoted Build plugin to mark the stable build. 


I have a scenario where i need to unmark the build from promotion. Any 
suggestion to achieve this ?


The idea is having am multiple builds with the promotion flag will make the 
deploy team confuse. So as soon as we get a new stable build, i want to 
unmark the build from promotion.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/dcdecf0a-8e3d-4d5f-a9ed-3ede7e1db763%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Disabling node monitors for single use computer

2016-11-16 Thread Kanstantsin Shautsou
Monitoring API is fully async and uncontrollable. I think you are free to 
contribute any related changed to core via PR where you will get stephenc 
review.

On Wednesday, November 16, 2016 at 4:36:58 AM UTC+3, Surya Gaddipati wrote:
>
> Hi, 
>
> I am running into an issue which I think is related to my single use 
> computer plugin ( 
> https://github.com/suryagaddipati/jenkins-docker-swarm-plugin), which 
> basically creates one computer/build and deletes it after its done. 
>
> This is resulting in accumulation of thousands of node monitor threads in 
> BLOCKED state. I suspect these threads don't go away once the computer goes 
> away. 
>
> I was curious if there is a way to either disable these monitors 
> entirely Jenkins wide or disable them for computer type perhaps a method 
> 'needsMonitoring()' on Computer. 
>
> eg: 
>
> "Monitoring thread for Response Time started on Mon Nov 14 20:55:26 UTC 2016" 
> #43777 daemon prio=5 os_prio=0 tid=0x2aab5f376800 nid=0x1f4b waiting for 
> monitor entry [0x2aabd4e3b000]
>java.lang.Thread.State: BLOCKED (on object monitor)
>   at hudson.remoting.Channel.send(Channel.java:577)
>   - waiting to lock <0x000548779748> (a hudson.remoting.Channel)
>   at hudson.remoting.Request.callAsync(Request.java:205)
>   at hudson.remoting.Channel.callAsync(Channel.java:823)
>   at 
> hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:75)
>   at 
> hudson.node_monitors.ResponseTimeMonitor$1.monitor(ResponseTimeMonitor.java:57)
>   at 
> hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:305)
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/ca3e4b34-b68d-4dcf-9316-1fc180e23dbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Missing configuration section for plugin

2016-11-16 Thread Oleg Nenashev
Do you see any warnings in the Jenkins startup log? If no, try setting up 
the FINE level and restarting, maybe there will be something useful.
The plugin itself looks good.

Just in case, I would recommend to update to the latest Parent POM and to 
remove the explicit Jenkins Test Harness specification

среда, 9 ноября 2016 г., 7:36:27 UTC+1 пользователь Daniel Lo Nigro написал:
>
> Hi!
>
> I recently released a Jenkins plugin, the GitHub Issue Plugin 
> . I 
> created a global configuration section through a global.jelly file as shown 
> in the tutorial. I see it fine in my development environment (testing with 
> "mvn hpi:run"), but I don't see it when I install the plugin in my 
> production environment. Everything else in the plugin is working fine, it's 
> just the configuration section that's missing. I'm testing with the exact 
> same version of Jenkins I have in prod (2.19.2). 
>
> Any ideas what I should look for to determine why it's not appearing?
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/83264393-6160-49b0-b86c-d0592929a36c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request ownership/action for a plugin (klocwork)

2016-11-16 Thread Oleg Nenashev
Any revival of this plugin will be appreciated.

Unfortunately, we cannot just fork the repository and start releasing from 
it. It may be considered as a highjacking of the plugin. Plugin maintainers 
commonly do not sign Jenkins CLA, hence we have no formal permission to do 
so.

I think we should fork the plugin to jenkinsci and start preparing it to 
the release with patches (including stuff like CI, parent POM update, 
etc.). If the maintainer does not respond, likely the only valid option 
will be to rename plugin and to change packages to avoid data conflicts. 
But it will require much work to implement the proper migration code.

I've added Gregory Boissinot to Cc. Maybe he could suggest the proper 
contact.

BR, Oleg

вторник, 15 ноября 2016 г., 14:13:29 UTC+1 пользователь Jacob Larfors 
написал:
>
> Ok I tried contacting the other maintainer/user at cittools and his email 
> address for Thales does not work, so I suspect he has left Thales. As there 
> has also been an outstanding pull request since July, and our attempts to 
> contact the people at cittools has failed, I would assume this repository 
> is no longer taken care of...
>
> What options do we have? Can we make the jenkinsci repository the "main" 
> one and we will get our commits there? There arent really any valid PRs/FRs 
> in Jira, and the few that are we could look to transfer or fix, as we quite 
> actively work on this plugin and have been shipping hpi files for the past 
> few years to avoid this mess and bottleneck of waiting for cittools.
>
> Thanks for the help.
>
> Jacob
>
> On Tuesday, 15 November 2016 14:59:06 UTC+2, Jacob Larfors wrote:
>>
>> Hi Daniel, appreciate the quick feedback and thanks for the info - that 
>> answered another question I had about why the jenkinsci repo even existed.
>>
>> I would prefer to use the jenkinsci repo to avoid any future 
>> issues/bottlenecks. I have made one last attempt at contacting cittools 
>> because we tried contacting the owner of the repository for some time now 
>> (gboissinot) with no luck.
>>
>> Should this not work, is there some way we can push our commits to the 
>> jenkinsci repository and make this the one linked in Jenkins (i.e. make the 
>> cittools repo redundant)? I assume that can be done without needing 
>> cittools, but I will await a response from them out of courtesy.
>>
>> Thanks,
>> Jacob
>>
>> On Tuesday, 15 November 2016 14:46:39 UTC+2, Daniel Beck wrote:
>>>
>>> We cannot grant access to repositories outside the jenkinsci GitHub 
>>> organization. Which is one of the reasons why we strongly recommend that 
>>> plugins be maintained in that organization. 
>>>
>>> We can only grant access to https://github.com/jenkinsci/klocwork-plugin 
>>> and you'd need to sync the existing commits over. This however will not 
>>> transfer existing issues and PRs in the cittools repo. IOW, it's a giant 
>>> clusterfuck thanks to maintainers maintaining elsewhere. 
>>>
>>> I recommend you contact cittools and coordinate what to do with them. I 
>>> can then transfer the repo as needed, and delete the one in jenkinsci that 
>>> appears to have never been used. 
>>>
>>> > On 15.11.2016, at 12:58, Jacob Larfors  wrote: 
>>> > 
>>> > Hi guys, 
>>> > 
>>> > Maybe someone can help me out, but a few weeks back I posted about 
>>> commit access to the Klocwork plugin, following a pull request for a 
>>> colleague, and neither have been answered... We really want to push some 
>>> great features out there but our hands our tied :) 
>>> > 
>>> > If anyone knows how who to contact to get some action or even to apply 
>>> for a transferral of ownership for a plugin that would be great. 
>>> > 
>>> > This is the plugin in question: 
>>> https://github.com/cittools/klocwork-plugin 
>>> > 
>>> > My github account: jlarfors 
>>> > 
>>> > Thanks for the help! 
>>> > 
>>> > Jacob 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Developers" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-de...@googlegroups.com. 
>>> > To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/973c8a41-aac1-4c5f-a76e-5091bb8f3cee%40googlegroups.com.
>>>  
>>>
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/c68b1a50-9e17-458e-9ad2-16eae2095942%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to Add Custom Build Step to behave exactly same as Execute Windows Batch Command.

2016-11-16 Thread Kul Bhushan Srivastava
Thanks Robert.

I am facing maven compilation issue. Saying @DataBoundConstructor cannot be 
used inside abstract class.

Please suggest.

My Java File:

import org.kohsuke.stapler.DataBoundConstructor;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.tasks.Messages;
import hudson.Proc;
import hudson.Util;
import hudson.EnvVars;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.model.Node;
import hudson.model.Result;
import hudson.model.TaskListener;
import hudson.remoting.ChannelClosedException;
import hudson.model.AbstractProject;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import hudson.tasks.CommandInterpreter;
import java.io.IOException;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nonnull;

public abstract class BuildStepCreator extends Builder {

private String text1, text2, text3;

public String getText1(){
return text1;
}
public String getText2(){
return text2;
}
public String getText3(){
return text3;
}


@DataBoundConstructor
public BuildStepCreator(OptionalTextBlock1 enableText1, 
OptionalTextBlock2 enableText2, OptionalTextBlock3 enableText3) {
this.text1 = (enableText1 != null) ? enableText1.text1 : null;
this.text2 = (enableText2 != null) ? enableText2.text2 : null;
this.text3 = (enableText3 != null) ? enableText3.text3 : null;
}

public static class OptionalTextBlock1 {
private String text1;
@DataBoundConstructor
public OptionalTextBlock1(String text1) {
this.text1 = text1;
}
}
public static class OptionalTextBlock2 {
private String text2;
@DataBoundConstructor
public OptionalTextBlock2(String text2) {
this.text2 = text2;
}
}
public static class OptionalTextBlock3 {
private String text3;
@DataBoundConstructor
public OptionalTextBlock3(String text3) {
this.text3 = text3;
}
}

@Extension
public static final class DescriptorImpl extends 
BuildStepDescriptor{

/*public FormValidation doCheckTask(@QueryParameter String value){
try{
if(value.equalsIgnoreCase(null) || 
value.equalsIgnoreCase("")){
return FormValidation.error("Invalid Details.");
}
}catch(Exception e){
return FormValidation.error("Error validating the form 
details.");
}
return FormValidation.ok();
}

public FormValidation doCheckGoal(@QueryParameter String value){
try{
Integer.parseInt(value);
}catch(Exception e){
return FormValidation.error("Please provide integer in the 
Goal.");
}
return FormValidation.ok();
}*/

@Override
public boolean isApplicable(Class 
jobType) {
// TODO Auto-generated method stub
return true;
}

@Override
public String getDisplayName() {
// TODO Auto-generated method stub
return "Job Orchestration";
}
}

/*@Override
public boolean perform(hudson.model.AbstractBuild build, 
hudson.Launcher launcher, hudson.model.BuildListener listener) {
listener.getLogger().println("OptionalBlockSampleBuilder " + text1);
return true;
}*/

@Override
public boolean perform(AbstractBuild build, Launcher launcher, 
BuildListener listener) throws InterruptedException {
return perform(build,launcher,(TaskListener)listener);
}

/**
 * Determines whether a non-zero exit code from the process should 
change the build
 * status to {@link Result#UNSTABLE} instead of default {@link 
Result#FAILURE}.
 *
 * Changing to {@link Result#UNSTABLE} does not abort the build, next 
steps are continued.
 *
 */
protected boolean isErrorlevelForUnstableBuild(int exitCode) {
return false;
}

public boolean perform(AbstractBuild build, Launcher launcher, 
TaskListener listener) throws InterruptedException{
FilePath ws = build.getWorkspace();
if (ws == null) {
Node node = build.getBuiltOn();
if (node == null) {
throw new NullPointerException("no such build node: " + 
build.getBuiltOnStr());
}
throw new NullPointerException("no workspace from node " + node 
+ " which is computer " + node.toComputer() + " and has channel " + 
node.getChannel());
}
FilePath script=null;
int r = -1;
try {
try {
script = createScriptFile(ws);
} catch (IOException e) {
Util.displayIOException(e,listener);

e.printStackTrace(

Re: Cannot deploy to Jenkins Artifactory

2016-11-16 Thread Daniel Beck

> On 16.11.2016, at 12:39, Robert Sandell  wrote:
> 
> There does not seem to be any permissions configured for that plugin
> https://github.com/jenkins-infra/repository-permissions-updater/tree/master/permissions

In fact, there are:
https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-rocketchatnotifier.yml

Also, please note that 401 Unauthorized ≠ 403 Forbidden.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/6437B719-C456-45E8-B17A-72DC39992579%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: How to Add Custom Build Step to behave exactly same as Execute Windows Batch Command.

2016-11-16 Thread Robert Sandell
Here are the classes involved in "execute script" step.

https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/BatchFile.java
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Shell.java
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/CommandInterpreter.java

/B


On Wed, Nov 16, 2016 at 8:41 AM, Kul Bhushan Srivastava 
wrote:

> If anyone can guide how the windows bactch command execution are handled
> from backend JAVA API. Then I may create one of my own.
>
> On Monday, 14 November 2016 13:37:49 UTC+5:30, Kul Bhushan Srivastava
> wrote:
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/76d6ddbf-14a2-405d-8197-f2dd549e8248%
> 40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS26q1XSQc_Bdh%3Dmki4a8Ku%3DbzzsX84fCD2NzB7Vcygaaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot deploy to Jenkins Artifactory

2016-11-16 Thread Robert Sandell
There does not seem to be any permissions configured for that plugin
https://github.com/jenkins-infra/repository-permissions-updater/tree/master/permissions

/B

On Tue, Nov 15, 2016 at 9:53 PM, Rachel Moreno <
raquel.moreno.carm...@gmail.com> wrote:

> Hi Martin,
>
> What do you mean when you say "my settings.xml"? Is that file used by
> Jenkins?
>
> I hope be useful.
>
> Best regards,
> Rachel
>
>
> El sábado, 12 de noviembre de 2016, 15:16:54 (UTC+1), Martin Reinhardt
> escribió:
>>
>> I'm trying to deploy snapshots of my plugin (
>> https://github.com/jenkinsci/rocketchatnotifier-plugin) to Artifactory,
>> but always getting 401 errors:
>>
>>
>> [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ 
>> rocketchatnotifier ---
>> Downloading: 
>> https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/maven-metadata.xml
>> Downloaded: 
>> https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/maven-metadata.xml
>>  (769 B at 0.6 KB/sec)
>> Uploading: 
>> https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/rocketchatnotifier-0.2.2-20161112.135149-2.hpi
>> Uploading: 
>> https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/rocketchatnotifier-0.2.2-20161112.135149-2.pom
>> [INFO] 
>> 
>> [INFO] BUILD FAILURE
>> [INFO] 
>> 
>> [INFO] Total time: 21.366 s
>> [INFO] Finished at: 2016-11-12T14:51:55+01:00
>> [INFO] Final Memory: 50M/874M
>> [INFO] 
>> 
>> [ERROR] Failed to execute goal 
>> org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) 
>> on project rocketchatnotifier: Failed to deploy artifacts: Could not 
>> transfer artifact 
>> org.jenkins-ci.plugins:rocketchatnotifier:hpi:0.2.2-20161112.135149-2 
>> from/to maven.jenkins-ci.org (https://repo.jenkins-ci.org/snapshots/): 
>> Failed to transfer file: 
>> https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/rocketchatnotifier/0.2.2-SNAPSHOT/rocketchatnotifier-0.2.2-20161112.135149-2.hpi.
>>  Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
>> switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions, please 
>> read the following articles:
>> [ERROR] [Help 1] 
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>>
>>
>> I added the server id to my settings.xml and the credentials. I can
>> manual deploy via https://repo.jenkins-ci.org/webapp/.
>>
>> Any idea's what I'm doing wrong?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/a0c73b9c-b26f-4f82-83c3-a4658f9083b4%
> 40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS32zF3gCd35rJwk-uaTrbrsMHSLbmyuYAMWGZHaDGx7AQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: zaproxy-plugin weirdness and request

2016-11-16 Thread Daniel Beck

> On 16.11.2016, at 01:59, JordanGS  wrote:
> 
> Can someone with voice please change the description under 
> https://issues.jenkins-ci.org/ for the component zap-plugin
> 
> jenkins-admin: set description of zap-plugin to "The Official OWASP ZAP 
> Jenkins Plugin extends the functionality of the ZAP security tool into a CI 
> Environment."
> 

We don't really use long descriptions in Jira. If you look to all other 
plugins, they have very short descriptions as well. Not sure whether layout of 
some overview/list page would break, so I'd rather not do this.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/7E51269B-142B-4D1E-9237-9E0C2DCA1131%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.