Re: Merge Git Core Repo and Site Repo folder while Jenkins deployment

2016-09-26 Thread Mark Waite
On Mon, Sep 26, 2016 at 9:50 AM kamlesh nattamai ramesh babu <
nrkaml...@gmail.com> wrote:

> Hi Folks,
>
> I need your advice badly.. We are Maintaining  2 GIT repo for handling
> code.
>
> 1. *Core repo*: This repo contains the core files which is commonly used
> for all the projects as a core base files.
> 2. *Site repo*: This repo contains the site wise file which will merge
> with core while GIT deployment.
>
>
I assume in my comments below that the verb "merge" in the above comment
means "combine the files from both git repositories into a single
directory.  I assume in my comments below that the verb "merge" does not
mean "perform the 'git merge' command across two git repositories".

If those assumptions are wrong, then my comments should be ignored.


> Both CORE and SITE will get merged with each other while doing the GIT
> deployment.  We maintain the CORE plugins in the *core repo* and site
> wise plugins in *site repo. *So both the repo will contain the same
> folder name called "WP-CONTENT" which contain core plugins in core repo and
> site plugins in site repo. Both the folder will get merged while deploying
> the code thru GIT. I want to make this process automate thru *JENKIN
> deployment* but it is not happening.
>
>
The Jenkins git plugin can't combine the contents of two different
repositories into the same root workspace folder.  Thus, you can't use the
Jenkins git plugin to have a single job workspace root folder which
contains both CORE and SITE repositories at its root.

