Re: Jenkins URL is not loading::java.lang.AssertionError: InstanceIdentity is missing its singleton

2019-04-02 Thread Kalpesh Jain
I tried but not working same

On Wed, Apr 3, 2019 at 8:29 AM Ajay Sharma  wrote:

> On Monday, April 1, 2019 at 10:17:05 PM UTC+5:30, Kalpesh Jain wrote:
> > Jenkins URL is not loading..
> >
> >
> > after login with initial admin password
> >
> >
> >
> >
> > Logs:
> >
> > Apr 01, 2019 7:41:35 AM
> jenkins.model.identity.InstanceIdentityProvider$KeyTypes get
> > INFO: Encountered an error while consulting instance identity provider
> org.jenkinsci.main.modules.instance_identity.InstanceIdentityRSAProvider@533fc42e
> > java.lang.AssertionError: InstanceIdentity is missing its singleton
> > at
> org.jenkinsci.main.modules.instance_identity.InstanceIdentity.get(InstanceIdentity.java:133)
> > at
> org.jenkinsci.main.modules.instance_identity.InstanceIdentityRSAProvider.getKeyPair(InstanceIdentityRSAProvider.java:23)
> > at
> jenkins.model.identity.InstanceIdentityProvider$KeyTypes.get(InstanceIdentityProvider.java:157)
> > at
> jenkins.model.identity.InstanceIdentityProvider$KeyTypes.getKeyPair(InstanceIdentityProvider.java:206)
> > at
> jenkins.model.identity.IdentityRootAction.getUrlName(IdentityRootAction.java:42)
> > at
> jenkins.model.Jenkins.getUnprotectedRootActions(Jenkins.java:4755)
> > at
> jenkins.model.Jenkins.isSubjectToMandatoryReadPermissionCheck(Jenkins.java:4727)
> > at jenkins.model.Jenkins.getTarget(Jenkins.java:4705)
>
> Try to change Admin password. It will work
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/d3fa5996-c87b-4ad3-b027-8133e3630d25%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Thanks and Regards,
*Kalpesh Jain*
*+91-8983390054*

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


Re: Jenkins URL is not loading::java.lang.AssertionError: InstanceIdentity is missing its singleton

2019-04-02 Thread Ajay Sharma
On Monday, April 1, 2019 at 10:17:05 PM UTC+5:30, Kalpesh Jain wrote:
> Jenkins URL is not loading..
> 
> 
> after login with initial admin password
> 
> 
> 
> 
> Logs:
> 
> Apr 01, 2019 7:41:35 AM 
> jenkins.model.identity.InstanceIdentityProvider$KeyTypes get
> INFO: Encountered an error while consulting instance identity provider 
> org.jenkinsci.main.modules.instance_identity.InstanceIdentityRSAProvider@533fc42e
> java.lang.AssertionError: InstanceIdentity is missing its singleton
>         at 
> org.jenkinsci.main.modules.instance_identity.InstanceIdentity.get(InstanceIdentity.java:133)
>         at 
> org.jenkinsci.main.modules.instance_identity.InstanceIdentityRSAProvider.getKeyPair(InstanceIdentityRSAProvider.java:23)
>         at 
> jenkins.model.identity.InstanceIdentityProvider$KeyTypes.get(InstanceIdentityProvider.java:157)
>         at 
> jenkins.model.identity.InstanceIdentityProvider$KeyTypes.getKeyPair(InstanceIdentityProvider.java:206)
>         at 
> jenkins.model.identity.IdentityRootAction.getUrlName(IdentityRootAction.java:42)
>         at jenkins.model.Jenkins.getUnprotectedRootActions(Jenkins.java:4755)
>         at 
> jenkins.model.Jenkins.isSubjectToMandatoryReadPermissionCheck(Jenkins.java:4727)
>         at jenkins.model.Jenkins.getTarget(Jenkins.java:4705)

Try to change Admin password. It will work

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d3fa5996-c87b-4ad3-b027-8133e3630d25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Groovy code to upload JAR to JFROG artifactory

2019-04-02 Thread Ajay Sharma
I was looking for GROOVY code to upload .jar file to JFROG artifactory.

I tried this one, but it doesn't uploads
jfrog rt upload *.jar https://artifactory/artifactory

Please suggest me a solution.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/38b0aaa9-70fd-4901-987b-555d0a2454e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with cfnValidate() error in pipeline?

