setting up approvers

2020-01-21 Thread Uthred Ragnorson
I am trying to setup an approver scheme. Basically, after a build is 
completed I want an approver to say "OK" to proceed to the next step. I 
would like to populate the approver from AD. Is that possible? If not, what 
other way can I do it?

-- 
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/ca01d35c-8bb2-4e1a-96dc-07372ded5eea%40googlegroups.com.


Re: Git Plugin - How specify use ssh in "Repository URL" ?

2020-01-21 Thread Mark Waite
On Tue, Jan 21, 2020 at 10:24 AM Eddie Sutton  wrote:

> *What I Tried:*
>
> 1) Set *Source Code Management > GIT > Repository URL* to:
>
> acme...@vs-ssh.visualstudio.com:v3/acmeinc/my-app/my-app
>
> Failed to connect to repository : Command "git ls-remote -h --
> acme...@vs-ssh.visualstudio.com:v3/acmeinc/my-app/my-app HEAD" returned
> status code 128:
> stdout:
> stderr: Host key verification failed.
> fatal: Could not read from remote repository.
>
>
That message is a "permission denied" message.  It could be for many
different reasons, possibly including:

   1. Failed to provide a private key credential in the Jenkins job
   definition.  Use the Jenkins credentials plugin to add the private key
   which has also been registered with visualstudio.com
   2. Failed to register the public key with visualstudio.com.  Add the
   public key from the private key credential to the repository on
   visualstudio.com
   3. Used an outdated command line git version.  Use a recent command line
   git version instead
   4. Used command line git from cygwin instead of using git for windows.
   The git plugin is not tested with cygwin.  It is tested frequently with
   recent releases of git for windows.  Use git for windows instead of cygwin



> *Work-Around*
>
> My work-around was to change job to use a bash shell.
>
> However, I very much miss the "*Recent Changes*" section that was
> displayed in my job previously.
>
> I *think* the "*Recent Changes*" were generated from the GIT Plugin.
>
>
>
> echo "git clone using public SSH key of build slave..."
> echo "Works but no 'Recent Changes' section for your job"
> git clone acme...@vs-ssh.visualstudio.com:v3/acmeinc/my-app/my-app .
>
> Thanks in advance for any tips or suggestions,
>
>
You're welcome to use your own 'git clone' inside the job definition,
though that removes many of the things that Jenkins could do for you and
makes it more difficult for you to use additional agents.  Each agent will
need the same private key credentials.



> -Ed
>
>
>
> --
> 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/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.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/CAO49JtGSqYXnuyr-QMJjbzORzqZKoc8pdc2FyOuDV3s7%2BeEheg%40mail.gmail.com.


Git Plugin - How specify use ssh in "Repository URL" ?

2020-01-21 Thread Eddie Sutton
*What I Tried:*

1) Set *Source Code Management > GIT > Repository URL* to:

acme...@vs-ssh.visualstudio.com:v3/acmeinc/my-app/my-app

Failed to connect to repository : Command "git ls-remote -h --
acme...@vs-ssh.visualstudio.com:v3/acmeinc/my-app/my-app HEAD" returned
status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.

*Work-Around*

My work-around was to change job to use a bash shell.

However, I very much miss the "*Recent Changes*" section that was displayed
in my job previously.

I *think* the "*Recent Changes*" were generated from the GIT Plugin.



echo "git clone using public SSH key of build slave..."
echo "Works but no 'Recent Changes' section for your job"
git clone acme...@vs-ssh.visualstudio.com:v3/acmeinc/my-app/my-app .

Thanks in advance for any tips or suggestions,

-Ed

-- 
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/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com.


Re: job-dsl: Dynamic DSL - gitscmsource - includes

2020-01-21 Thread Alex
I fixed it using this:

pipeline {
agent any
stages {
stage('test') {
steps {
jobDsl scriptText: 
"""multibranchPipelineJob("multibranch-name") {
branchSources {
git {
id('12312312312')
remote("gitproject.git")
}
}
configure {

it / sources / data / 'jenkins.branch.BranchSource' / source / 
traits << {
'jenkins.plugins.git.traits.BranchDiscoveryTrait' {}
'jenkins.scm.impl.trait.WildcardSCMHeadFilterTrait' {
includes('feature/*')
excludes('')
}
}

it / sources / data / 'jenkins.branch.BranchSource' << {

strategy(class: 'jenkins.branch.DefaultBranchPropertyStrategy') 
{
properties(class: 'java.util.Arrays\$ArrayList') {
a(class: 'jenkins.branch.BranchProperty-array') {
'jenkins.branch.NoTriggerBranchProperty' { }
}
}
}
}
}
triggers {
periodic(5)
}
orphanedItemStrategy {
discardOldItems {
daysToKeep(3)
numToKeep(3)
}
}
}"""
}
}
}
}