You can (with the pipeline plugin, or with the multiple SCM's plugin)
checkout multiple repositories into subdirectories of the workspace root
folder.  You could then run a build step which combines the contents of the
"WP-CONTENT" directory from each of those subdirectories into a single
subdirectory of your choosing inside the workspace.

I'm not sure what you mean when you say "Both the folder will get merged
while deploying the code thru GIT".

Thanks,
Mark Waite


> I would like you guys share your esteemed knowledge to make this sort out..
>
> Thanks,
> Kamlesh
>
> --
> 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/46e509ed-2734-41e1-9d31-76c17f43bffb%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 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/CAO49JtHe6fmuV0Bye7gkkO-frvVb4mjRqqSeWAz%2BBffmjm34dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins 2.0 api for build pipeline plugin

2016-09-26 Thread Ramnath Ananth
Hi,

Is there a REST api for the build pipeline plugin ? I want to build/deploy 
using REST api which would show up in the GUI in the build pipeline plugin. 
Currently, I am able to trigger build jobs through REST api but its not 
integrated with the build pipeline plugin.

Can anyone help me in doing this ?  

Thanks

-- 
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/5f95e4e8-12f2-449e-8a65-ac849e8e9dcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: E-mails not reaching all receipients

2016-09-26 Thread Slide
I would recommend enabling debug mode in the global config for email-ext
and see what the logs say. If it says it's sending to the distribution
list, then something is incorrect in the list setup, or the emails are
going to the spam folder or something.

On Mon, Sep 26, 2016, 14:50 rqui  wrote:

> Thanks for your reply, slide.
>
> So how could I explain that some users of a distribution group receive the
> emails, while others don't?
>
>
> On Monday, September 26, 2016 at 2:47:32 PM UTC-7, slide wrote:
>
>> Nope, never had this issue.
>>
>> On Mon, Sep 26, 2016 at 1:20 PM rqui  wrote:
>>
> Has anyone experienced any issue with using the email-ext plugin to send
>>> emails to a distribution list, with several subgroups, and it only reached
>>> some of the people on those lists?
>>>
>>> Thanks in advance!
>>>
>>> --
>>> 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-use...@googlegroups.com.
>>
>>
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/d9deae5c-1003-4a81-8277-204f55b24482%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 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/efdf3d61-a6a6-4293-9ccc-700bb649c3cb%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 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/CAPiUgVd8RONVM01TnB_MoA-cC9pBp-EDceUtVChqM8Nu46_JnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: E-mails not reaching all receipients

2016-09-26 Thread rqui
Thanks for your reply, slide.

So how could I explain that some users of a distribution group receive the 
emails, while others don't?


On Monday, September 26, 2016 at 2:47:32 PM UTC-7, slide wrote:
>
> Nope, never had this issue.
>
> On Mon, Sep 26, 2016 at 1:20 PM rqui  
> wrote:
>
>> Has anyone experienced any issue with using the email-ext plugin to send 
>> emails to a distribution list, with several subgroups, and it only reached 
>> some of the people on those lists?
>>
>> Thanks in advance!
>>
>> -- 
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/d9deae5c-1003-4a81-8277-204f55b24482%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 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/efdf3d61-a6a6-4293-9ccc-700bb649c3cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: E-mails not reaching all receipients

2016-09-26 Thread Slide
Nope, never had this issue.

On Mon, Sep 26, 2016 at 1:20 PM rqui  wrote:

> Has anyone experienced any issue with using the email-ext plugin to send
> emails to a distribution list, with several subgroups, and it only reached
> some of the people on those lists?
>
> Thanks in advance!
>
> --
> 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/d9deae5c-1003-4a81-8277-204f55b24482%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 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/CAPiUgVdEx%3DOMxpLxUBBPm-9-HZwRp9VWi8FDcxaaimGmxSGd7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: deployment YAML script with Jenkins

2016-09-26 Thread Victor Martinez
IMO, it seems this is an ansible runtime issue when running that playbook 
rather than a Jenkins issue 


On Monday, 26 September 2016 20:21:07 UTC+1, GBANE FETIGUE wrote:
>
> Hi, 
>
>
> I am running a Yaml deployment on with Jenkins. I specified the branch 
> (develop) but when I run the YAML I am getting error message . 
>
> ​The weird stuff is I have already added the key to bitbucket deployment key 
> . any ideas ?
> ​
>
> Started by user UserName LastName
> [EnvInject] - Loading node environment variables.
> Building in workspace 
> /opt/bitnami/apps/jenkins/jenkins_home/jobs/DemoUI/workspace
>  > /opt/bitnami/git/bin/git rev-parse --is-inside-work-tree # timeout=10
> Fetching changes from the remote Git repository
>  > /opt/bitnami/git/bin/git config remote.origin.url 
> g...@bitbucket.org:Wildcardpay/push_demo_ui.git # timeout=10
> Fetching upstream changes from g...@bitbucket.org:Wildcardpay/push_demo_ui.git
>  > /opt/bitnami/git/bin/git --version # timeout=10
> using GIT_SSH to set credentials 
>  > /opt/bitnami/git/bin/git fetch --tags --progress 
> g...@bitbucket.org:Wildcardpay/push_demo_ui.git 
> +refs/heads/*:refs/remotes/origin/*
>  > /opt/bitnami/git/bin/git rev-parse refs/remotes/origin/develop^{commit} # 
> timeout=10
>  > /opt/bitnami/git/bin/git rev-parse 
> refs/remotes/origin/origin/develop^{commit} # timeout=10
> Checking out Revision 01e22b0ac99e9ba4a2c321f91e109080ff38215b 
> (refs/remotes/origin/develop)
>  > /opt/bitnami/git/bin/git config core.sparsecheckout # timeout=10
>  > /opt/bitnami/git/bin/git checkout -f 
> 01e22b0ac99e9ba4a2c321f91e109080ff38215b
>  > /opt/bitnami/git/bin/git rev-list 01e22b0ac99e9ba4a2c321f91e109080ff38215b 
> # timeout=10
> [EnvInject] - Executing scripts and injecting environment variables after the 
> SCM step.
> [EnvInject] - Injecting as environment variables the properties content 
> ANSIBLE_SSH_CONTROL_PATH='%(directory)s/%%h-%%r'
>
> [EnvInject] - Variables injected successfully.
> [workspace] $ /usr/bin/ansible-playbook ops/deploy-ms3.yml -i 
> ops/inventory/static -f 5 --private-key 
> /opt/bitnami/apache-tomcat/temp/ssh5992238100411202856.key -u bitnami 
> --vault-password-file=/opt/bitnami/apps/jenkins/jenkins_home/jobs/DemoUI/workspace@tmp/secretFiles/efdaab00-43b2-4944-ae17-826c1e0a72b7/vault_password.txt
>
> PLAY [configuring instances] 
> ***
>
> TASK [setup] 
> ***
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : include_vars] 
> *
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : ensure .ssh directory exists.] 
> 
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : install ssh key] 
> **
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : install git package] 
> **
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : pull code] 
> 
>  [0;31mfatal: [52.4.198.19]: FAILED! => {"changed": false, "cmd": 
> "/usr/bin/git ls-remote origin -h refs/heads/develop", "failed": true, "msg": 
> "conq: repository access denied. deployment key is not associated with the 
> requested repository.\nfatal: Could not read from remote 
> repository.\n\nPlease make sure you have the correct access rights\nand the 
> repository exists.", "rc": 128, "stderr": "conq: repository access denied. 
> deployment key is not associated with the requested repository.\nfatal: Could 
> not read from remote repository.\n\nPlease make sure you have the correct 
> access rights\nand the repository exists.\n", "stdout": "", "stdout_lines": 
> []} [0m
>
> NO MORE HOSTS LEFT 
> *
>   to retry, use: --limit @ops/deploy-ms3.retry
>
> PLAY RECAP 
> *
>  [0;31m52.4.198.19 [0m:  [0;32mok [0m [0;32m= [0m [0;32m5 [0m 
>changed=0unreachable=0 [0;31mfailed [0m [0;31m= [0m [0;31m1 [0m   
>
> FATAL: command execution failed
> hudson.AbortException: Ansible playbook execution failed
>   at 
> org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:227)
>   at 
> org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:200)
>   at 
> hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
>   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
>   at hudson.model.Build$BuildExecution.build(Build.java:205)
>   at hudson.model.Build$BuildExecution.doRun(Build.java:162)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
>   at 

Re: Jenkins builds being triggered despite ³Don't trigger a build on commit notifications²

2016-09-26 Thread Cyril
Actually, looking at the comments for the git hook feature, it seems that I 
still need to have Polling enabled on the job or it won't work. Leaving the 
schedule blank should work though. I will try that as soon as we can setup 
the hook on the remote.

On Monday, September 26, 2016 at 12:54:45 PM UTC-7, Cyril wrote:
>
> I'm not sure what you mean by "Multiple SCM". I don't see that option 
> anywhere so I guess I'm not using it.
>
> I am currently not using git hooks to trigger builds. I thought that the 
> job was supposed to be configured with Polling for it to work but it looks 
> like I misunderstood, and that I just need to have polling set to true 
> (which is the default if not specified) when doing the checkout out in my 
> pipeline script and polling off on the job. I think I now understand what 
> needs to be done for this to work the way I intended. I will try and report 
> back if I encounter any issues. The option "Don't trigger on commit 
> notifications" also makes more sense now.
>
> On Saturday, September 24, 2016 at 8:49:37 AM UTC-7, Indra Gunawan 
> (ingunawa) wrote:
>>
>> If you do not want the pipeline to be triggered at all by commits to 
>> RepoB where the pipeline script exists then remove the Poll SCM in the 
>> pipeline job.
>> In the pipeline job, you configured “Pipeline script from SCM” and 
>> specified RepoB as location for the pipeline script.  The "Poll SCM” 
>> section will poll RepoB not RepoA.  Therefore, remove “Poll SCM”.
>> Don’t tell me you choose “Multiple SCM” one for RepoB and one for RepoA.  
>>
>> Your pipeline script will do the checkout of RepoA not using pipeline job 
>> definition to define RepoA to checkout.
>>
>> If the SCM chosen is “Git” the Pipeline’s “Pipeline script from SCM” 
>> reuse Git Plugin and "Don't trigger a build on commit notifications” is the 
>> same option in “Additional Behaviours” like other job using Git plugin.
>> You see the ? Of the option, it says :
>>
>> "If checked, this repository will be ignored when the notifyCommit-URL is 
>> accessed regardless of if the repository matches or not.”
>>
>>
>> notifyCommit is this: 
>> http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
>> Basically you setup a post-receive git hook on the git remote repository 
>> side to push notification to Jenkins.
>> Are you using this or not?
>>  
>> Enabling "Don't trigger a build on commit notifications” means the build 
>> won’t trigger even if notifyCommit is received.
>>
>>
>>
>>
>>
>> From:  on behalf of Cyril <
>> cyril@gmail.com>
>> Reply-To: "jenkins...@googlegroups.com" 
>> Date: Friday, September 23, 2016 at 5:43 PM
>> To: Jenkins Users 
>> Cc: ingunawa 
>> Subject: Re: Jenkins builds being triggered despite ³Don't trigger a 
>> build on commit notifications²
>>
>> I didn't think about that option and it sounds like this should work 
>> exactly like I need it to be. Thanks for the suggestion. 
>>
>> I would still like to know what "Don't trigger a build on commit 
>> notifications" is supposed to do.
>>
>> On Friday, September 23, 2016 at 5:35:27 PM UTC-7, Indra Gunawan 
>> (ingunawa) wrote: 
>>>
>>> Or create old-style job configured to trigger on polling of repoA and it 
>>> will trigger the pipeline job as “Trigger/call builds on other projects” 
>>> build step.
>>>
>>>
>>> From:  on behalf of Cyril <
>>> cyril@gmail.com>
>>> Reply-To: "jenkins...@googlegroups.com" 
>>> Date: Friday, September 23, 2016 at 2:57 PM
>>> To: Jenkins Users 
>>> Subject: Jenkins builds being triggered despite “Don't trigger a build 
>>> on commit notifications”
>>>
>>> I have a Pipeline job that checkouts a git repository (let's call is 
>>> "repoA") and passes it to some other downstream jobs for further 
>>> processing. The job's script is stored in a different git repo (let's call 
>>> it "repoB"). This job is configured with the "Poll SCM" option so that any 
>>> changes to repoA will trigger it. In the pipeline section, I have selected 
>>> the "Pipeline script from SCM" option and configured it to get the pipeline 
>>> script from the master branch of repoB. I have also added the option "Don't 
>>> trigger a build on commit notifications". The behavior that I'm expecting 
>>> is that any changes pushed to repoA would trigger the job, and any changes 
>>> to repoB would not trigger the job. Yet, when I push a change to repoB, the 
>>> job is triggered.
>>>
>>>
>>> I don't know if this is a bug, or if I'm missing something. I don't want 
>>> the job to be triggered when I make changes to the scripts. I only want it 
>>> to be triggered when a change is pushed to the repo that the script does a 
>>> checkout on.
>>>
>>>
>>> I am running Jenkins 2.7.4. My master Jenkins is running on Ubuntu 
>>> server 16.04.1 LTS. All my 

E-mails not reaching all receipients

2016-09-26 Thread rqui
Has anyone experienced any issue with using the email-ext plugin to send 
emails to a distribution list, with several subgroups, and it only reached 
some of the people on those lists?

Thanks in advance!

-- 
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/d9deae5c-1003-4a81-8277-204f55b24482%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for plugin that notifies an http(s) endpoint after build is done

2016-09-26 Thread Martin d'Anjou

>
> I found the Notification 
>  plugin 
> that does the job for me, but it is not compatible with the Pipeline 
> feature.
> Before I go and fix this I wanted to know if anyone knows a plugin that 
> does this already?
>
 
You could try the Http Request plugin 
. Pipeline 
is supported. You have to compose the content of the http message to match 
what the endpoint expects, but since you are in the pipeline code, this 
should be easy.
 

-- 
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/8ea08e44-2817-4bf4-994d-4760e9b71595%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins builds being triggered despite ³Don't trigger a build on commit notifications²

2016-09-26 Thread Cyril
I'm not sure what you mean by "Multiple SCM". I don't see that option 
anywhere so I guess I'm not using it.

I am currently not using git hooks to trigger builds. I thought that the 
job was supposed to be configured with Polling for it to work but it looks 
like I misunderstood, and that I just need to have polling set to true 
(which is the default if not specified) when doing the checkout out in my 
pipeline script and polling off on the job. I think I now understand what 
needs to be done for this to work the way I intended. I will try and report 
back if I encounter any issues. The option "Don't trigger on commit 
notifications" also makes more sense now.

On Saturday, September 24, 2016 at 8:49:37 AM UTC-7, Indra Gunawan 
(ingunawa) wrote:
>
> If you do not want the pipeline to be triggered at all by commits to RepoB 
> where the pipeline script exists then remove the Poll SCM in the pipeline 
> job.
> In the pipeline job, you configured “Pipeline script from SCM” and 
> specified RepoB as location for the pipeline script.  The "Poll SCM” 
> section will poll RepoB not RepoA.  Therefore, remove “Poll SCM”.
> Don’t tell me you choose “Multiple SCM” one for RepoB and one for RepoA.  
>
> Your pipeline script will do the checkout of RepoA not using pipeline job 
> definition to define RepoA to checkout.
>
> If the SCM chosen is “Git” the Pipeline’s “Pipeline script from SCM” reuse 
> Git Plugin and "Don't trigger a build on commit notifications” is the same 
> option in “Additional Behaviours” like other job using Git plugin.
> You see the ? Of the option, it says :
>
> "If checked, this repository will be ignored when the notifyCommit-URL is 
> accessed regardless of if the repository matches or not.”
>
>
> notifyCommit is this: 
> http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
> Basically you setup a post-receive git hook on the git remote repository 
> side to push notification to Jenkins.
> Are you using this or not?
>  
> Enabling "Don't trigger a build on commit notifications” means the build 
> won’t trigger even if notifyCommit is received.
>
>
>
>
>
> From:  on behalf of Cyril <
> cyril@gmail.com >
> Reply-To: "jenkins...@googlegroups.com " <
> jenkins...@googlegroups.com >
> Date: Friday, September 23, 2016 at 5:43 PM
> To: Jenkins Users 
> Cc: ingunawa 
> Subject: Re: Jenkins builds being triggered despite ³Don't trigger a 
> build on commit notifications²
>
> I didn't think about that option and it sounds like this should work 
> exactly like I need it to be. Thanks for the suggestion. 
>
> I would still like to know what "Don't trigger a build on commit 
> notifications" is supposed to do.
>
> On Friday, September 23, 2016 at 5:35:27 PM UTC-7, Indra Gunawan 
> (ingunawa) wrote: 
>>
>> Or create old-style job configured to trigger on polling of repoA and it 
>> will trigger the pipeline job as “Trigger/call builds on other projects” 
>> build step.
>>
>>
>> From:  on behalf of Cyril <
>> cyril@gmail.com>
>> Reply-To: "jenkins...@googlegroups.com" 
>> Date: Friday, September 23, 2016 at 2:57 PM
>> To: Jenkins Users 
>> Subject: Jenkins builds being triggered despite “Don't trigger a build 
>> on commit notifications”
>>
>> I have a Pipeline job that checkouts a git repository (let's call is 
>> "repoA") and passes it to some other downstream jobs for further 
>> processing. The job's script is stored in a different git repo (let's call 
>> it "repoB"). This job is configured with the "Poll SCM" option so that any 
>> changes to repoA will trigger it. In the pipeline section, I have selected 
>> the "Pipeline script from SCM" option and configured it to get the pipeline 
>> script from the master branch of repoB. I have also added the option "Don't 
>> trigger a build on commit notifications". The behavior that I'm expecting 
>> is that any changes pushed to repoA would trigger the job, and any changes 
>> to repoB would not trigger the job. Yet, when I push a change to repoB, the 
>> job is triggered.
>>
>>
>> I don't know if this is a bug, or if I'm missing something. I don't want 
>> the job to be triggered when I make changes to the scripts. I only want it 
>> to be triggered when a change is pushed to the repo that the script does a 
>> checkout on.
>>
>>
>> I am running Jenkins 2.7.4. My master Jenkins is running on Ubuntu server 
>> 16.04.1 LTS. All my Jenkins plugins are up to date.
>>
>> -- 
>> 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-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/eb6a4d98-6686-46f6-a411-cc60308f76d3%40googlegroups.com

deployment YAML script with Jenkins

2016-09-26 Thread GBANE FETIGUE


Hi, 


I am running a Yaml deployment on with Jenkins. I specified the branch 
(develop) but when I run the YAML I am getting error message . 

​The weird stuff is I have already added the key to bitbucket deployment key . 
any ideas ?
​

Started by user UserName LastName
[EnvInject] - Loading node environment variables.
Building in workspace 
/opt/bitnami/apps/jenkins/jenkins_home/jobs/DemoUI/workspace
 > /opt/bitnami/git/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /opt/bitnami/git/bin/git config remote.origin.url 
 > g...@bitbucket.org:Wildcardpay/push_demo_ui.git # timeout=10
Fetching upstream changes from g...@bitbucket.org:Wildcardpay/push_demo_ui.git
 > /opt/bitnami/git/bin/git --version # timeout=10
using GIT_SSH to set credentials 
 > /opt/bitnami/git/bin/git fetch --tags --progress 
 > g...@bitbucket.org:Wildcardpay/push_demo_ui.git 
 > +refs/heads/*:refs/remotes/origin/*
 > /opt/bitnami/git/bin/git rev-parse refs/remotes/origin/develop^{commit} # 
 > timeout=10
 > /opt/bitnami/git/bin/git rev-parse 
 > refs/remotes/origin/origin/develop^{commit} # timeout=10
Checking out Revision 01e22b0ac99e9ba4a2c321f91e109080ff38215b 
(refs/remotes/origin/develop)
 > /opt/bitnami/git/bin/git config core.sparsecheckout # timeout=10
 > /opt/bitnami/git/bin/git checkout -f 01e22b0ac99e9ba4a2c321f91e109080ff38215b
 > /opt/bitnami/git/bin/git rev-list 01e22b0ac99e9ba4a2c321f91e109080ff38215b # 
 > timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
ANSIBLE_SSH_CONTROL_PATH='%(directory)s/%%h-%%r'

[EnvInject] - Variables injected successfully.
[workspace] $ /usr/bin/ansible-playbook ops/deploy-ms3.yml -i 
ops/inventory/static -f 5 --private-key 
/opt/bitnami/apache-tomcat/temp/ssh5992238100411202856.key -u bitnami 
--vault-password-file=/opt/bitnami/apps/jenkins/jenkins_home/jobs/DemoUI/workspace@tmp/secretFiles/efdaab00-43b2-4944-ae17-826c1e0a72b7/vault_password.txt

PLAY [configuring instances] ***

TASK [setup] ***
 [0;32mok: [52.4.198.19] [0m

TASK [get_code : include_vars] *
 [0;32mok: [52.4.198.19] [0m

TASK [get_code : ensure .ssh directory exists.] 
 [0;32mok: [52.4.198.19] [0m

TASK [get_code : install ssh key] **
 [0;32mok: [52.4.198.19] [0m

TASK [get_code : install git package] **
 [0;32mok: [52.4.198.19] [0m

TASK [get_code : pull code] 
 [0;31mfatal: [52.4.198.19]: FAILED! => {"changed": false, "cmd": "/usr/bin/git 
ls-remote origin -h refs/heads/develop", "failed": true, "msg": "conq: 
repository access denied. deployment key is not associated with the requested 
repository.\nfatal: Could not read from remote repository.\n\nPlease make sure 
you have the correct access rights\nand the repository exists.", "rc": 128, 
"stderr": "conq: repository access denied. deployment key is not associated 
with the requested repository.\nfatal: Could not read from remote 
repository.\n\nPlease make sure you have the correct access rights\nand the 
repository exists.\n", "stdout": "", "stdout_lines": []} [0m

NO MORE HOSTS LEFT *
to retry, use: --limit @ops/deploy-ms3.retry

PLAY RECAP *
 [0;31m52.4.198.19 [0m:  [0;32mok [0m [0;32m= [0m [0;32m5 [0m   
 changed=0unreachable=0 [0;31mfailed [0m [0;31m= [0m [0;31m1 [0m   

FATAL: command execution failed
hudson.AbortException: Ansible playbook execution failed
at 
org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:227)
at 
org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:200)
at 
hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
ERROR: Ansible playbook execution failed
Finished: FAILURE



​

-- 
You received this message because you are 

Docker in Docker in Jenkins Pipeline - how to access the Docker host?

2016-09-26 Thread Damien Coraboeuf
Hi,

After having struggled, I decided to create a simplified version of a 
pipeline, which highlights the issue.

Environment: Linux, Jenkins 2.23, latest versions of the pipeline 
components.

Given the pipeline definition at https://github.com/nemerosa/jenkins-docker:

   1. I build a Docker image which allows to run Postgres PSQL client, 
   Docker & Docker Compose
   2. I run it with '--volume=/var/run/docker.sock:/var/run/docker.sock' as 
   arguments, to be able to run in the same Docker environment
   3. I run a serie a bash commands inside this container
   4. the first action I do is to create a Postgres container using Docker 
   Compose
   5. I can get the port of the created Postgres container, no problem
   6. I then try to connect to the Postgres container - but which host can 
   I use?

As mentioned, this is a simplification of a more complex case, but the 
general idea is a build which creates its own containers (like a database) 
and tries to connect to it to perform some tests. But this build runs 
itself in Docker container and does not seem able to reach the other 
containers on the specified port. I've tried localhost, ${NODE_NAME}. 
Nothing was worked so far.

The 
https://wiki.jenkins-ci.org/display/JENKINS/CloudBees+Docker+Custom+Build+Environment+Plugin
 
is supposed to put DOCKER_HOST available for such a purpose, but this does 
not seem available any longer when in the pipeline.

Can someone help me resolve this problem?

Thanks,
Damien.

-- 
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/1cd96d96-c0aa-4b0a-b250-81bded535e7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Merge Git Core Repo and Site Repo folder while Jenkins deployment

2016-09-26 Thread kamlesh nattamai ramesh babu
Hi Folks, 

I need your advice badly.. We are Maintaining  2 GIT repo for handling 
code. 

1. *Core repo*: This repo contains the core files which is commonly used 
for all the projects as a core base files.
2. *Site repo*: This repo contains the site wise file which will merge with 
core while GIT deployment.

Both CORE and SITE will get merged with each other while doing the GIT 
deployment.  We maintain the CORE plugins in the *core repo* and site wise 
plugins in *site repo. *So both the repo will contain the same folder name 
called "WP-CONTENT" which contain core plugins in core repo and site 
plugins in site repo. Both the folder will get merged while deploying the 
code thru GIT. I want to make this process automate thru *JENKIN deployment* 
but 
it is not happening. 

I would like you guys share your esteemed knowledge to make this sort out..

Thanks,
Kamlesh

-- 
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/46e509ed-2734-41e1-9d31-76c17f43bffb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Accessing parameters in build broken

2016-09-26 Thread Daniel Beck

> On 26.09.2016, at 13:15, Sverre Moe  wrote:
> 
> I am beginning to get frustrated by this constant changes that breaks 
> previous behaviour. I have read the changelog of plugins and Jenkins and 
> could not find that this behaviour has been changed in any way. Jenkins could 
> learn from Gradle and have a list of "Potential breaking changes" for every 
> version.

Other than this change (which mentions potential compatibility issues in the 
2.3 changelog), what other compatibility issues did you experience to make this 
'constant changes [breaking] behavior'?

Note that scripting this way you may well be circumventing @Restricted 
annotations and member visibility, and you should not expect them to remain the 
same between versions.

-- 
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/EF20F746-F922-4D03-9E9C-C937CD154E21%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


GitLab plugin - Build Triggers / Filter branhces by name (javax.ws.rs.NotFoundException: HTTP 404 Not Found)

2016-09-26 Thread dav.fernandez
Hi all,

I'm trying to set up Jenkins so the job's only triggered on a merge request 
event, and only for the master branch.

Following the instructions here[1] I've done the following:


   1. Configured access to GitLab
  - User has developer access to the project
  - Manage Jenkins --> Configure System
 - Connection name: GitLab
 - GitLab host url: https://gitlab.our-url.xxx
 - Credentials: GitLab API token
  - When using the "Test connection" button it returns "Success"
   2. On the project:
  - Source code management:
  - Repository url: ssh://git@gitlab
 - Credentials: Jenkins (SSH key)
 - Branch Specifier: */master
 - Repository browser: gitlab
- URL: https://gitlab...
- Version: 8.8
 - Build Triggers:
- Build when a change is pushed to GitLab. GitLab CI Service 
URL: ...
- Enabled GitLab triggers:
  - PUsh Events: No
  - Merge Request Events: Yes
  - Rebuild open Merge Requests: Never
  - Comments: Yes
  - Comment for triggering a build: Jenkins please retry a 
  build
  - Enable [ci-skip]: Yes
  - Ignore WIP merge requests: yes
  - Set build description to build cause (eg. Merge request 
  or Git Push ): Yes
  - Allowed Branches:
 - Filter branches by name:
 - Include: master
 

Adding the filter causes the following error:

Stack trace

javax.servlet.ServletException: 
com.google.common.util.concurrent.UncheckedExecutionException: 
javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
at 
hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at 
hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at 
hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 

Jenkins/bitbucket SSH keys

2016-09-26 Thread Mohan Radhakrishnan
Hi,
I am able to successfully using Gitbash and execute some 
Bitbucket commands using SSH keys. But the same command doesn't execute 
from my Windows prompt. I thought that is why Jenkins on my Windows machine 
also fails

I have explained it 
here(http://stackoverflow.com/questions/39674741/jenkins-bitbucket-difference-between-git-bash-openssh-and-windows-prompt-pagea)

I use Pageant to load the key but still there is no success from the 
Windows prompt. Others here have more experience with this setup. I think.

Thanks,
Mohan

-- 
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/63734706-6201-4386-a69b-85e9c21f530d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Accessing parameters in build broken

2016-09-26 Thread Tomasz Krzemiński
Try adding flag:
 -Dhudson.model.ParametersAction.keepUndefinedParameters=true



On Monday, September 26, 2016 at 1:15:34 PM UTC+2, Sverre Moe wrote:
>
> I have previously accessed build parameters the following way:
> def upstreamNoVerify = false
> if (getBinding().hasVariable("PARAM")) {
> upstreamNoVerify = Boolean.parseBoolean(PARAM)
> }
>
> This no longer works and I had to change it to:
> final def upstreamNoVerify = Boolean.parseBoolean(PARAM)
>
> I am beginning to get frustrated by this constant changes that breaks 
> previous behaviour. I have read the changelog of plugins and Jenkins and 
> could not find that this behaviour has been changed in any way. Jenkins 
> could learn from Gradle and have a list of "Potential breaking changes" for 
> every version.
>

-- 
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/b8ee1012-e94f-46f7-a9b4-8a7d18cc5e9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline: Accessing parameters in build broken

2016-09-26 Thread Sverre Moe
I have previously accessed build parameters the following way:
def upstreamNoVerify = false
if (getBinding().hasVariable("PARAM")) {
upstreamNoVerify = Boolean.parseBoolean(PARAM)
}

This no longer works and I had to change it to:
final def upstreamNoVerify = Boolean.parseBoolean(PARAM)

I am beginning to get frustrated by this constant changes that breaks 
previous behaviour. I have read the changelog of plugins and Jenkins and 
could not find that this behaviour has been changed in any way. Jenkins 
could learn from Gradle and have a list of "Potential breaking changes" for 
every version.

-- 
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/6c0c739b-91ce-4d94-b174-3f8fcf4b4519%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline: Get SCM changes for build

2016-09-26 Thread Sverre Moe
The following will get me the top most git commit hash:
def gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()

The following will get me the top most git commit message:
def gitCommitMessage = sh(returnStdout: true, script: 'git log -n 1 
--format=%s').trim()

However within one single build there is n number of commits. I need all 
commits listed on Changes.
Is there an environment parameter that would get me all the changes, or at 
least the number of changes to use in git log?

-- 
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/fd4e29cb-563f-4755-951d-8c48641a8cd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Looking for plugin that notifies an http(s) endpoint after build is done

2016-09-26 Thread Bibek Shrestha
Hi all,

I found the Notification 
 plugin 
that does the job for me, but it is not compatible with the Pipeline 
feature.
Before I go and fix this I wanted to know if anyone knows a plugin that 
does this already?

Thanks,
Bibek

-- 
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/b72adc65-68f7-43ff-9776-3f2c143d36c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.