2019-04-02 Thread ZillaYT
I wanted to add, if I validate the file via AWS CLI (aws cloudformation 
validate-template --document file://my_template.yaml) it passes.

On Tuesday, April 2, 2019 at 7:51:48 PM UTC-4, ZillaYT wrote:
>
> We use Jenkins pipeline, and use AWS plugins that has a cfnValidate() API 
> https://jenkins.io/doc/pipeline/steps/pipeline-aws/. When I run it on my 
> Cloudformation template,
>
> AWSTemplateFormatVersion: '2010-09-09'
> Parameters: 
>   AlbName: 
> Type: String 
> Description: 'Parameter to override ALB name' 
> Default: '' 
>   RedirectUrl: 
> Type: String 
> Description: 'URL to redirect traffic to' 
> Default: '' 
>   SslCertificateArn: 
> Type: String 
> Description: 'SSL certificate ARN' 
> Default: '' 
>   VPCStackNameParameter: 
> Type: String 
> Description: 'CloudFormation stack name of the VPC' 
> Default: 'ProductionVPC' 
>
> Conditions: 
>   ProdEnvironment: 
> !Equals [ !Ref VPCStackNameParameter, 'ProductionVPC' ] 
>   CertExists: 
> !Not [!Equals [!Ref SslCertificateArn, ""]]
>
> Resources:
>   Alb:
> Type: AWS::ElasticLoadBalancingV2::LoadBalancer
> Condition: CertExists
> Properties:
>   Name: !Ref AlbName
>   Scheme: 'internet-facing'
>   IpAddressType: 'ipv4'
>   SecurityGroups:
> -
>   Fn::ImportValue:
> !Sub "${VPCStackNameParameter}-ELBSGID"
>   Subnets:
> -
>   Fn::ImportValue:
> !Sub "${VPCStackNameParameter}-SubnetPublic1ID"
> -
>   Fn::ImportValue:
> !Sub "${VPCStackNameParameter}-SubnetPublic2ID"
>
>   LoadBalancerAttributes:
> - Key: idle_timeout.timeout_seconds
>   Value: '240'
>   Tags:
> -
>   Key: Name
>   Value: !Sub "${AWS::StackName}-lb"
> -
>   Key: Product
>   Value: "Zift"
>
>  
>
>
> I get
>
>
> com.amazonaws.services.cloudformation.model.AmazonCloudFormationException: 
> Template format error: Every Condition member must be a string. (Service: 
> AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request 
> ID: f6f203b9-5593-11e9-833d-1d475e1ca17e) at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1632)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1058)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
>  at 
> com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
>  at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) at 
> com.amazonaws.services.cloudformation.AmazonCloudFormationClient.doInvoke(AmazonCloudFormationClient.java:2733)
>  at 
> com.amazonaws.services.cloudformation.AmazonCloudFormationClient.invoke(AmazonCloudFormationClient.java:2709)
>  at 
> com.amazonaws.services.cloudformation.AmazonCloudFormationClient.executeValidateTemplate(AmazonCloudFormationClient.java:2673)
>  at 
> com.amazonaws.services.cloudformation.AmazonCloudFormationClient.validateTemplate(AmazonCloudFormationClient.java:2648)
>  at 
> de.taimos.pipeline.aws.cloudformation.CFNValidateStep$Execution$1.run(CFNValidateStep.java:141)
>  Finished: FAILURE
>
>
>
>
> What gives?
>
>

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


Help with cfnValidate() error in pipeline?

2019-04-02 Thread ZillaYT
We use Jenkins pipeline, and use AWS plugins that has a cfnValidate() API 
https://jenkins.io/doc/pipeline/steps/pipeline-aws/. When I run it on my 
Cloudformation template,

AWSTemplateFormatVersion: '2010-09-09'
Parameters: 
  AlbName: 
Type: String 
Description: 'Parameter to override ALB name' 
Default: '' 
  RedirectUrl: 
Type: String 
Description: 'URL to redirect traffic to' 
Default: '' 
  SslCertificateArn: 
Type: String 
Description: 'SSL certificate ARN' 
Default: '' 
  VPCStackNameParameter: 
Type: String 
Description: 'CloudFormation stack name of the VPC' 
Default: 'ProductionVPC' 

Conditions: 
  ProdEnvironment: 
!Equals [ !Ref VPCStackNameParameter, 'ProductionVPC' ] 
  CertExists: 
!Not [!Equals [!Ref SslCertificateArn, ""]]

Resources:
  Alb:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Condition: CertExists
Properties:
  Name: !Ref AlbName
  Scheme: 'internet-facing'
  IpAddressType: 'ipv4'
  SecurityGroups:
-
  Fn::ImportValue:
