Re: Jenkins List Files of Git Branch

2019-10-11 Thread Ajay Sharma
Hi Mark, Let me check for the GITHUB REST API's. Thanks for the reply. 


On Saturday, October 12, 2019 at 4:12:14 AM UTC+5:30, Mark Waite wrote:
>
> The git ls-remote command is not allowed to list remote files, only remote 
> references (branches and tags).
>
> Git providers (GitHub, Bitbucket, Gitea, Assembla, Beanstalk, Gitlab, 
> etc.) generally provide one or more REST API's that will list remote files 
> in a branch.
>
> On Thursday, October 10, 2019 at 11:37:34 PM UTC-8, Ajay Sharma wrote:
>>
>> Hi Everyone, Good Morning.
>>
>> Request any ones help to List All FILES from the GIT BRANCH.  
>> I am trying to first list Branches of a GIT REPO, then list the files of 
>> the BRANCH. 
>>
>> I am facing problem while listing files of the BRANCH. 
>>
>> I have used this code List files Of the GIT REPO with   *Extended Choice 
>> Parameter*. 
>>
>> def gettags = ("git ls-remote -t -h 
>> http://pramod:username.password@10.112.78.152/pramod/automaticjobs.git
>> ").execute()
>> return gettags.text.readLines().collect { 
>>   it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
>> '').replaceAll("\\^\\{\\}", '')
>> }
>>
>> BUT this code is not working for Listing the Files of the GIT BRANCH. 
>>
>> def gettags = ("git ls-remote -t -h 
>> http://pramod:usernamepassword@10.112.78.152/pramod/automaticjobs.git -r 
>> {env.Branches}").execute()
>> return gettags.text.readLines().collect { 
>>   it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
>> '').replaceAll("\\^\\{\\}", '')
>> }
>>
>>
>>
>>

-- 
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/cad6371c-2015-4d34-a9ba-d852d9259197%40googlegroups.com.


Is there a yaml checker/sanitizer for Jenkins pipeline jobs?

2019-10-11 Thread Tony C

We have a lot of Jenkins jobs that fail due to ill-formed yaml.
Unfortunately, These often throw useless Java exceptions that are 
meaningless.

I would like to invoke a yaml checker/sanitizer on that yaml, BEFORE 
Jenkins starts parsing it.

Does anyone know if a Plugin exists, or if there is another way to validate 
YAML before it is parsed?
I've noticed that copying and pasting yaml from a text file into the 
Pipeline file can also cause the yaml to be ill-formed, so
we need to catch that and display a useful error message, instead of a 
useless Java exception.

I can't believe that Jenkins is so fragile that it crashes due to bad yaml.

-- 
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/06074b3c-d451-4f83-aed3-19e7e69dd751%40googlegroups.com.


Re: Jenkins List Files of Git Branch

2019-10-11 Thread Mark Waite
The git ls-remote command is not allowed to list remote files, only remote 
references (branches and tags).

Git providers (GitHub, Bitbucket, Gitea, Assembla, Beanstalk, Gitlab, etc.) 
generally provide one or more REST API's that will list remote files in a 
branch.

On Thursday, October 10, 2019 at 11:37:34 PM UTC-8, Ajay Sharma wrote:
>
> Hi Everyone, Good Morning.
>
> Request any ones help to List All FILES from the GIT BRANCH.  
> I am trying to first list Branches of a GIT REPO, then list the files of 
> the BRANCH. 
>
> I am facing problem while listing files of the BRANCH. 
>
> I have used this code List files Of the GIT REPO with   *Extended Choice 
> Parameter*. 
>
> def gettags = ("git ls-remote -t -h 
> http://pramod:username.password@10.112.78.152/pramod/automaticjobs.git
> ").execute()
> return gettags.text.readLines().collect { 
>   it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
> '').replaceAll("\\^\\{\\}", '')
> }
>
> BUT this code is not working for Listing the Files of the GIT BRANCH. 
>
> def gettags = ("git ls-remote -t -h 
> http://pramod:usernamepassword@10.112.78.152/pramod/automaticjobs.git -r 
> {env.Branches}").execute()
> return gettags.text.readLines().collect { 
>   it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
> '').replaceAll("\\^\\{\\}", '')
> }
>
>
>
>

-- 
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/ad6d0852-7c2b-494d-a929-30043da22b5c%40googlegroups.com.


Re: create a local linux machine as a slave for aws ec2 cloud jenkins

2019-10-11 Thread Farrukh Fareed
Hi
On your local machine there should be public ip or vpn tunnel so that you
can connect to your local machine from ec2 master jenkins...next is java
should be installed on your local system...go to master add node...this you
can google

On Fri, Oct 11, 2019, 7:44 PM gopi dasari  wrote:

> HI All,
>
> I am very new to Jenkins,
>
> I want to create my local machine as a slave for aws ec2 cloud Jenkins to
> run the jobs. anyone please help me how to create a slave machine to ec2
> jenkins-master.
>
>
>
> [image: jenkins master-slave.png]
>
> --
> 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/69d8b34e-959e-4ec2-848e-12a46fdbd829%40googlegroups.com
> 
> .
>