On Monday, 20 January 2020 21:42:57 UTC, Alex wrote:
>
>
> pipeline {
>agent any
>stages {
>stage('test') {
>steps {
>jobDsl scriptText: 
> """multibranchPipelineJob("job-features") {
> branchSources {
> branchSource {
>  source {
>git {
>   
> id('123456789')
> remote("
> gir-url.git")
>   
> includes("feature/*")
>   }
>   }
>   strategy {
>  
> defaultBranchPropertyStrategy 
> {
> props {
> 
> noTriggerBranchProperty()
>   }
>   }
>   }
>   }
>}
>configure { 
>   def traits = it / sources / 
> data / 'jenkins.branch.BranchSource' / source / traits
>  traits << 
> 'jenkins.plugins.git.traits.BranchDiscoveryTrait' {}
>  }
>triggers {
>periodic(5)
>}
> orphanedItemStrategy {
>discardOldItems {
>daysToKeep(3)
>numToKeep(3)
>}
>}
>}"""
>}
>}
>}
> }
>
> I am trying to create a job using job-dsl to seed a multibranch job that 
> includes auto discovery of branches and the supress scm strategy. For some 
> reason in this format the includes option is not working. Any ideas?
>
>

-- 
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/234428ef-f769-4562-81c2-055333ee0f8d%40googlegroups.com.


Re: Jenkins Integration with LDAP -- Issue

2020-01-21 Thread Alex
Maybe you have too many users in LDAP? Can you narrow down the search and 
see if you have the same issue?


On Monday, 20 January 2020 22:29:34 UTC, gaurav gundal wrote:
>
> Hi Everyone,
>
>
> I am trying to configure Jenkins with the  ldap,but I am getting error as 
> mentioned below . Please let me know if you know about below error
>
>
>  
>
> *Ldap Integration with the Jenkins *
>
>  
>
> Below are the Jenkins Setup details
>
> Jenkins Version - Jenkins ver. 2.204.1 
>
> Jenkins Ldap plugin – 1.21
>
>  
>
> *LdapSearch from the Jenkins Master *
>
> ldapsearch -x -h xxx -p 389 -D "CN=xx,OU=bb,OU=aa,DC=qq,DC=pp,DC=com"  -b  
> "OU= aa,DC= qq,DC=pp,DC=com" "(sAMAccountName=xx)"
>
> *Result stripped out -- Succesful*
>
> Search: 2
>
> Result: 0 Success
>
> # numResponses: 2
>
> # numEntries: 1
>
>  
>
>  
>
> So I configured the Ldap through Jenkins UI
>
> With below details
>
> *Test 1* : 
>
> Server : xxx:389
>
> rootDn: DC= qq,DC=pp,DC=com
>
> ManagerDn: CN=xx,OU=bb,OU=aa,DC=qq,DC=pp,DC=com
>
> Manager Password : x
>
> Error : 
>
> LdapCallback;LDAP response read timed out, timeout used:6ms.; nested 
> exception is javax.naming.NamingException: LDAP response read timed out, 
> timeout used:6ms.; remaining name 
>
> User lookup: failed for user "xx"
>
>  
>
> *Test 2* : 
>
> Server : xxx:389
>
> rootDn: DC= qq,DC=pp,DC=com
>
> ManagerDn: CN=xx,OU=bb,OU=aa,DC=qq,DC=pp,DC=com
>
> Manager Password : x
>
> Environment Properties: com.sun.jndi.ldap.connect.pool - 
> false
>
>  
>
> *Error*: 
>
> LdapCallback;LDAP response read timed out, timeout used:6ms.; nested 
> exception is javax.naming.NamingException: LDAP response read timed out, 
> timeout used:6ms.; remaining name 
>
> User lookup: failed for user "xx"
>
>  
>
> *Test 3*
>
> Server : xxx:389
>
> rootDn: DC= qq,DC=pp,DC=com
>
> ManagerDn: CN=xx,OU=bb,OU=aa,DC=qq,DC=pp,DC=com
>
> Manager Password : x
>
> Environment Properties: com.sun.jndi.ldap.connect.pool - 
> false
>
>Group membership : Parser user attribute for list of LDAP 
> groups
>
>  
>
> *Error*: Same error
>
>  
>
>
>

-- 
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/bf1388db-2eb4-4bf8-bcb0-68ecf9e3c233%40googlegroups.com.