!Sub "${VPCStackNameParameter}-ELBSGID"
  Subnets:
-
  Fn::ImportValue:
!Sub "${VPCStackNameParameter}-SubnetPublic1ID"
-
  Fn::ImportValue:
!Sub "${VPCStackNameParameter}-SubnetPublic2ID"

  LoadBalancerAttributes:
- Key: idle_timeout.timeout_seconds
  Value: '240'
  Tags:
-
  Key: Name
  Value: !Sub "${AWS::StackName}-lb"
-
  Key: Product
  Value: "Zift"

 


I get


com.amazonaws.services.cloudformation.model.AmazonCloudFormationException: 
Template format error: Every Condition member must be a string. (Service: 
AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request 
ID: f6f203b9-5593-11e9-833d-1d475e1ca17e) at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1632)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1058)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
 at 
com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
 at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) at 
com.amazonaws.services.cloudformation.AmazonCloudFormationClient.doInvoke(AmazonCloudFormationClient.java:2733)
 at 
com.amazonaws.services.cloudformation.AmazonCloudFormationClient.invoke(AmazonCloudFormationClient.java:2709)
 at 
com.amazonaws.services.cloudformation.AmazonCloudFormationClient.executeValidateTemplate(AmazonCloudFormationClient.java:2673)
 at 
com.amazonaws.services.cloudformation.AmazonCloudFormationClient.validateTemplate(AmazonCloudFormationClient.java:2648)
 at 
de.taimos.pipeline.aws.cloudformation.CFNValidateStep$Execution$1.run(CFNValidateStep.java:141)
 Finished: FAILURE




What gives?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1d2825fe-ca64-4678-b73f-d3781db63250%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


nvm wrapper plugin and a higher version of npm

2019-04-02 Thread Ronneil Camara
We're using this code to add NodeJS via NVM. The value that we have in 
DEFAULT_NODEJS_VERSION is 6. 

def addNVM(def nvmversion=DEFAULT_NODEJS_VERSION){
this.job.with {
configure { project ->
project / buildWrappers << 
'org.jenkinsci.plugins.nvm.NvmWrapper' {
version(nvmversion)
}
}
}
return this
}

When NodeJS version 6 is installed, the default npm version that is 
installed is 3.10.x. Unfortunately, we need npm version 5 or higher. Is 
there a way to also upgrade npm to 5 or higher using the code above?
We don't want to tell our hundreds of users to add an "Execute Shell" to 
run "npm install -g npm@latest" since we have thousand of jobs. However, if 
it can be done in the groovy since we build our jenkins slave from time to 
time, that would be awesome.

Thanks!

Neil

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ddbc73c3-1261-4e2d-9a89-173f4d4fd85b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH Slave crashing immediately after start

2019-04-02 Thread Ivan Fernandez Calvo
Also check the agent working directory you should have log files and perhaps 
some error_pid files

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/bda05b01-aa40-4561-8d25-fcbf67330b2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH Slave crashing immediately after start

2019-04-02 Thread Ivan Fernandez Calvo
I never used selenium grid plugin, but maybe 128MB it is too right, try larger 
(512 or 256) values and decrease it to the minimum that works in a stable way

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8d5ecc2d-a58b-46a2-9ede-fdb8d385ff12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH Slave crashing immediately after start

2019-04-02 Thread Ivan Fernandez Calvo
It is not the same kind of issue, in you case it failed to copy a file to you 
agent, check that you have disk space on the agent in the path /var/jenkins, 
check if that path exists, check that the user used by Jenkins to connect has 
permissions on that folder, check the folder is writable

Failed to copy 
/var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-3.12.0.jar
 to /var/jenkins/selenium-server-standalone-3.12.0.jar

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b54a8ff5-f787-4673-a7d1-07c0a47a49ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Two builds for PRs

2019-04-02 Thread Mark Waite
I have the Basic Branch Build Strategies plugin installed in my
environment.  That seems like a worthwhile exploration to see if that
provides the desired behavior.

On Tue, Apr 2, 2019 at 12:59 PM Tom Duerr  wrote:

> A timing problem is an interesting idea but this problem seems constant.
> If its timing related, I would expect some inconsistent behaviors but you
> never can tell.
> We're using self-hosted GitHub Enterprise and sometimes it is laggy.
>
> Mark,
> Thanks, I may take you on that offer but I'm goint to try one more thing
> first. Slide has suggested that I install the "Basic Branch Build" plugin.
> Going to give that a shot.
>
> Thanks again for all your help.
> Tom
>
>
>
>
> On Tue, Apr 2, 2019 at 12:08 AM 'Björn Pedersen' via Jenkins Users <
> jenkinsci-users@googlegroups.com> wrote:
>
>> Hi,
>>
>> a wild guess: Is this a timing problem? So the push to branch gets build
>> before the pull request is filed?
>>
>>push to (new) branch
>> --->   build 1 triggered
>>  --> file PR
>>---> build 2 triggers
>>
>>
>>
>>
>> ???
>>
>> Am Dienstag, 2. April 2019 04:21:29 UTC+2 schrieb Mark Waite:
>>>
>>> Unfortunately, I can't duplicate the problem.
>>>
>>> I created a Multibranch Pipeline using
>>> https://bitbucket.org/markewaite/jenkins-bugs/src/master/ as the
>>> Bitbucket repository and using Bitbucket branch source cloning the
>>> repository over https.  The repository is not a fork and has two pull
>>> requests.  When I configure the Multibranch Pipeline job to 'Exclude
>>> branches that are also filed as PRs', it correctly excludes the two
>>> branches that are also filed as pull requests.  When I switch it to include
>>> only branches that are filed as PRs, it also behaves as expected.
>>>
>>> Sorry, I don't have other ideas to offer.  If you'd like to perform a
>>> detailed comparison between your configuration and mine, I'd be willing to
>>> temporarily grant you access to my Jenkins server.  Send me a private
>>> e-mail if you'd like that access.
>>>
>>> Mark Waite
>>>
>>>  On Mon, Apr 1, 2019 at 2:56 PM Tom Duerr wrote:
>>>
 Hi,

 Ive updated core Jenkins to 2.150.3 and updated quite a few of the
 pipeline plugins.
 Here is the current list:
 https://pastebin.com/Maf6iuvQ

 We're still getting two PRs for each PR created from the origin and not
 a fork.

 I was going to try Slide's advice about filtering on branches but now
 that config option
 indicates that its been deprecated. Not sure where to configure the
 "Named Branch" plugin.
 https://imgur.com/a/smnC98S


 Other thoughts?

 Thanks,
 Tom


 On Friday, March 29, 2019 at 10:55:04 AM UTC-7, Tom Duerr wrote:
>
> I will update the pipleline related plugins this weekend and maybe
> upgrade Jenkins (currently at 2.138 ).
> I will report back with results.
>
> Thanks for the help.
>
> On Thu, Mar 28, 2019 at 5:29 PM Mark Waite wrote:
>
>>
>>
>> On Thu, Mar 28, 2019 at 6:22 PM Tom Duerr wrote:
>>
>>> Mark,
>>> The issue only happens when the PR is NOT against a fork.  Its been
>>> difficult to debug since most of our developers
>>> use their own forks.
>>>
>>
>> I think that is the same condition I'm using with the git client
>> plugin multibranch configuration that I'm using.
>>
>>
>>> I think I'm behind on most of the Pipeline related plugins except
>>> for the branch-source plugin. I had attempted a big
>>> upgrade of plugins last week that ended badly. Going to retry this
>>> weekend.
>>>
>>> What is the "Jenkins multibranch folder" ? I don't think we're
>>> actively using the multibranch plugin. Its unclear to me if we need
>>> that plugin or not if we're already using the branch-source plugin.
>>> The branch-source plugin seems to do everything we need
>>> to do. I think we will eventually want to use the multibranch plugin
>>> to provide different behaviors between a dev, qa or master branch.
>>> Assuming I actually understand how that plugin works.
>>>
>>>
>> I should have been more clear.  If you're using the GitHub branch
>> source plugin to define the job, then you're creating a multibranch job.
>> The multibranch job is represented as a folder which contains one job for
>> each branch in the repository.  The containing folder is what I called 
>> the
>> "Jenkins multibranch folder".  No other plugin is needed.
>>
>> Mark Waite
>>
>> Tom
>>>
>>>
>>>
>>> On Thu, Mar 28, 2019 at 5:11 PM Mark Waite wrote:
>>>
 That's quite surprising, since my PR evaluation for the git client
 plugin on my own fork is running with GitHub and is only showing the
 'pr-merge' job.

 Is the second job visible when executing in the Jenkins m

Re: Two builds for PRs

2019-04-02 Thread Tom Duerr
A timing problem is an interesting idea but this problem seems constant. If
its timing related, I would expect some inconsistent behaviors but you
never can tell.
We're using self-hosted GitHub Enterprise and sometimes it is laggy.

Mark,
Thanks, I may take you on that offer but I'm goint to try one more thing
first. Slide has suggested that I install the "Basic Branch Build" plugin.
Going to give that a shot.

