Re: Mac Jenkins Can't Clone/fetch from GitHub

2018-01-11 Thread Mark Waite
On Thu, Jan 11, 2018 at 7:15 PM Eric  wrote:

> I have this configured this way as well, but it still hangs on:
>
> git fetch --tags --progress git@git.world1:space.git
>> +refs/heads/*:refs/remotes/origin/*
>
>
> SSH'ing into Jenkins and running git clone with the same key in ~/.ssh
> works just fine
>
> git clone git@git.world1:space.git
>>
>
>
I'm not sure what you mean by "I have this configured this way as well", so
I'll make a guess.

If that means you have configured a username and password credential (as
shown in the image), and then are trying to clone with the command you
listed, it can't work.

The "git@hostname:path" syntax is a git shorthand for ssh based
authentication.  It requires a private key credential rather than a
username / password pair.

The private key you're currently using is probably stored in
~/.ssh/id_rsa.  That's the private key to use as the credential for that
repository.

If my guess of your meaning is incorrect, please provide more details of
what you mean when you say "I have this configured this way as well".

Mark Waite


>
> On Saturday, September 17, 2016 at 12:27:34 AM UTC-4, Mark Waite wrote:
>>
>> You need a credential that looks like this ->
>>
>> [image: github-username-password.png]
>>
>> You don't want a credential that looks like this ->
>> [image: github-rsa-private-key.png]
>>
>> Mark Waite
>>
>> On Fri, Sep 16, 2016 at 8:33 PM Hung  wrote:
>>
>>> Thanks, I will try to see if I can this to work a little more before
>>> trying
>>> to install older version of git.  I didn't any setting for me to choose
>>> https or ssh.  I just added the credentials in the SCM location when i
>>> added
>>> my repo.  I chose username and password and provided both.  Here is
>>> image of
>>> the credential in the Jenkins Credential Tab.
>>>
>>> <
>>> http://jenkins-ci.361315.n4.nabble.com/file/n4842697/Screen_Shot_2016-09-16_at_8.png
>>> >
>>>
>>> If there is a location in the Jenkins to say use https or ssh, please
>>> let me
>>> know.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html
>>> Sent from the Jenkins users mailing list archive at Nabble.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-use...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.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/5b502a96-a45a-44c4-920e-b7ef21f12a66%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/CAO49JtFG852VhBZbp%3DZ6HCP6uFw270-Zg_7z8zdhHZPyc4BA1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Mac Jenkins Can't Clone/fetch from GitHub

2018-01-11 Thread Eric
I have this configured this way as well, but it still hangs on:

git fetch --tags --progress git@git.world1:space.git 
> +refs/heads/*:refs/remotes/origin/*


SSH'ing into Jenkins and running git clone with the same key in ~/.ssh 
works just fine

git clone git@git.world1:space.git
>


On Saturday, September 17, 2016 at 12:27:34 AM UTC-4, Mark Waite wrote:
>
> You need a credential that looks like this ->
>
> [image: github-username-password.png]
>
> You don't want a credential that looks like this ->
> [image: github-rsa-private-key.png]
>
> Mark Waite
>
> On Fri, Sep 16, 2016 at 8:33 PM Hung  > wrote:
>
>> Thanks, I will try to see if I can this to work a little more before 
>> trying
>> to install older version of git.  I didn't any setting for me to choose
>> https or ssh.  I just added the credentials in the SCM location when i 
>> added
>> my repo.  I chose username and password and provided both.  Here is image 
>> of
>> the credential in the Jenkins Credential Tab.
>>
>> <
>> http://jenkins-ci.361315.n4.nabble.com/file/n4842697/Screen_Shot_2016-09-16_at_8.png
>> >
>>
>> If there is a location in the Jenkins to say use https or ssh, please let 
>> me
>> know.
>>
>>
>>
>> --
>> View this message in context: 
>> http://jenkins-ci.361315.n4.nabble.com/Mac-Jenkins-Can-t-Clone-fetch-from-GitHub-tp4842626p4842697.html
>> Sent from the Jenkins users mailing list archive at Nabble.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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/1474082919062-4842697.post%40n4.nabble.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/5b502a96-a45a-44c4-920e-b7ef21f12a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


dockerFingerprintFrom when the Dockerfile uses an ARG is not working from a pipeline

2018-01-11 Thread denis . antonioli
Hi

I have started using a Dockerfile build argument to simplify my 
dependencies between images.


Namely, I have Dockerfile to build the image "secret_project/name" looking 
like:

ARG parent_version
FROM secret_project/parent_name:${parent_version}


My jenkins pipeline lets maven build the docker image.
Once maven finishes, I want to use dockerFingerprintFrom


In my Jenkinsfile, I have:

dockerFingerprintFrom dockerfile: filePath, image: 
docker.image("secret_project/name").id


and the pipeline fails with:


java.io.IOException: Cannot retrieve .Id from 'docker inspect 
secret_project/parent_name:${parent_version}'


Looking around, I see that this bug has been fixed already by "JENKINS-46105 
Docker 17.05 ARG in FROM breaks docker inspect 
"
 



But I can't get it to work!


I have the exact same error with 
dockerFingerprintFrom dockerfile: filePath, image: 
docker.image("secret_project/name").id, buildArgs: ['parent_version': 
version]


How can I add the buildArgs to the dockerFingerprintFrom ?


Thanks
dna




-- 
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/84e84db1-8225-421d-898c-3d9e4123c749%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

2018-01-11 Thread Steven Foster
finally figured out the release process so hopefully the custom 
notification plugin should be available soon

On Friday, January 5, 2018 at 12:19:50 AM UTC, Ian Vernon wrote:
>
> I'll hold off until it is released to the plugin center before downloading 
> it.
>
> >  If github receives a duplicate context label it just replaces the 
> existing one, so this is helpful if you are doing more than one kind of 
> build for a repo.
>
> That explains it! That's so frustrating :( . Thanks for your help!
>
>
> On Thursday, January 4, 2018 at 11:24:39 AM UTC-8, Steven Foster wrote:
>>
>> Here is the repo for the custom github context plugin 
>> https://github.com/steven-foster/github-scm-trait-notification-context
>> I still need to actually release it to the plugin center, hopefully 
>> that's not too arduous.
>>
>> It lets you specify a context label for a multibranch project's github 
>> notifications. If github receives a duplicate context label it just 
>> replaces the existing one, so this is helpful if you are doing more than 
>> one kind of build for a repo.
>>
>> On Thursday, January 4, 2018 at 7:07:01 PM UTC, Ian Vernon wrote:
>>>
>>> > What do you mean “appears on GitHub”? Do you mean as a second status 
 check mark?

>>> Yes, that is correct. Only one check mark appears despite there being 
>>> two GitHub Organizations set up. If I change the aforementioned settings, 
>>> two check marks appear on GitHub, but I want to have the same behavior with 
>>> the plugin. 
>>>
>>>  > FYI: This plugin is completely ignored by multibranch.
>>>
>>> Is a GitHub Organization multibranch? 
>>>
>>> Regarding the custom notification context, is this what you are 
>>> referring to? https://issues.jenkins-ci.org/browse/JENKINS-36574
>>>
>>> Thanks for the quick reply!
>>>
>>

-- 
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/7e1b737e-9b51-4618-b4f7-6717940d53bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can I load a declarative Jenkinsfile via a shared library?

2018-01-11 Thread Joe Cavanaugh
You have to have the declarative pipeline 1.2 or higher to do this. I am 
having issues putting the "powershell" keyword in the library... otherwise 
it seems to work. 

On Thursday, January 11, 2018 at 1:41:50 AM UTC-6, Idan Adar wrote:
>
> Indeed possible. See blog post: 
> https://jenkins.io/blog/2017/10/02/pipeline-templates-with-shared-libraries/
>

-- 
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/8727eb84-c74c-4141-bf07-bedfdb9e764f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Building docker images with declarative pipeline

2018-01-11 Thread Mayur Nagekar
Hello all,

Do we have any update here ? i have been trying to use dockerfile as the 
agent to build a docker image from the Dockerfile in my source repo and 
then be able to run some unit tests within the container. 

I browsed all possible sources of documentation(see below) but still no 
luck. Has the cloudbees or jenkins guys been able to make progress here ? 
Or may be I don't know.
https://jenkins.io/doc/book/pipeline/syntax/#agent
https://dzone.com/refcardz/declarative-pipeline-with-jenkins

Appreciate your help here.

Thanks,
Mayur


On Wednesday, February 15, 2017 at 3:05:19 AM UTC+5:30, Andrew Bayer wrote:
>
> Right now, we don't have a great answer for this other than to use 
> Scripted Pipeline docker.build(...) within a script { } block - we don't 
> allow "foo.bar()" or "foo = bar()" syntax in steps blocks in Declarative 
> unless they're within a script block. Anything within a script block 
> doesn't go through validation, so you can use the full Scripted Pipeline 
> syntax there. That said, we are thinking about how to make this clearer in 
> the future so that you can build/deploy images without having to use script 
> {}.
>
> A.
>
> On Tue, Feb 14, 2017 at 2:32 PM, Thomas Fjellstrom  > wrote:
>
>> Hi,
>>
>> I'm brand new to jenkins, and have been reading a lot about the pipeline 
>> plugin. I think I have a basic grasp of it, but I haven't been able to 
>> figure out the proper syntax to build docker images in a pipeline stage. I 
>> don't want to run the steps IN a docker container, but rather build 
>> containers (multiple containers) in a pipeline Jenkinsfile. I also have 
>> some other requirements, like accessing credentials setup in the jenkins 
>> interface, and a private docker registry.
>>
>> Any help would be appreciated.
>>
>> -- 
>> 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/fff6ea30-6b51-4f46-8516-8da8026c4241%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/e25fb1d3-d9e7-4fb7-8009-f4e90444824b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Jenkins Plugins

2018-01-11 Thread Victor Martinez

On Thursday, 11 January 2018 06:35:51 UTC, Dirk Heinrichs wrote:
>
> Am 11.01.2018 um 00:59 schrieb ABostonGal ABostonGal:
>
> What part is wrong? Can you elaborate on how to update the plugins then?
>
>
> Errh, really? OK, go to *Manage Jenkins* -> *Manage Plugins* (you will be 
> right in the *Update* tab), select the ones you want to update, click 
> *Download 
> now and install after restart*, restart Jenkins when appropriate.
>
> Should also be in the docs, btw.
>

https://jenkins.io/doc/book/managing/plugins/
 

>
> HTH...
>
> Dirk
> -- 
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenTextTM Discovery | Recommind
> *Email*: dirk.he...@recommind.com 
> *Website*: www.recommind.de
>
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
>
> Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon 
> Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 
> 10646
>
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) 
> please notify the sender immediately and destroy this e-mail. Any 
> unauthorized copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
> Weitergabe dieser Mail sind nicht gestattet.
>

-- 
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/9931dee9-160b-4585-94cf-f8ed0ffd79a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.