Re: Running shell commands with sudo in pipeline

2019-03-21 Thread Jon Hermansen
Parichay,

It sounds like your user (or more specifically, the user the
Jenkinsfile runs as) does not belong to the docker group.

https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user

The docker command acts as a client to the docker daemon, and by
default, they communicate using a special socket file,
/var/run/docker.sock -- which is owned by the docker group. To be able
to write to it, you can add your user(s) to the same group.

On Thu, Mar 21, 2019 at 7:03 PM Parichay Barpanda
 wrote:
>
> Umm.. I'm trying to develop on a plugin(specifically Blue ocean plugin). To 
> do a dry run, I'm using the command mvn hpi:run. Now when creating a pipleine 
> with my repository containing the Jenkinsfile as mentioned above, I'm unable 
> to access the docker command inside the pipeline script because docker is 
> installed under the root user on my local machine.
>
> To be more clear, on my local machine when I have to run a docker command, I 
> use a sudo prefix to run it. Like sudo docker run .. I want a workaround for 
> this problem.
>
> On Fri 22 Mar, 2019, 04:24 Baptiste Mathus >
>> I'm a bit lost: are you trying to use Jenkins, or develop a plugin?
>>
>> Can you please clarify your use case?
>>
>> Thanks
>>
>> Le jeu. 21 mars 2019 à 21:06, Parichay Barpanda 
>>  a écrit :
>>>
>>> In my case if I am not running the Jenkins in a docker but on my local 
>>> machine where I have docker installed under root user.
>>>
>>> So for creating the agent, docker command needs to run with sudo priviledge 
>>> but as you suggest I shouldn't give that priviledge to Jenkins agent.
>>>
>>> Now I have 2 options:
>>>
>>> 1) Either run a Jenkins instance as a docker container
>>>
>>> 2) Or Install docker for my user in my local machine
>>>
>>> If you think there is a better way then I would like to know. Thanks for 
>>> the help, I would see next time that appropriate topics are posted in the 
>>> appropriate group.
>>>
>>> On Friday, March 22, 2019 at 1:20:24 AM UTC+5:30, Mark Waite wrote:

 This is a good question for the users list rather than the developers 
 list.  The developers list is generally used for topics related to the 
 development of Jenkins and the plugins which run on Jenkins.  Your 
 question is more about using Jenkins than developing something that will 
 extend or enhance Jenkins.

 In general, you don't want to run a Jenkinsfile as root.  That's granting 
 far more permission to the Jenkinsfile than should be granted and places 
 the machine at risk of damage from innocent user mistakes.  It is less 
 dangerous to allow the agent user to run docker than to allow the agent 
 user to use sudo to become root.

 On Thu, Mar 21, 2019 at 1:45 PM Parichay Barpanda  
 wrote:
>
> I am running a plugin on my local machine with this command:
>
> mvn hpi:run
>
> My repository contains a Jenkinsfile which runs a docker image to build a 
> latex document.
>
> Jenkinsfile looks like:
>
> pipeline {
>agent none
>stages {
>   stage('Build') {
>  agent {
> docker {
>image 'blang/latex:ubuntu'
> }
>  }
>  steps {
>  sh 'xelatex sample.tex'
>  }
>   }
>}
> }
>
> Since the Jenkins instance is running on my local machine and in my local 
> machine docker is installed for the root user only so I need a way to 
> execute the Jenkinsfile with sudo permission.
>
> I recieve an error like this:
>
> + docker pull blang/latex:ubuntu
> Got permission denied while trying to connect to the Docker daemon socket 
> at unix:///var/run/docker.sock: Post 
> http://%2Fvar%2Frun%2Fdocker.sock/v1.39/images/create?fromImage=blang%2Flatex&tag=ubuntu:
>  dial unix /var/run/docker.sock: connect: permission denied
> script returned exit code 1
>
> Can anyone suggest a way how I can run docker with root permission inside 
> the Jenkins pipeline?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/b0106f8f-fa09-4dc7-98a3-f7bdff9f0d6f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



 --
 Thanks!
 Mark Waite
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to jenkinsci-dev+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.goog

Re: [Jenkins World 2018] - Graders wanted

2018-04-13 Thread Jon Hermansen
Hey Alyssa,

I'd love to participate, sign me up.

I'm a long time user of Jenkins, was co-organizer of the LA JAM, and more
recently became the maintainer for a Jenkins plugin. I'd really like to
take this opportunity to learn even more about Jenkins and related
technologies. I also love reading and going to conferences. I believe we
met at Jenkins World a few years ago.