Thanks again for all your help.
Tom




On Tue, Apr 2, 2019 at 12:08 AM 'Björn Pedersen' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Hi,
>
> a wild guess: Is this a timing problem? So the push to branch gets build
> before the pull request is filed?
>
>push to (new) branch
> --->   build 1 triggered
>  --> file PR
>---> build 2 triggers
>
>
>
>
> ???
>
> Am Dienstag, 2. April 2019 04:21:29 UTC+2 schrieb Mark Waite:
>>
>> Unfortunately, I can't duplicate the problem.
>>
>> I created a Multibranch Pipeline using
>> https://bitbucket.org/markewaite/jenkins-bugs/src/master/ as the
>> Bitbucket repository and using Bitbucket branch source cloning the
>> repository over https.  The repository is not a fork and has two pull
>> requests.  When I configure the Multibranch Pipeline job to 'Exclude
>> branches that are also filed as PRs', it correctly excludes the two
>> branches that are also filed as pull requests.  When I switch it to include
>> only branches that are filed as PRs, it also behaves as expected.
>>
>> Sorry, I don't have other ideas to offer.  If you'd like to perform a
>> detailed comparison between your configuration and mine, I'd be willing to
>> temporarily grant you access to my Jenkins server.  Send me a private
>> e-mail if you'd like that access.
>>
>> Mark Waite
>>
>>  On Mon, Apr 1, 2019 at 2:56 PM Tom Duerr wrote:
>>
>>> Hi,
>>>
>>> Ive updated core Jenkins to 2.150.3 and updated quite a few of the
>>> pipeline plugins.
>>> Here is the current list:
>>> https://pastebin.com/Maf6iuvQ
>>>
>>> We're still getting two PRs for each PR created from the origin and not
>>> a fork.
>>>
>>> I was going to try Slide's advice about filtering on branches but now
>>> that config option
>>> indicates that its been deprecated. Not sure where to configure the
>>> "Named Branch" plugin.
>>> https://imgur.com/a/smnC98S
>>>
>>>
>>> Other thoughts?
>>>
>>> Thanks,
>>> Tom
>>>
>>>
>>> On Friday, March 29, 2019 at 10:55:04 AM UTC-7, Tom Duerr wrote:

 I will update the pipleline related plugins this weekend and maybe
 upgrade Jenkins (currently at 2.138 ).
 I will report back with results.

 Thanks for the help.

 On Thu, Mar 28, 2019 at 5:29 PM Mark Waite wrote:

>
>
> On Thu, Mar 28, 2019 at 6:22 PM Tom Duerr wrote:
>
>> Mark,
>> The issue only happens when the PR is NOT against a fork.  Its been
>> difficult to debug since most of our developers
>> use their own forks.
>>
>
> I think that is the same condition I'm using with the git client
> plugin multibranch configuration that I'm using.
>
>
>> I think I'm behind on most of the Pipeline related plugins except for
>> the branch-source plugin. I had attempted a big
>> upgrade of plugins last week that ended badly. Going to retry this
>> weekend.
>>
>> What is the "Jenkins multibranch folder" ? I don't think we're
>> actively using the multibranch plugin. Its unclear to me if we need
>> that plugin or not if we're already using the branch-source plugin.
>> The branch-source plugin seems to do everything we need
>> to do. I think we will eventually want to use the multibranch plugin
>> to provide different behaviors between a dev, qa or master branch.
>> Assuming I actually understand how that plugin works.
>>
>>
> I should have been more clear.  If you're using the GitHub branch
> source plugin to define the job, then you're creating a multibranch job.
> The multibranch job is represented as a folder which contains one job for
> each branch in the repository.  The containing folder is what I called the
> "Jenkins multibranch folder".  No other plugin is needed.
>
> Mark Waite
>
> Tom
>>
>>
>>
>> On Thu, Mar 28, 2019 at 5:11 PM Mark Waite wrote:
>>
>>> That's quite surprising, since my PR evaluation for the git client
>>> plugin on my own fork is running with GitHub and is only showing the
>>> 'pr-merge' job.
>>>
>>> Is the second job visible when executing in the Jenkins multibranch
>>> folder?  If so, then I'm puzzled, because you're seeing something that 
>>> I'm
>>> not seeing.
>>>
>>> Are you running the most recent versions of the various plugins?
>>>
>>> Mark Waite
>>>
>>> On Thu, Mar 28, 2019 at 6:06 PM Tom Duerr wrote:
>>>
 Mark,
 I already have the "Exclude branches that are