-- 
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/CAJs33HRJ%2BCGDjHV1jbmHPdWiVrt86avk7iCbH0DTXYkEoReMGA%40mail.gmail.com.


Re: create a local linux machine as a slave for aws ec2 cloud jenkins

2019-10-11 Thread Mark Waite
https://wiki.jenkins.io/display/JENKINS/Distributed+builds describes the
alternatives available and the reasons for those alternatives.

If your local machine is not directly accessible to your EC2 master or if
it is a Windows computer, then you are likely unable to initiate the
connection from the master to the agent.  That means you can't use the
ssh-slaves connection technique.  You'll likely need to use the JNLP based
technique that allows you to initiate a connection from the agent to the
master.

On Fri, Oct 11, 2019 at 6:14 AM gopi dasari 
wrote:

> HI All,
>
> I am very new to Jenkins,
>
> I want to create my local machine as a slave for aws ec2 cloud Jenkins to
> run the jobs. anyone please help me how to create a slave machine to ec2
> jenkins-master.
>
>
>
> [image: jenkins master-slave.png]
>
> --
> 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/69d8b34e-959e-4ec2-848e-12a46fdbd829%40googlegroups.com
> 
> .
>


-- 
Thanks!
Mark Waite

-- 
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/CAO49JtFTeTVUN4FMCRPxsi4nEfsmWwgdVMcDk99bJ4Y8mfcZhQ%40mail.gmail.com.


create a local linux machine as a slave for aws ec2 cloud jenkins

2019-10-11 Thread gopi dasari
HI All,

I am very new to Jenkins,

I want to create my local machine as a slave for aws ec2 cloud Jenkins to 
run the jobs. anyone please help me how to create a slave machine to ec2 
jenkins-master.



[image: jenkins master-slave.png] 

-- 
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/69d8b34e-959e-4ec2-848e-12a46fdbd829%40googlegroups.com.


Setting Security Setting 'Use browser for metatdata download' From Groovy

2019-10-11 Thread Tony Cooper
All of our Jenkins servers are configured from code that is under SCM 
control (configuration as code). In order to get around a similar problem 
described here 

 I'm 
trying to set the `Use browser for metadata download' setting from Groovy.

In my case the error stems from Jenkins trying to find updates from the 
Internet, despite having no update server settings set and being on an 
internal network with no Internet access.

However I'm unable to find any exposed API for the above setting. Is there 
a way of doing this, say by using a generic Jenkins config class?

Failing that can one prevent Jenkins from doing any periodic checks for 
updates? Has anyone else got around this problem using Groovy?

The skip-certificate-check 
 Jenkins 
plugin that was suggested in the above question didn't make any difference.

I want to get rid of, certainly more common, exceptions in the Jenkins log 
and the nasty red message that comes up on the manage plugins pages.

We're using version 1.19.0 of the jenkinsci/blueocean Docker image.

Many thanks in advance,

Tony.

-- 
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/798c51a2-7bd2-40c3-8afa-021876f360a7%40googlegroups.com.


Re: nginx reverse proxy auth plugin

2019-10-11 Thread Uthred Ragnorson
Anyone?

On Wed, Oct 9, 2019 at 9:33 PM Uthred Ragnorson 
wrote:

> I have nginx authenticating with kerberos (
> https://github.com/stnoonan/spnego-http-auth-nginx-module) and I would
> like it to authenticate Jenkins. Has anyone setup Nginx/SPNEGO and Jenkins?
>
>
> For nginx on other products I do this
>
> proxy_set_header X-WEBAUTH-USER $remote_user; proxy_set_header
> Authorization "";
>
> Is there something similar for Jenkins?
>
> --
> 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/ec17a03c-5633-478e-8b54-41d3d61b164c%40googlegroups.com
> 
> .
>

-- 
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/CANHuWowRQxjp7Rv9oCU7fXpn-LNF4gGZ_Y%2BWSufOo%3D2%2BF4G9pw%40mail.gmail.com.


Jenkins List Files of Git Branch

2019-10-11 Thread Ajay Sharma
Hi Everyone, Good Morning.

Request any ones help to List All FILES from the GIT BRANCH.  
I am trying to first list Branches of a GIT REPO, then list the files of 
the BRANCH. 

I am facing problem while listing files of the BRANCH. 

I have used this code List files Of the GIT REPO with   *Extended Choice 
Parameter*. 

def gettags = ("git ls-remote -t -h 
http://pramod:username.password@10.112.78.152/pramod/automaticjobs.git";).execute()
return gettags.text.readLines().collect { 
  it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
'').replaceAll("\\^\\{\\}", '')
}

BUT this code is not working for Listing the Files of the GIT BRANCH. 

def gettags = ("git ls-remote -t -h 
http://pramod:usernamepassword@10.112.78.152/pramod/automaticjobs.git -r 
{env.Branches}").execute()
return gettags.text.readLines().collect { 
  it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
'').replaceAll("\\^\\{\\}", '')
}



-- 
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/fe2bb3c4-6965-44d8-aff8-d260b7f86164%40googlegroups.com.