Thanks!

On Fri, Apr 13, 2018 at 12:09 PM Alyssa Tong  wrote:

> Hello,
>
> I am looking for additional graders to join the Jenkins World (JW) review
> committee to help grade Jenkins World 2018 SF & EU proposals.
>
> Time commitment expected:
>
>- JW SF: 137 Jenkins submissions.
>- JW EU: 76 Jenkins submissions at the moment but most likely will
>increase after close of CFP this Sunday.
>
> What you get:
>
>- Pix, bio on the Committee webpage (part of JW website)
>- JW swag
>- Free conference ticket to JW
>
> Criteria:
>
>- You love to read and has a keen mind for the latest and greatest,
>trendy technical topics
>
> Pls respond to this thread if you're interested.
>
> BR,
> alyssa
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAC9wNaxGJ-r-Jz%3D1Nyx7otR0TsHEYDPR-V-sR%2B%3D5JRCTsZNbRw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Password Reset Emails Not Going Out

2018-02-16 Thread Jon Hermansen
Should the login system really confirm/deny the existence of users here? I
haven't tested this, that's just how the error message reads.

https://www.owasp.org/index.php/Testing_for_User_Enumeration_and_Guessable_
User_Account_(OWASP-AT-002)#Other_ways_to_enumerate_users

On Wed, Feb 14, 2018 at 4:04 PM, Chuck Burgess  wrote:

> Hey Daniel,
>
> Didn't receive the email, so if you've confirmed the send is working, then
> it must be the php.net email relay that's stopping it.  I'll see about
> getting it checked.
>
> Thanks for confirming the jenkins.io side of it :+1
> CRB
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/aa8bc033-b6f9-4691-bc24-123b34549341%
> 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 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANpo23JyiFqC1H0NCUp-9mAB-teP1kjr2UgbeNwD25TQYsW8sA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request to become maintainer for docker-custom-build-environment-plugin

2018-02-16 Thread Jon Hermansen
Thanks Jesse. I'll look into the integration when I can. If you have any
pointers on where to start, that would be helpful and much appreciated.

On Feb 15, 2018 9:29 AM, "Jesse Glick"  wrote:

Posting here was correct. I was just adding a parenthetical comment
about extending a bug fix I had developed to work with this plugin as
well; you can disregard my message.

--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/jenkinsci-dev/CANfRfr2V5c%2BJY%2BVVsJCMTVLpDuDq4h9OtrzWw
03dp82mqK6ZGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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


Re: Request to become maintainer for docker-custom-build-environment-plugin

2018-02-14 Thread Jon Hermansen
Hey Jesse,

I'm not sure exactly what you mean. I'm managing Docker credentials using 
environment variables already, but I know this plugin does make use of some 
of docker-commons. I'm trying to get an existing functional bug fixed ( 
https://issues.jenkins-ci.org/browse/JENKINS-34403 ), not necessarily add a 
feature.

Michael Neale mentioned that it's better for me to have the same Jenkins 
username as my GitHub account, so I created a new Jenkins user: jonhermansen

Sorry for the confusion. Let me know how I should proceed if posting here 
is not the correct forum.

Thanks.

On Friday, February 9, 2018 at 8:27:12 AM UTC-5, Jesse Glick wrote:
>
> BTW if I thought the plugin were maintained I might file an 
> integration with 
> https://github.com/jenkinsci/docker-commons-plugin/pull/67 (probably 
> easy). 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/cc00c83e-c75b-4481-a3a2-aa0b30ce99bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Request to become maintainer for docker-custom-build-environment-plugin

2018-02-09 Thread Jon Hermansen
Hi,

I'm a long time user of Jenkins. I've been involved somewhat in the 
community (was co-organizer of Los Angeles Jenkins Meetup), I've also 
submitted some minor bug fixes to various plugins on GitHub. Just 
yesterday, I ran into a bug in this plugin at $work, found that there's a 
PR open to fix it since April 2016, and I would like to get this fix in 
upstream if I could.

It looks like someone requested maintainership late last year, but the wiki 
page still mentions the need for one. I'd like to volunteer!

GitHub ID: jonhermansen

Jenkins ID: jh86

Please let me know what the next steps might be, and if I can do anything 
to help move the process along.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/80d6795e-5b8f-40b8-8f99-4b89935fd85b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.