Jenkins Declarative Pipeline Error : OCI runtime exec failed

2019-04-02 Thread Christophe Pruvost
Hi all,
I have a declarative pipeline like below and I got an error at the stage 
'Build Docker Image'

OCI runtime exec failed: exec failed: container_linux.go:348: starting 
container process caused "chdir to cwd 
(\"/opt/bitnami/apps/jenkins/jenkins_home/workspace/AtpDemo2@2/docker\") 
set in config.json failed: no such file or directory": unknown
Aborted by Christophe PruvostSending interrupt signal to process

pipeline {
   
agent {
docker {
image 'cpruvost/infraascode:latest'
args '-u root:root'
}
}

stages {
stage('Display User Name') {
..
}
   
stage('Check Infra As Code Tools') {
  ..
   }

   ...
 
  //cause I do not want to use docker in docker
  stage('Docker Build Application Image') {
agent any

steps {
dir ('./docker') {
script {
sh 'whoami'
sh 'pwd'
sh 'ls'
sh 'docker --version'
}
}
}
}
}

Sure I did something wrong so tell me please
ty for all


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f9a297b4-86fb-484a-859a-f9c78ebcd463%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is it possible not to send anything to GitHub when i cancel the job?

2019-04-02 Thread Alexander Lanin
Hi!
Jenkins 2.169 from container.
How to configure Jenkins not to send "Failed" status to the Github if i 
cancel the running job manually?

Thank.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2602058e-b1b5-4aa2-8574-3a188f838fbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using kubernetes-credentials-provider plugin for login credentials?

2019-04-02 Thread Marcello Romani
I have a Jenkins instance running on a K8s cluster.

I have installed it via helm (stable/jenkins) and was wondering if it was 
possible to use this plugin

https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/

to also manage users in addition to credentials.

For example, one would add a K8s secret of type username/password and could 
then user those values to log into the Jenkins UI.

Marcello

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/82432de5-8675-46e4-9e1d-e084473b2532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH Slave crashing immediately after start

2019-04-02 Thread yoyulian2013

Note:  The user with which make ssh have the rights on that folders 
Java Version: On Master(where is the hub) is: openjdk version "1.8.0_191"
and on Slave: java version "1.8.0_191"

On Tuesday, June 13, 2017 at 11:05:40 PM UTC+3, Peter Berghold wrote:
>
> I'm trying to re-establish connectivity to an SSH slave that used to work 
> when I was running a much older version of Jenkins.  Currently I'm using 
> v2.65. What I'm seeing (somewhat trimmed) in the log is the following:
>
> [06/13/17 20:04:05] [SSH] Checking java version of java
> [06/13/17 20:04:05] [SSH] java -version returned 1.7.0_75.
> [06/13/17 20:04:05] [SSH] Starting sftp client.
> [06/13/17 20:04:05] [SSH] Copying latest slave.jar...
> [06/13/17 20:04:05] [SSH] Copied 719,269 bytes.
> Expanded the channel window size to 4MB
> [06/13/17 20:04:05] [SSH] Starting slave process: cd "/data/jenkins-slave" && 
> java  -jar slave.jar
> <===[JENKINS REMOTING CAPACITY]===>channel started
> Slave JVM has not reported exit code. Is it still running?
> [06/13/17 20:04:09] Launch failed - cleaning up connection
> [06/13/17 20:04:09] [SSH] Connection closed.
> ERROR: Connection terminated
> java.io.EOFException
>   at 
> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353)
>   at 
> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
>   at 
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
>   at java.io.ObjectInputStream.(ObjectInputStream.java:301)
>   at 
> hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)
>   at 
> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
> Caused: java.io.IOException: Unexpected termination of the channel
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
>
>
> At a loss...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/962ab14c-b7d4-4d02-a6d1-5ed56f74347c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SSH Slave crashing immediately after start

2019-04-02 Thread yoyulian2013
Hi guys,  
 I have the same problem on Jenkins ver. 2.164.1 , 
Selenium Grid 3.12.0 and when start the slave in console will throw me this 
error:



Expanded the channel window size to 4MB
[04/02/19 09:05:15] [SSH] Starting slave process: cd "/var/jenkins" && 
/usr/lib/jvm/jdk1.8.0_191/bin/java -Xmx128m -Xms128m -jar slave.jar

<===[JENKINS REMOTING CAPACITY]===>channel started
Remoting version: 3.29
This is a Unix agent
Evacuated stdout
Starting Selenium nodes on automation-jenkins-node

Apr 02, 2019 9:05:17 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
WARNING: Attempt to (de-)serialize anonymous class 
hudson.plugins.selenium.configuration.DirectJsonInputConfiguration$1; see: 
https://jenkins.io/redirect/serialization-of-anonymous-classes/

hudson.util.IOException2: Slave JVM has not reported exit code. Is it still 
running?
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:984)
at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:137)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:725)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to copy 
/var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-3.12.0.jar
 to /var/jenkins/selenium-server-standalone-3.12.0.jar
at hudson.FilePath.copyTo(FilePath.java:2191)


Could someone help me? 

Thank you!



On Tuesday, June 13, 2017 at 11:05:40 PM UTC+3, Peter Berghold wrote:
>
> I'm trying to re-establish connectivity to an SSH slave that used to work 
> when I was running a much older version of Jenkins.  Currently I'm using 
> v2.65. What I'm seeing (somewhat trimmed) in the log is the following:
>
> [06/13/17 20:04:05] [SSH] Checking java version of java
> [06/13/17 20:04:05] [SSH] java -version returned 1.7.0_75.
> [06/13/17 20:04:05] [SSH] Starting sftp client.
> [06/13/17 20:04:05] [SSH] Copying latest slave.jar...
> [06/13/17 20:04:05] [SSH] Copied 719,269 bytes.
> Expanded the channel window size to 4MB
> [06/13/17 20:04:05] [SSH] Starting slave process: cd "/data/jenkins-slave" && 
> java  -jar slave.jar
> <===[JENKINS REMOTING CAPACITY]===>channel started
> Slave JVM has not reported exit code. Is it still running?
> [06/13/17 20:04:09] Launch failed - cleaning up connection
> [06/13/17 20:04:09] [SSH] Connection closed.
> ERROR: Connection terminated
> java.io.EOFException
>   at 
> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353)
>   at 
> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
>   at 
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
>   at java.io.ObjectInputStream.(ObjectInputStream.java:301)
>   at 
> hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)
>   at 
> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
> Caused: java.io.IOException: Unexpected termination of the channel
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
>
>
> At a loss...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5c965224-776f-4d5e-8a29-80139e901c63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "[Multijob] - [ERROR] - Problems occurs on injecting env. vars as a build step: Java heap space", does anyone know, what we can do about it?

2019-04-02 Thread Aaron Digulla
On Friday, March 29, 2019 at 2:29:35 PM UTC+1, Nico van de Kamp wrote:

I see now this error "[Multijob] - [ERROR] - Problems occurs on injecting 
> env. vars as a build step: Java heap space" and I've been searching on the 
> internet but till now, I do not find a solution to resolve this issue? Also 
> the other team members have searching for a solution. I know what the heap 
> means for Java.
>
> What my colleague already have done is:
>
>- Jenkins.xml: Xrs -Xms8192M Xrs -Xmx8192M -Xss64M 
>-XX:MaxPermSize=512M -jar "%BASE%\slave.jar" -jnlpUrl http://... 
>-secret xxx
>
>
Note: MaxPermSize is unrelated to the problem and not used with Java 8 
anymore. In fact, you should see a warning in the logs: 
https://stackoverflow.com/questions/18339707/permgen-elimination-in-jdk-8

-Xms8192M allocates 8 GB of memory right from the start. This can help with 
performance. At least, it makes sure that the OS can allocate this much 
memory before it starts the slave. This eliminates one OOM candidate where 
you've configured Java for enough memory but the OS simply doesn't have it.

-Xmx8192M should fix your problem unless

1. it's not used. Look at the process table of the slave when the job is 
running to make sure the option was picked up (it should be but checking is 
better than believing).
2. you have a huge memory leak. If it always stops at this point, then 
check the environment variables. Maybe someone was "clever" and tried to 
put a huge amount of data into an environment variable.


>- Searching the internet to find if someone else has also this problem
>
>
This doesn't work because every memory leak is different. You will have to 
understand your own code, how your configured Jenkins and how everything 
works.

Use a memory profiler like YourKit or or try to disable things until the 
error goes away.

Regards,

Aaron Digulla

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e72fb5b4-5346-497a-838a-a5c962208da0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Two builds for PRs

2019-04-02 Thread 'Björn Pedersen' via Jenkins Users
Hi,

a wild guess: Is this a timing problem? So the push to branch gets build 
before the pull request is filed? 

   push to (new) branch
--->   build 1 triggered
 --> file PR
   ---> build 2 triggers 




???

Am Dienstag, 2. April 2019 04:21:29 UTC+2 schrieb Mark Waite:
>
> Unfortunately, I can't duplicate the problem.
>
> I created a Multibranch Pipeline using 
> https://bitbucket.org/markewaite/jenkins-bugs/src/master/ as the 
> Bitbucket repository and using Bitbucket branch source cloning the 
> repository over https.  The repository is not a fork and has two pull 
> requests.  When I configure the Multibranch Pipeline job to 'Exclude 
> branches that are also filed as PRs', it correctly excludes the two 
> branches that are also filed as pull requests.  When I switch it to include 
> only branches that are filed as PRs, it also behaves as expected.
>
> Sorry, I don't have other ideas to offer.  If you'd like to perform a 
> detailed comparison between your configuration and mine, I'd be willing to 
> temporarily grant you access to my Jenkins server.  Send me a private 
> e-mail if you'd like that access.
>
> Mark Waite
>
>  On Mon, Apr 1, 2019 at 2:56 PM Tom Duerr wrote:
>
>> Hi,
>>
>> Ive updated core Jenkins to 2.150.3 and updated quite a few of the 
>> pipeline plugins.
>> Here is the current list:
>> https://pastebin.com/Maf6iuvQ
>>
>> We're still getting two PRs for each PR created from the origin and not a 
>> fork.
>>
>> I was going to try Slide's advice about filtering on branches but now 
>> that config option
>> indicates that its been deprecated. Not sure where to configure the 
>> "Named Branch" plugin.
>> https://imgur.com/a/smnC98S
>>
>>
>> Other thoughts?
>>
>> Thanks,
>> Tom
>>
>>
>> On Friday, March 29, 2019 at 10:55:04 AM UTC-7, Tom Duerr wrote:
>>>
>>> I will update the pipleline related plugins this weekend and maybe 
>>> upgrade Jenkins (currently at 2.138 ).  
>>> I will report back with results.
>>>
>>> Thanks for the help.
>>>
>>> On Thu, Mar 28, 2019 at 5:29 PM Mark Waite wrote:
>>>


 On Thu, Mar 28, 2019 at 6:22 PM Tom Duerr wrote:

> Mark,
> The issue only happens when the PR is NOT against a fork.  Its been 
> difficult to debug since most of our developers
> use their own forks. 
>

 I think that is the same condition I'm using with the git client plugin 
 multibranch configuration that I'm using.
  

> I think I'm behind on most of the Pipeline related plugins except for 
> the branch-source plugin. I had attempted a big
> upgrade of plugins last week that ended badly. Going to retry this 
> weekend. 
>
> What is the "Jenkins multibranch folder" ? I don't think we're 
> actively using the multibranch plugin. Its unclear to me if we need
> that plugin or not if we're already using the branch-source plugin. 
> The branch-source plugin seems to do everything we need
> to do. I think we will eventually want to use the multibranch plugin 
> to provide different behaviors between a dev, qa or master branch.
> Assuming I actually understand how that plugin works.
>
>
 I should have been more clear.  If you're using the GitHub branch 
 source plugin to define the job, then you're creating a multibranch job.  
 The multibranch job is represented as a folder which contains one job for 
 each branch in the repository.  The containing folder is what I called the 
 "Jenkins multibranch folder".  No other plugin is needed.
  
 Mark Waite

 Tom
>
>
>
> On Thu, Mar 28, 2019 at 5:11 PM Mark Waite wrote:
>
>> That's quite surprising, since my PR evaluation for the git client 
>> plugin on my own fork is running with GitHub and is only showing the 
>> 'pr-merge' job.
>>
>> Is the second job visible when executing in the Jenkins multibranch 
>> folder?  If so, then I'm puzzled, because you're seeing something that 
>> I'm 
>> not seeing.
>>
>> Are you running the most recent versions of the various plugins?
>>
>> Mark Waite
>>
>> On Thu, Mar 28, 2019 at 6:06 PM Tom Duerr wrote:
>>
>>> Mark, 
>>> I already have the "Exclude branches that are also filed as PRs" 
>>> set. 
>>> Guess that's part of my confusion.
>>>
>>> On Thu, Mar 28, 2019 at 4:58 PM Mark Waite wrote:
>>>
 It might also work to filter branches based on the branch name at 
 some level, but that's more complicated that changing the "Discover 
 branches" setting in the plugin.

 Picture looks like this:

 [image: image.png]

 On Thu, Mar 28, 2019 at 5:22 PM Slide wrote:

> This would generally be the branch filter parameter wouldn't it? 
> You'd want to filter on the pr-* and master braches
>
> On