Re: commonLibFolder : Jenkins within docker

2024-02-07 Thread tzach solomon
What worked for me is environment variable JENKINS_OPTS liek this 
JENKINS_OPTS=--commonLibFolder=/root/my_jars/

On Monday 25 July 2016 at 02:48:16 UTC+3 ZT wrote:

> sorry for the delay, i got tied up with workarounds but this continues to 
> be an issue.
>
> My goal is to load some custom jars into Jenkins so I am mounting this 
> directory already. 
>
> When i use docker-compose 
>
> I have to do something like 
> docker-compose run -d --commonLibFolder={libDirectoryLocation} << This 
> works perfectly
>
> I looked into this a bit and jenkins sets this as sun.java.command, so in 
> the jenkins system information page , i can see 
> sun.java.command /usr/share/jenkins/jenkins.war 
> --commonLibLocation={libDirectoryLocation}
>
> I am trying to find an alternate way to do this, so that i don't have to 
> type in such a big command (one of the purposes of docker compose)
>
> I have tried a few things
> - Environment variables(sun.java.command) - This creates a second entry 
> and does not work
> - JENKINS_OPTS , JENKINS_ARGS (i have used this approach outside docker to 
> customize classpath)
>
> Nothing seems to work, i am sure i am am missing something but i can't 
> figure out what..
>
>
>

-- 
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/30f3131c-07da-4a69-bd63-dcaf0baa42d4n%40googlegroups.com.


heap memory recommended for jenkins with docker (JAVA_OPTS)

2021-06-16 Thread Mahesh Waikar


What should be minimum and maximum recommended size for heap memory in 
JENKINS as per ram size ?

While starting jenkins server on Docker container, generally pass JAVA_OPTS 
parameter for heap memory allocation. There parameters are given below, 
Use -Xmx to specify the maximum heap size
 Use -Xms to specify the initial 
Java heap size
 Use -Xss to set the Java thread stack size

The example command would be: 

```
docker run --name myjenkins -p 8080:8080 -p 5:5 --env 
JAVA_OPTS=-Xmx512m-Xms512m  Dhudson.footerURL=http://mycompany.com 
jenkins/jenkins:lts 

```

-- 
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/898556ed-4b78-4d3e-a72b-206d8ce6476cn%40googlegroups.com.


Re: I installed Jenkins in docker

2020-03-22 Thread Mark Waite
https://github.com/jenkinsci/docker/blob/master/README.md#preinstalling-plugins
provides documentation that describes various alternatives to install
plugins into a Docker image.

The Docker solutions page includes many useful resources to assist.  See it
at https://jenkins.io/solutions/docker/

On Sun, Mar 22, 2020 at 8:45 PM hongyi pan 
wrote:

> I installed Jenkins in docker. After installing the plug-in, how can I
> permanently save it to the host? Because I need to make it a mirror image
> and migrate it to other hosts. I haven't found a good way. Please help me.
>
> --
> 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/de057ead-9437-4bdf-a585-5b3eb9fa3cd3%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/de057ead-9437-4bdf-a585-5b3eb9fa3cd3%40googlegroups.com?utm_medium=email_source=footer>
> .
>

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


I installed Jenkins in docker

2020-03-22 Thread hongyi pan
I installed Jenkins in docker. After installing the plug-in, how can I 
permanently save it to the host? Because I need to make it a mirror image 
and migrate it to other hosts. I haven't found a good way. Please help me.

-- 
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/de057ead-9437-4bdf-a585-5b3eb9fa3cd3%40googlegroups.com.


Re: I want to build ios project in jenkins(linux docker container)

2020-02-28 Thread Dirk Heinrichs
Am Freitag, den 28.02.2020, 03:08 -0800 schrieb Steven Gao:

everyone said that must run jenkins on mac


I guess what they meant was: "In order to build an IOS project, you'd better 
run a Jenkins AGENT on a Mac, not your Jenkins itself.".


Check out the various Jenkins Agent (formerly known as Slave) plugins (SSH, 
Swarm, ...) to find one that fits your needs an use that to connect a Mac agent 
tou your main Jenkins.


Other than that, it MIGHT be possible to (cross-) build IOS projects on Linux, 
but I'm not sure since I'm not an IOS developer.


HTH...


Dirk

--

Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@opentext.com
Website: www.recommind.de
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, 
Christian Waida, 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/de40278543d67bcb4f57b4f5ac54fb96d77f3c87.camel%40opentext.com.


I want to build ios project in jenkins(linux docker container)

2020-02-28 Thread Steven Gao
Hi guys:
  I want to build IOS & Android project in jenkins, but my jenkins server 
in linux docker container, always fail.

  I checked a lot of information and did not find a good solution, everyone 
said that must run jenkins on mac...

 Does anyone have a good way?


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/ac4bc42d-ecdf-4b24-813d-7b601d2c0431%40googlegroups.com.


Re: About recommended RAM memory limit for Jenkins master docker for k8s deployment

2020-02-03 Thread Mahesh Wabale

I am able to free cache memory for Jenkins master pod docker container . As 
per docker image behaviour its taking resources from k8s node where it is 
deployed . 

You can verify memory usage by below commands from docker container . 

bash-4.4$ cat /sys/fs/cgroup/memory/memory.limit_in_bytes

bash-4.4$ cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes

bash-4.4$ cat /sys/fs/cgroup/memory/memory.stat | grep cache

bash-4.4$ 



Solution , delete *cache memory for k8s node where your Jenkins master pod 
docker container is running* , there will be no downtime required for 
Jenkins service . 
Following document help me : 
https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/
 

Thanks , 

On Thursday, January 30, 2020 at 2:57:30 AM UTC+5:30, James Nord wrote:
>
> unfortunately there is no quick answer.
> I have seen much bigger instances work flawlessly with 4GB and much 
> smaller instances need 32GB.
>
> the big difference is on what plugins you have installed, especially 
> around report visualisation / transformation and if you are using pipelines 
> that you are following best practices and not putting build logic into the 
> pipeline bit only flow.
>
> as with any service in production I would recommend a monitoring service 
> that shows you the pods consumed memory / CPU and JVM heap / off heap 
> memory along with GC logs and tune based on your actual workload.  
> with k8s I would recommend that you specify a request and limit for CPU 
> and memory to avoid any suprises, the memory will need some headroom o we 
> what Jenkins itself uses as it will often spawn processes for SCM 
> integration / polling
>
>

-- 
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/69bf1bc8-e7f8-4181-adfa-b70900128021%40googlegroups.com.


About recommended RAM memory limit for Jenkins master docker for k8s deployment

2020-01-29 Thread James Nord
unfortunately there is no quick answer.
I have seen much bigger instances work flawlessly with 4GB and much smaller 
instances need 32GB.

the big difference is on what plugins you have installed, especially around 
report visualisation / transformation and if you are using pipelines that you 
are following best practices and not putting build logic into the pipeline bit 
only flow.

as with any service in production I would recommend a monitoring service that 
shows you the pods consumed memory / CPU and JVM heap / off heap memory along 
with GC logs and tune based on your actual workload.  
with k8s I would recommend that you specify a request and limit for CPU and 
memory to avoid any suprises, the memory will need some headroom o we what 
Jenkins itself uses as it will often spawn processes for SCM integration / 
polling

-- 
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/e8f12b1b-ce59-47c2-a988-b6328c440e20%40googlegroups.com.


About recommended RAM memory limit for Jenkins master docker for k8s deployment

2020-01-29 Thread Mahesh Wabale
My Jenkins is deployed on k8s , i have configured 60 slaves in setup which are 
also on k8s, there are around 60 concurrent builds are expected . Using NFS 4.1 
. Want to understand what should be recommended size for RAM size  limit in GB 
for Jenkins  master docker image so that my setup will work without any issues 
. Or should it be unlimited .

-- 
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/d03f2351-8c8f-46ba-8d25-f092d0aafd6d%40googlegroups.com.


Re: Running Jenkins in Docker on Windows 7 - missing info on Getting started with the Guided Tour page

2018-09-01 Thread Mark Waite
Docker on Windows requires Windows 10.  Running Docker on Windows 7
requires a workaround.  The tutorial is stating correct information.

It is also correct to perform the steps as described in the tutorial.  The
tutorial says:

Download and run Jenkins
<https://jenkins.io/doc/pipeline/tour/getting-started/#download-and-run-jenkins>

   1.

   Download Jenkins
   <http://mirrors.jenkins.io/war-stable/latest/jenkins.war>.
   2.

   Open up a terminal in the download directory.
   3.

   Run java -jar jenkins.war --httpPort=8080.
   4.

   Browse to http://localhost:8080.
   5.

   Follow the instructions to complete the installation.


The Jenkins executable file (jenkins.war) is downloaded (by the browser of
your choice or wget or curl or another program).  Open a Windows command
prompt window (terminal) in the download directory.  Assure that Java 8 is
the Java version you're running (`java -version`).  Run java -jar
jenkins.war

Once that is running, open a web browser to http://localhost:8080/

None of those steps have involved Docker in any way.  The requirement for
Docker comes later in the tutorial.  The tutorial is trying to state all
the requirements in advance.  Those first 5 steps don't use Docker.

Thanks!
Mark Waite

On Sat, Sep 1, 2018 at 6:34 AM Tony C  wrote:

> That tutorial states that Docker requires Windows 10, and that installing
> the Docker Toolbox on Windows 7 and other platforms, is a *required*.
> workaround.
>
>
> On Thursday, August 30, 2018 at 9:21:42 PM UTC-7, Mark Waite wrote:
>
>> The example intentionally has you run Jenkins without using Docker.  The
>> requirement for Docker comes in later steps of that tutorial.
>>
>> On Thu, Aug 30, 2018 at 5:53 PM Tony C  wrote:
>>
>
>>> Under Prerequisites,
>>>
>>> I've just installed the Docker toolbox on Windows 7 as directed by this
>>> page:
>>>
>>> https://jenkins.io/doc/pipeline/tour/getting-started/
>>>
>>> Under Download and run Jenkins
>>> downloading jenkins.war is *outside *of Docker.
>>>
>>> How do you download & run jenkins.war INSIDE of the Docker image?
>>>
>>> I think there is a huge disconnect on this page.- >
>>> https://jenkins.io/doc/pipeline/tour/getting-started/
>>>
>>> --
>>> 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/89d2025f-efe6-48e9-ad36-be4a547efc3b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/89d2025f-efe6-48e9-ad36-be4a547efc3b%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> 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/26394537-d7a4-4448-9c97-f9467424d7e7%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/26394537-d7a4-4448-9c97-f9467424d7e7%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CAO49JtEbH0jfgwQuZSaNBw_VyUwprCMm0R5kCYTBmWJ5GUSHFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Jenkins in Docker on Windows 7 - missing info on Getting started with the Guided Tour page

2018-09-01 Thread Tony C
That tutorial states that Docker requires Windows 10, and that installing 
the Docker Toolbox on Windows 7 and other platforms, is a *required*. 
workaround.


On Thursday, August 30, 2018 at 9:21:42 PM UTC-7, Mark Waite wrote:
>
> The example intentionally has you run Jenkins without using Docker.  The 
> requirement for Docker comes in later steps of that tutorial.
>
> On Thu, Aug 30, 2018 at 5:53 PM Tony C > 
> wrote:
>
>>
>> Under Prerequisites,
>>
>> I've just installed the Docker toolbox on Windows 7 as directed by this 
>> page:
>>
>> https://jenkins.io/doc/pipeline/tour/getting-started/
>>
>> Under Download and run Jenkins
>> downloading jenkins.war is *outside *of Docker.
>>
>> How do you download & run jenkins.war INSIDE of the Docker image?
>>
>> I think there is a huge disconnect on this page.- >
>> https://jenkins.io/doc/pipeline/tour/getting-started/
>>
>> -- 
>> 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/89d2025f-efe6-48e9-ad36-be4a547efc3b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/89d2025f-efe6-48e9-ad36-be4a547efc3b%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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/26394537-d7a4-4448-9c97-f9467424d7e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to run Jenkins inside docker container through ansible

2018-05-23 Thread Victor Martinez
Although this is not a question about using jenkins itself but how to use 
ansible and more specifically using the docker_container task. It smells 
like the command parameter is overriding the default behaviour of the 
jenkins image...

My two cents

-- 
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/ab4ee1bb-2e18-4f4a-8741-4456cae9c545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to run Jenkins inside docker container through ansible

2018-05-21 Thread Ramanathan Muthaiah

>
> This is starting the container but not able to run jenkins due to which i 
> am not able to login to jenkins host.
>
> Can anyone guide me what do to ?
>

Have you looked at the Docker container logs? 

/Ram

-- 
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/8d2fb2ec-0bb7-435d-a361-24856b0f0603%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Unable to run Jenkins inside docker container through ansible

2018-05-21 Thread Bishwajit Samanta
Dear All,

I am not able to run jenkins inside docker container using ansible 
playbook. Jenkins is getting started but unable to run it 


- name: Download Jenkins Container
  docker_container: 
name: Jenkins_server 
image: jenkins 
state: started 
ports: 
  - "8080:8080"
  - "5:5"
command: sleep 1d 
volumes: 
  - /data 

This is starting the container but not able to run jenkins due to which i 
am not able to login to jenkins host.

Can anyone guide me what do to ?

-- 
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/4df7d6b5-4d20-48d9-9550-71d3fe54600f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins in docker ... pipeline script from SCM ... sh 'adb devices...' not working

2018-01-04 Thread Victor Martinez
You might get some benefits of adding some -x debug traces in the script 
'./start_environment_new.sh' to know what it does under the hood.

Besides of that, did you check whether those docker images should be attach 
to a particular version? it might be related to the usage of 'latest' by 
default and maybe there were some releases recently.

Cheers

-- 
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/eb750762-001c-4ad9-8e5a-8f8d465fdbd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins in docker ... pipeline script from SCM ... sh 'adb devices...' not working

2018-01-04 Thread Cepin
Hi all,
machine with centos 7
Docker version 17.12.0-ce, build c97c6d6
Jenkins ver. 2.60.3
all plugins updated

situation:
Jenkins (running in container Alpine linux) is configured to download 
Jenkins file from gitlab and the start some containers (based on 
debian:stretch-slim) and run there some scriptsthe Jenkins file looks 
like:

node {
stage('Git fetch') {
git poll: false, changelog: false, url: 
'https://XXX/gitlab/test.git', credentialsId: 'DOL', branch: 'master'
}
def appium_ready = false
withDockerServer([uri: "tcp://localhost:2376"]) {
parallel Cucumber: {
stage ('Starting Cucumber')
{
try {
docker.image('docker_ruby').inside('--user root:root 
--net=host') {
echo 'Waiting for Appium'
waitUntil {
  sleep 2
  return (appium_ready == true)
}
try {


//  Show start HERE 
sh 'cucumber -t @add_unread -t ~@wip'


}
catch ( error ) {
cucumber 'report.json'
}
cucumber 'report.json'
}
}
catch ( error ) {
sh 'curl 
http://localhost:/lifecycle-manager/LifecycleServlet?action=shutdown || 
echo "Selenium server unreachable";exit 1' //shutdown selenium & fail
}
sh 'curl 
http://localhost:/lifecycle-manager/LifecycleServlet?action=shutdown || 
echo "Selenium server unreachable"'
}
},
Appium: {
stage ('Starting Appium')
{
*docker.image('docker_appium').inside('--user root:root 
--net=host') {*
*sh 'adb devices; cd scripts && 
./start_environment_new.sh 2>&1 >/dev/null'*
appium_ready = true
sh 'PID_SEL=`cat /tmp/selenium.pid`; while( ps -p 
$PID_SEL > /dev/null ); do sleep 5;done' // wait doesn't work
}
}
}
}
}


Everything works fine but when it is in the "*sh 'adb devices; cd scripts 
&& ./start_environment_new.sh 2>&1 >/dev/null'*" then it will timeout and 
say "*Shell Script script returned exit code -2*"
The shell script starts with usual: "#!/bin/bash"

All this approach was working fine until most probably something was 
updated ... docker, Jenkins plugins, some host OS stuff. 

Please don't you anybody have same issue a ideally fix for it? I found some 
hints on google but nothing was working for me :(.

Here is the CLI output:

[Pipeline] }[Pipeline] // stage[Pipeline] withDockerServer[Pipeline] 
{[Pipeline] parallel[Pipeline] [Cucumber] { (Branch: Cucumber)[Pipeline] 
[Appium] { (Branch: Appium)[Pipeline] [Cucumber] stage[Pipeline] [Cucumber] { 
(Starting Cucumber)[Pipeline] [Appium] stage[Pipeline] [Appium] { (Starting 
Appium)[Pipeline] [Cucumber] sh[Cucumber] [voicemail_ta_android] Running shell 
script[Pipeline] [Appium] sh[Cucumber] + docker inspect -f . docker_ruby
[Appium] [voicemail_ta_android] Running shell script
[Appium] + docker inspect -f . docker_appium
[Cucumber] .
[Appium] .[Pipeline] [Cucumber] withDockerContainer[Cucumber] Jenkins seems to 
be running inside container 
9350a6f58ccb1db7fcac229dee8079a191aed4452b1403e3ee4b43f92c63
[Cucumber] $ docker run -t -d -u 1000:1000 --user root:root --net=host -w 
/var/jenkins_home/workspace/voicemail_ta_android --volumes-from 
9350a6f58ccb1db7fcac229dee8079a191aed4452b1403e3ee4b43f92c63 -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  --entrypoint cat 
docker_ruby[Pipeline] [Cucumber] {[Pipeline] [Appium] 
withDockerContainer[Appium] Jenkins seems to be running inside container 
9350a6f58ccb1db7fcac229dee8079a191aed4452b1403e3ee4b43f92c63
[Appium] $ docker run -t -d -u 1000:1000 --user root:root --net=host -w 
/var/jenkins_home/workspace/voicemail_ta_android --volumes-from 
9350a6f58ccb1db7fcac229dee8079a191aed4452b1403e3ee4b43f92c63 -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  --entrypoint cat 
docker_appium[Pipeline] [Appium] {[Pipeline] [Cucumber] echo[Cucumber] Waiting 
for Appium[Pipeline] [Cucumber] waitUntil[Pipeline] [Cucumber] {[Pipeline

Re: ssh authentication in jenkins/jenkins:lts docker image hangs during clone

2017-12-23 Thread Mark Waite
If the passphrase contains characters which are expanded by the shell, then
the shell expansion may damage the passphrase and cause the ssh command to
hang prompting for a passphrase.

Shell expansion shouldn't be invoked on the characters of the passphrase.
I consider that a bug, but a bug that is not yet fixed.

Mark Waite

On Sat, Dec 23, 2017 at 2:37 AM Ozgur Cagdas <ocag...@gmail.com> wrote:

>
> Hi,
>
>
> I am running a container created off jenkins/jenkins:lts docker image on
> 64-bit Ubuntu 16.04.1 LTS and git poll and clone operations hang when I use
> ssh authentication with an ssh key with passphrase
>
> Started on Dec 22, 2017 1:47:55 PM
>
> Polling SCM changes on master
> Using strategy: Default
> > git rev-parse --is-inside-work-tree # timeout=10
> Fetching changes from the remote Git repositories
> > git config remote.origin.url g...@github.com:username/repo_path.git #
> timeout=10
> Fetching upstream changes from g...@github.com:username/repo_path.git
> > git --version # timeout=10
> using GIT_SSH to set credentials test-key
> > git fetch --tags --progress g...@github.com:username/repo_path.git
> +refs/heads/*:refs/remotes/origin/* # timeout=3
>
>
> This is the ps output when the poll hangs
>
> jenkins   2405  0.0  0.0  15604  1080 13:49 git ls-remote -h
> g...@github.com:username/repo_path.git HEAD
> jenkins   2409  0.0  0.0   4288   800 13:49 /bin/sh
> /tmp/ssh852924073958836602.sh g...@github.com git-upload-pack
> 'username/repo_path.git'
> jenkins   2410  0.0  0.0  47248  5616 13:49 ssh -i
> /tmp/ssh253076704069644928.key -l jenkins -o StrictHostKeyChecking=no
> g...@github.com git-upload-pack 'username/repo_path.git'
>
>
> The jenkins plugins that are used are the latest available git, git
> client, ssh agent and ssh credentials.
>
> When I run the ssh -i line on the console manually, it does prompt for
> password and then interacts with the remote git server as expected.
>
> Another input is, if I clone the repo with username/password
> authentication over https and assign the passphrase ssh credentials to the
> jenkins item in the configuration, I can still interact with the remote
> repo in jenkins execute shell.
>
> If I resort to using a key without a passphrase, it all works fine. I saw
> quite a few people complaining about similar issues on different forums but
> there doesn't seem to be an answer about if there is a solution for it and
> what the issue is. I am not sure if this is a jenkins, jenkins plugin,
> docker or just a configuration issue. So, pointers to identify the issue is
> appreciated.
>
> Regards,
>
> Oz
>
> --
> 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/9c7908f7-df01-4a25-a927-d02a50641832%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/9c7908f7-df01-4a25-a927-d02a50641832%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CAO49JtEt_2bd4RRH02wUVjcbLPFyQFn2u8VZq00o6jzjJ85j6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ssh authentication in jenkins/jenkins:lts docker image hangs during clone

2017-12-23 Thread Ozgur Cagdas


Hi,


I am running a container created off jenkins/jenkins:lts docker image on 
64-bit Ubuntu 16.04.1 LTS and git poll and clone operations hang when I use 
ssh authentication with an ssh key with passphrase

Started on Dec 22, 2017 1:47:55 PM

Polling SCM changes on master
Using strategy: Default
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
> git config remote.origin.url g...@github.com:username/repo_path.git # 
timeout=10
Fetching upstream changes from g...@github.com:username/repo_path.git
> git --version # timeout=10
using GIT_SSH to set credentials test-key
> git fetch --tags --progress g...@github.com:username/repo_path.git 
+refs/heads/*:refs/remotes/origin/* # timeout=3


This is the ps output when the poll hangs

jenkins   2405  0.0  0.0  15604  1080 13:49 git ls-remote -h 
g...@github.com:username/repo_path.git HEAD
jenkins   2409  0.0  0.0   4288   800 13:49 /bin/sh 
/tmp/ssh852924073958836602.sh g...@github.com git-upload-pack 
'username/repo_path.git'
jenkins   2410  0.0  0.0  47248  5616 13:49 ssh -i 
/tmp/ssh253076704069644928.key -l jenkins -o StrictHostKeyChecking=no 
g...@github.com git-upload-pack 'username/repo_path.git'


The jenkins plugins that are used are the latest available git, git client, 
ssh agent and ssh credentials.

When I run the ssh -i line on the console manually, it does prompt for 
password and then interacts with the remote git server as expected.

Another input is, if I clone the repo with username/password authentication 
over https and assign the passphrase ssh credentials to the jenkins item in 
the configuration, I can still interact with the remote repo in jenkins 
execute shell.

If I resort to using a key without a passphrase, it all works fine. I saw 
quite a few people complaining about similar issues on different forums but 
there doesn't seem to be an answer about if there is a solution for it and 
what the issue is. I am not sure if this is a jenkins, jenkins plugin, 
docker or just a configuration issue. So, pointers to identify the issue is 
appreciated.

Regards,

Oz

-- 
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/9c7908f7-df01-4a25-a927-d02a50641832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Where to COPY my app files, etc when jenkins pipeline docker container runtime settings are overriding my Dockerfile settings?

2017-09-11 Thread Daniel Petersen
Greetings,
I'm trying to setup a pipeline where a container is built, run, and 
appropriate tests run in the container, all during the job. The challenge 
I'm hitting is that jenkins seems to be overriding my WORKDIR and USER that 
I specify in my Dockerfile. My Dockerfile looks like this:
FROM nodesource/nsolid:alpine

# Create `app` group and user since the base nodesource image
# doesn't currently.
RUN addgroup -g 1000 app \
&& adduser -G app -u 1000 -h /app -D app

USER app
WORKDIR /app
ENV NODE_ENV=development
COPY package.json /app/package.json
COPY . /app
RUN npm install

In my pipeline I'm doing this:
testci_env = docker.build(testci_imageTag, '-f docker/Dockerfile.test .')
   testci_env.inside("--net=${network}") {
 try {
   sh 'npm run test-ci'
 } catch(err) {
   currentBuild.result = 'FAILED'
 }
   }  //end testci_env.inside


In Jenkins output I'm seeing that it's building the image as I would 
expect, but then it's overriding the WORKDIR and USER settings I've 
specified in my Dockerfile when it runs 'docker run' to create a container:

docker run -t -d -u 233:233 
--net=tmp_hrs_jenkins-sandbox-hrs_build_image_test1-66 -w 
/home/jenkins/workspace/sandbox/hrs_build_image_test1 --volumes-from 
c51d585c10d38a36ce98726508144026399c6d1b4cca590c87a3dd19cb73893d -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  -e  -e 
 -e  -e  -e  -e  --entrypoint cat 
tmp_hrs_testci_d5f106f-66


The issue as I see it is jenkins overriding a lot of my Dockerfile settings:
*my WORKDIR in Dockerfile will be overridden by jenkins during runtime
*The COPY directive in the Dockerfile isn't going to put my application 
files where Jenkins will later override the WORKDIR to point to
*jenkins is going to override the user to 'jenkins'

The result of course is my application tests can't run properly because the 
env isn't as specified in the Dockerfile.

I have tried passing in the relevant arguments -w and -u on the .inside 
line, just like I'm doing with the --net arg, but jenkins simply appends 
them to what it already thinks it should be doing, so I end up with my -w 
as well as jenkins -w, etc, which of course isn't helping.

It's possible I'm not approaching this in the way the docker functionality 
inside jenkins pipelines was intended to be used. How are folks working 
around the issues I'm hitting?

I've had a hard time finding detailed documentation that covers the 
docker.build and .inside methods in detail, as well as best practices for 
using them.

Regards,
Daniel

-- 
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/2019dfca-c00e-4690-add0-3360f9a9618b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins and Docker

2017-09-05 Thread nicolas de loof
The chapter you refer to is about running Jenkins as a docker container. If
you used another installation process, just ignore
That being said, docker is a nice complement to jenkins, and is used in
various samples in documentation, including Declarative Pipeline. So I
recommend you install it so you're not limited in your newcomer experience
(install docker4mac/windows, it's just about few clicks)

2017-09-05 16:21 GMT+02:00 Tibbs <tiberiuk...@gmail.com>:

> I'm sorry if this has been asked before but I am new to both Jenkins and
> virtualised containers and couldn't find something related to my question.
>
> Can anyone tell me if I need Docker in order to use Jenkins? I am slightly
> puzzled by Jenkins documentation saying the you need to have Docker
> *properly* installed ( https://jenkins.io/doc/book/
> getting-started/installing/#docker ).
>
> I installed Jenkins on my local pc without Docker. How would Docker help
> here? Is it really needed?
>
> 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/a5e3e8f0-e993-4844-b1a5-0a799e4bff35%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/a5e3e8f0-e993-4844-b1a5-0a799e4bff35%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CANMVJzmbfZ%3DUgB%3D9bCCP5W8ak0i4pe4wF1W_83PHG%3DidvP%3DsSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins and Docker

2017-09-05 Thread Tibbs
I'm sorry if this has been asked before but I am new to both Jenkins and 
virtualised containers and couldn't find something related to my question.

Can anyone tell me if I need Docker in order to use Jenkins? I am slightly 
puzzled by Jenkins documentation saying the you need to have Docker 
*properly* installed ( 
https://jenkins.io/doc/book/getting-started/installing/#docker 
).

I installed Jenkins on my local pc without Docker. How would Docker help 
here? Is it really needed?

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/a5e3e8f0-e993-4844-b1a5-0a799e4bff35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread Jake Bishop
Yes, that makes sense. I think this is acceptable in our scenario.
Thanks for the pointer. 

If you (or anyone else here) has any links to examples it would be greatly 
appreciated 


> On 10. Jul 2017, at 17:48, nicolas de loof  wrote:
> 
> it means a build with some "malicious code" (sic) could access all other 
> builds, secrets injected into a build environment by jenkins, all host 
> ressources, etc. It could as well create by intent or because of some buggy 
> script create thousands containers and exhaust host resources. 
> 
> consider docker.sock as some super-root access to your build node.
> 
> 2017-07-10 17:45 GMT+02:00 Yakobe  >:
> The security of these jenkins builds are not critical since they are just for 
> testing. Therefore it sounds perhaps a simpler approach.
> However, i'm interested in what the issues are with build isolation. Does 
> that mean that build could fail, and under what sort of circumstance?
> 
> -- 
> 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/6fadf55e-ccff-4e9a-951b-8e9731e8c01a%40googlegroups.com
>  
> .
> 
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/jenkinsci-users/GgLlUPWRLcQ/unsubscribe 
> .
> To unsubscribe from this group and all its topics, 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/CANMVJzkm%2BJFqFKROs-0%2BgNM9ovo-ThT0zSF%3DrtRxe9PS5D51uQ%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 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/3ED55313-39B8-420A-88B2-4EA2F017FD54%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread nicolas de loof
it means a build with some "malicious code" (sic) could access all other
builds, secrets injected into a build environment by jenkins, all host
ressources, etc. It could as well create by intent or because of some buggy
script create thousands containers and exhaust host resources.

consider docker.sock as some super-root access to your build node.

2017-07-10 17:45 GMT+02:00 Yakobe :

> The security of these jenkins builds are not critical since they are just
> for testing. Therefore it sounds perhaps a simpler approach.
> However, i'm interested in what the issues are with build isolation. Does
> that mean that build could fail, and under what sort of circumstance?
>
> --
> 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/6fadf55e-ccff-4e9a-951b-8e9731e8c01a%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/CANMVJzkm%2BJFqFKROs-0%2BgNM9ovo-ThT0zSF%3DrtRxe9PS5D51uQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread Yakobe
The security of these jenkins builds are not critical since they are just 
for testing. Therefore it sounds perhaps a simpler approach.
However, i'm interested in what the issues are with build isolation. Does 
that mean that build could fail, and under what sort of circumstance?

-- 
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/6fadf55e-ccff-4e9a-951b-8e9731e8c01a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread nicolas de loof
Not so simple

bind mounting docker.sock means you give access to anything on host, so you
just give up with security and isolation between builds.
Docker in Docker require some adequate combination for the docker daemon
setup to be nested, especially on how it stores containers layers on disk
(and then, nested layers for second level docker daemon). play-with-docker
uses device mapper + overlay2 with success.


2017-07-10 17:36 GMT+02:00 Yakobe :

> Then it sounds like this i achievable. Thanks so much for the response. At
> least i know that this is something worth looking in to.
>
> I read somewhere about this Docker in Docker approach (i think it is
> sometimes referred to as DinD?). Some people where saying it is not a good
> idea.
> Am i right in understanding that it is better to bind mount
> /var/run/docker.sock?
>
> --
> 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/a65338f8-a2da-4a3a-93dd-224d8b3fb74b%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/CANMVJzmcX%3D-ZGixBJprfXUSqWWXeTr9WcWZnJp-%3D2%2BC%3DJE9doQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread Yakobe
Then it sounds like this i achievable. Thanks so much for the response. At 
least i know that this is something worth looking in to.

I read somewhere about this Docker in Docker approach (i think it is 
sometimes referred to as DinD?). Some people where saying it is not a good 
idea.
Am i right in understanding that it is better to bind mount 
/var/run/docker.sock?

-- 
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/a65338f8-a2da-4a3a-93dd-224d8b3fb74b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread nicolas de loof
You have two options :

1. use a Docker in Docker image (play-with-docker.com for sample is using
this approach)
2. bind mount /var/run/docker.sock into your build container so you can
interact with the host's docker daemon

Both of them involve some security consideration, so you might need to
double check your infrastructure requirements.

2017-07-10 15:11 GMT+02:00 Yakobe :

> The main aim behind this post is to find out if this is even possible
> before losing too much time. So if anyone could any insight at all it would
> be greatly 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/fa88594b-1780-48d5-aad6-c4a960e8dae1%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/CANMVJz%3D_5tZTEnCyk_DWZqmAxwjambWP1yyYtr6v0A_5baLyeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins running docker container slaves that run builds using docker

2017-07-10 Thread Yakobe
The main aim behind this post is to find out if this is even possible 
before losing too much time. So if anyone could any insight at all it would 
be greatly 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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fa88594b-1780-48d5-aad6-c4a960e8dae1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline Docker Permissions

2017-07-10 Thread Richard Bywater
Took me a while to come back but just wanted to point out the group
approach is what is "recommended" by Docker in the docs @
https://docs.docker.com/engine/installation/linux/linux-postinstall/ So
definitely the least hacky of all the solutions :)

Richard.

On Sun, 9 Jul 2017 at 06:55 Dan Kinon <dan.ki...@agent.ai> wrote:

> I'm running centos7 and installing pre-packaged docker 1.12.6 from epel7.
> I did see the suggestion out in the wild to add the jenkins user to the
> "docker" (specifically "dockerroot" on my installation) group.  I tried
> this early on and it had no effect.  I noticed that the unix socket
> (/var/run/docker.sock) was owned user root and group root with 660
> permissions so that is why adding the jenkins user to the dockerroot group
> had no effect.  To solve this issue, I had to change the group ownership on
> the socket by modifying /etc/sysconfig/docker and adding
> `--group=dockerroot` to the OPTIONS variable:
>
>> OPTIONS='--selinux-enabled --log-driver=journald
>> --signature-verification=false --group=dockerroot'
>>
>
> Once I did this (in combination with adding the jenkins user to the
> dockerroot group) and restarted docker everything worked.  This still feels
> a little hacky but at least it doesn't carry the negative security
> implications of some of the other solutions I mentioned.
>
> It would still be nice to have some semblance of control over how jenkins
> pipeline accesses/calls docker but this will do for now.  Thanks for
> pointing me back in the docker group direction.
>
> On Friday, July 7, 2017 at 3:10:12 PM UTC-7, Richard Bywater wrote:
>
>> I haven't checked for a while but it used to be that if you add a user to
>> the "docker" group they'll be able to access docker commands.
>>
>> Richard
>>
>> On Sat, 8 Jul 2017, 9:27 AM Dan Kinon <dan@agent.ai> wrote:
>>
> Hello,
>>>I'm running jenkins as a non-root user and am attempting to use a
>>> docker agent in my jenkinsfile.  When I run the job, I get the following
>>> error:
>>> 
>>> [VA_Build_containers_develop-NJECFMY5Y6Z5OKTQVWTCSYEZEVQKAXGGRGECV2LSFA2YZ2ALBWQQ]
>>> Running shell script
>>> + docker inspect -f . docker:1.12.6
>>> .
>>> Failed to run image 'docker:1.12.6'. Error: /usr/bin/docker-current:
>>> Cannot connect to the Docker daemon. Is the docker daemon running on this
>>> host?.
>>> See '/usr/bin/docker-current run --help'.
>>> ~~~
>>>
>>>The root cause of course is that docker is running as root and
>>> jenkins is not.  The "solution" I've found on the internet is to open up
>>> permissions to the world on the docker.sock or to add a tcp connecter to
>>> docker.  While that may functionally get me what I want that is a hack not
>>> a best practice solution IMHO.
>>>
>>>I want to tell Jenkins docker agent to execute docker via sudo (as
>>> I've given the jenkins user all required permissions via sudoers) but I
>>> can't figure out how.  Is there any way to currently do this or is this a
>>> feature request.
>>>
>>> Thanks in advance,
>>> -Dan
>>>
>>> --
>>> 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/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> 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/c3035dda-a79c-4dde-8bdf-d21908cd9866%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/c3035dda-a79c-4dde-8bdf-d21908cd9866%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CAMui946m8LmmM%2B8scNYywpgjarB5JbxQJY9v81%3Dsj0RTrSNiVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins running docker container slaves that run builds using docker

2017-07-09 Thread Yakobe
Hello everyone,

Here is my desired scenario:

A master jenkins server that can spin up containerized jenkins slaves using 
docker as required.
These slaves can use docker / docker-compose to build projects and run 
tests.
I would preferably like to use swarm / ECS to run all these containers 
(both the slaves and the builds & tests).

Is this even possible? If so, could someone point me in the right 
direction? I'm willing to do a lot of investigation etc. I have been trying 
to find documentation / guides but have not come up with anything concrete 
for this double-docker solution yet. Any help would be much appreciated.

Jake

-- 
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/f415ad5a-01b8-468d-b6af-49e29bfb5d6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline Docker Permissions

2017-07-08 Thread Dan Kinon
I'm running centos7 and installing pre-packaged docker 1.12.6 from epel7. 
 I did see the suggestion out in the wild to add the jenkins user to the 
"docker" (specifically "dockerroot" on my installation) group.  I tried 
this early on and it had no effect.  I noticed that the unix socket 
(/var/run/docker.sock) was owned user root and group root with 660 
permissions so that is why adding the jenkins user to the dockerroot group 
had no effect.  To solve this issue, I had to change the group ownership on 
the socket by modifying /etc/sysconfig/docker and adding 
`--group=dockerroot` to the OPTIONS variable:

> OPTIONS='--selinux-enabled --log-driver=journald 
> --signature-verification=false --group=dockerroot'
>

Once I did this (in combination with adding the jenkins user to the 
dockerroot group) and restarted docker everything worked.  This still feels 
a little hacky but at least it doesn't carry the negative security 
implications of some of the other solutions I mentioned.

It would still be nice to have some semblance of control over how jenkins 
pipeline accesses/calls docker but this will do for now.  Thanks for 
pointing me back in the docker group direction.

On Friday, July 7, 2017 at 3:10:12 PM UTC-7, Richard Bywater wrote:
>
> I haven't checked for a while but it used to be that if you add a user to 
> the "docker" group they'll be able to access docker commands.
>
> Richard
>
> On Sat, 8 Jul 2017, 9:27 AM Dan Kinon <dan@agent.ai > 
> wrote:
>
>> Hello,
>>I'm running jenkins as a non-root user and am attempting to use a 
>> docker agent in my jenkinsfile.  When I run the job, I get the following 
>> error:
>> 
>> [VA_Build_containers_develop-NJECFMY5Y6Z5OKTQVWTCSYEZEVQKAXGGRGECV2LSFA2YZ2ALBWQQ]
>>  
>> Running shell script
>> + docker inspect -f . docker:1.12.6
>> .
>> Failed to run image 'docker:1.12.6'. Error: /usr/bin/docker-current: 
>> Cannot connect to the Docker daemon. Is the docker daemon running on this 
>> host?.
>> See '/usr/bin/docker-current run --help'.
>> ~~~
>>
>>The root cause of course is that docker is running as root and jenkins 
>> is not.  The "solution" I've found on the internet is to open up 
>> permissions to the world on the docker.sock or to add a tcp connecter to 
>> docker.  While that may functionally get me what I want that is a hack not 
>> a best practice solution IMHO.
>>
>>I want to tell Jenkins docker agent to execute docker via sudo (as 
>> I've given the jenkins user all required permissions via sudoers) but I 
>> can't figure out how.  Is there any way to currently do this or is this a 
>> feature request.
>>
>> Thanks in advance,
>> -Dan
>>
>> -- 
>> 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/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> 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/c3035dda-a79c-4dde-8bdf-d21908cd9866%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline Docker Permissions

2017-07-07 Thread Richard Bywater
I haven't checked for a while but it used to be that if you add a user to
the "docker" group they'll be able to access docker commands.

Richard

On Sat, 8 Jul 2017, 9:27 AM Dan Kinon <dan.ki...@agent.ai> wrote:

> Hello,
>I'm running jenkins as a non-root user and am attempting to use a
> docker agent in my jenkinsfile.  When I run the job, I get the following
> error:
> 
> [VA_Build_containers_develop-NJECFMY5Y6Z5OKTQVWTCSYEZEVQKAXGGRGECV2LSFA2YZ2ALBWQQ]
> Running shell script
> + docker inspect -f . docker:1.12.6
> .
> Failed to run image 'docker:1.12.6'. Error: /usr/bin/docker-current:
> Cannot connect to the Docker daemon. Is the docker daemon running on this
> host?.
> See '/usr/bin/docker-current run --help'.
> ~~~
>
>The root cause of course is that docker is running as root and jenkins
> is not.  The "solution" I've found on the internet is to open up
> permissions to the world on the docker.sock or to add a tcp connecter to
> docker.  While that may functionally get me what I want that is a hack not
> a best practice solution IMHO.
>
>I want to tell Jenkins docker agent to execute docker via sudo (as I've
> given the jenkins user all required permissions via sudoers) but I can't
> figure out how.  Is there any way to currently do this or is this a feature
> request.
>
> Thanks in advance,
> -Dan
>
> --
> 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/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> 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/CAMui944_88%3Da0m%2BcXf0t5PRSY-73TS-Nsk-oxV2SiQb6rsnCYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Pipeline Docker Permissions

2017-07-07 Thread Dan Kinon
Hello,
   I'm running jenkins as a non-root user and am attempting to use a docker
agent in my jenkinsfile.  When I run the job, I get the following error:

[VA_Build_containers_develop-NJECFMY5Y6Z5OKTQVWTCSYEZEVQKAXGGRGECV2LSFA2YZ2ALBWQQ]
Running shell script
+ docker inspect -f . docker:1.12.6
.
Failed to run image 'docker:1.12.6'. Error: /usr/bin/docker-current: Cannot
connect to the Docker daemon. Is the docker daemon running on this host?.
See '/usr/bin/docker-current run --help'.
~~~

   The root cause of course is that docker is running as root and jenkins
is not.  The "solution" I've found on the internet is to open up
permissions to the world on the docker.sock or to add a tcp connecter to
docker.  While that may functionally get me what I want that is a hack not
a best practice solution IMHO.

   I want to tell Jenkins docker agent to execute docker via sudo (as I've
given the jenkins user all required permissions via sudoers) but I can't
figure out how.  Is there any way to currently do this or is this a feature
request.

Thanks in advance,
-Dan

-- 
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/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins running docker container with uid/gid that do not exist

2017-03-06 Thread Ashok Modi
Hi,

I have a Jenkinsfile with the following docker step:

  agent {
dockerfile {
  filename "Dockerfile"
}
  }
  steps {
  sh 'cd sites/all/themes/custom/zen; npm install; gulp'
  }


And my Dockerfile consists of: 

FROM node:7.7

RUN npm install gulp gulp-cli -g



Which installs the npm packages that are required by the project and runs 
the necessary gulp commands as well. When I try doing the step without 
Jenkins (manually docker run) the script runs correctly. However, when I 
run via Jenkins and the Jenkinsfile, I get permission denied errors with 
the files the attempted install paths being quite different from where they 
would normally be. On further investigation of the jenkins command:

docker run -t -d -u 110:115 -w /workspace-dir -v 
/workspace-dir:/workspace-dir:rw ...


I found that the -u flag was using the uid/gid of my Jenkins user on the host 
(which does not exist in my image). Currently, my jenkins install is not via 
jenkins (its installed via apt on an ubuntu server). So I'm not entirely sure 
of what would be the best approach to this issue. Should I be creating a user 
with the same uid/gid via docker? Or is there some other recommended approach 
to do this?


-- 
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/e0ec06df-b645-46a1-b7c8-9b38ea807601%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins and Docker With Windows Containers

2017-01-23 Thread Andrew Gray
Hey,

I am trying to use Docker Containers as build slaves for our Jenkins 
environment using the Docker Plugin. From Jenkins, I am able to provision a 
slave, and the docker container appears on my Jenkins Executor list, 
however it stays "offline".
I appears like the the container is being started and connects, but it 
stays offline. On my Docker server, the container shows a status of Exited 
(0). Below I posted the Agent's logs. After "waiting" for a while, it times 
out.

Has anyone been able to successfully use the Jenkins Docker Plugin with 
Windows Containers?

I am using this version of the Docker-Plugin:
https://jenkins.ci.cloudbees.com/job/plugins/job/docker-plugin/15/com.nirima$docker-plugin/

>From the logs:

Starting connection command for 32234...
Successfully executed jnlp connection for 32234...

Waiting slave connection...

Waiting slave connection...

Waiting slave connection...





-- 
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/049025b9-59c4-4da6-982a-db4dedd9e427%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins with Docker

2016-10-19 Thread nicolas de loof
RTFM :P
https://github.com/jenkinsci/docker#preinstalling-plugins

2016-10-19 15:47 GMT+02:00 <erick.kend...@smiledirectclub.com>:

> I can launch a Docker container with Jenkins but I still have to login to
> the Jenkins URL and perform the final steps of adding plugins.
>
> Does anyone know how to install or script in a way that doesn't require
> these manual steps?
>
>
> --
> 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/c5e81fa8-6d69-4c8e-9fb4-64179c566e2d%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/c5e81fa8-6d69-4c8e-9fb4-64179c566e2d%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CANMVJzkhGODOzWxrxZrTP-x%3DiLxm4Pw%3D_fiY%3Dfb6U4nu1euRcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins with Docker

2016-10-19 Thread erick . kendall
I can launch a Docker container with Jenkins but I still have to login to 
the Jenkins URL and perform the final steps of adding plugins.

Does anyone know how to install or script in a way that doesn't require 
these manual steps? 


-- 
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/c5e81fa8-6d69-4c8e-9fb4-64179c566e2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Recommended to inject self-signed certificates in Jenkins official docker image

2016-10-09 Thread sleipnir
Thanks for the answer.
I was precisely trying to avoid maintaining a custom image just for the 
certificates, but if I don't have a choice, I'll go with it.


On Sunday, October 9, 2016 at 12:42:02 PM UTC-4, Victor Martinez wrote:
>
> If I understood correctly you don't need to custom anything but using the 
> FROM instruction in your Dockerfile to specify what Jenkins official image 
>  you would like to use and on the top of it you can set your certificates 
> accordingly:
>
> FROM jenkins:2.19.1
> COPY whatever_credentials /whatever_location
>  
> That's the advantage of using docker, reusing someone else's images and 
> specify your configuration by using the other docker instructions. It's 
> worth using some SCM tool to track any changes in your Dockerfile.
>
> Cheers
>
>
> On Sunday, 9 October 2016 16:43:50 UTC+1, sleipnir wrote:
>>
>> Hi there
>>
>> I am using the official jenkins image available here 
>> https://hub.docker.com/_/jenkins/ and everything is fine so far.
>> But in order to run my builds I need to install some self-signed 
>> certificates to access some internal servers, and I would rather keep using 
>> the default image and not create a custom one.
>>
>> What would be the proper clean way to tell the jenkins image to install 
>> my certificates ? 
>>
>> 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/9440eb9f-ed02-40d1-b48f-4bb7d2f38f7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Recommended to inject self-signed certificates in Jenkins official docker image

2016-10-09 Thread Victor Martinez
If I understood correctly you don't need to custom anything but using the 
FROM instruction in your Dockerfile to specify what Jenkins official image 
 you would like to use and on the top of it you can set your certificates 
accordingly:

FROM jenkins:2.19.1
COPY whatever_credentials /whatever_location
 
That's the advantage of using docker, reusing someone else's images and 
specify your configuration by using the other docker instructions. It's 
worth using some SCM tool to track any changes in your Dockerfile.

Cheers


On Sunday, 9 October 2016 16:43:50 UTC+1, sleipnir wrote:
>
> Hi there
>
> I am using the official jenkins image available here 
> https://hub.docker.com/_/jenkins/ and everything is fine so far.
> But in order to run my builds I need to install some self-signed 
> certificates to access some internal servers, and I would rather keep using 
> the default image and not create a custom one.
>
> What would be the proper clean way to tell the jenkins image to install my 
> certificates ? 
>
> 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/2248c83f-aaec-45e8-b61d-89c2c395cd7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Recommended to inject self-signed certificates in Jenkins official docker image

2016-10-09 Thread sleipnir
Hi there

I am using the official jenkins image available here 
https://hub.docker.com/_/jenkins/ and everything is fine so far.
But in order to run my builds I need to install some self-signed 
certificates to access some internal servers, and I would rather keep using 
the default image and not create a custom one.

What would be the proper clean way to tell the jenkins image to install my 
certificates ? 

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/cb117954-cc9f-4c3a-b35a-394b40dc1b3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: commonLibFolder : Jenkins within docker

2016-07-24 Thread ZT
sorry for the delay, i got tied up with workarounds but this continues to be an 
issue.

My goal is to load some custom jars into Jenkins so I am mounting this 
directory already. 

When i use docker-compose 

I have to do something like 
docker-compose run -d --commonLibFolder={libDirectoryLocation} << This works 
perfectly

I looked into this a bit and jenkins sets this as sun.java.command, so in the 
jenkins  system information page , i can see 
sun.java.command/usr/share/jenkins/jenkins.war 
--commonLibLocation={libDirectoryLocation}

I am trying to find an alternate way to do this, so that i don't have to type 
in such a big command (one of the purposes of docker compose)

I have tried a few things
 - Environment variables(sun.java.command) - This creates a second entry and 
does not work
 - JENKINS_OPTS , JENKINS_ARGS (i have used this approach outside docker to 
customize classpath)

Nothing seems to work, i am sure i am am missing something but i can't figure 
out what..


-- 
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/e4626f1e-048d-46aa-80cb-1f64740dadf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: commonLibFolder : Jenkins within docker

2016-07-24 Thread ZT
sorry for the delay, i got tied up with workarounds but this continues to be an 
issue.

My goal is to load some custom jars into Jenkins so I am mounting this 
directory already. 

When i use docker-compose 

I have to do something like 
docker-compose run -d --commonLibFolder={libDirectoryLocation} << This works 
perfectly

I looked into this a bit and jenkins sets this as sun.java.command, so in the 
jenkins  system information page , i can see 
sun.java.command/usr/share/jenkins/jenkins.war 
--commonLibLocation={libDirectoryLocation}

I am trying to find an alternate way to do this, so that i don't have to type 
in such a big command (one of the purposes of docker compose)

I have tried a few things
 - Environment variables(sun.java.command) - This creates a second entry and 
does not work
 - JENKINS_OPTS , JENKINS_ARGS (i have used this approach outside docker to 
customize classpath)

Nothing seems to work, i am sure i am am missing something but i can't figure 
out what..


-- 
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/6a9c7631-0edd-4e04-a959-d556e4871a44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins in docker including email credentials

2016-06-24 Thread Daniel Beck
https://wiki.jenkins-ci.org/display/JENKINS/Post-initialization+script may be 
an alternative to copying files around. It'll require some knowledge of Jenkins 
internals though.

I don't know how far along 
https://github.com/jenkinsci/system-config-dsl-plugin is, but it may be an 
alternative to the above in the near(ish) future.


> On 24.06.2016, at 12:28, Wesley Connor <wesleyjcon...@gmail.com> wrote:
> 
> I am setting up a docker image which will start Jenkins in a known state, 
> this will be deployed to multiple users to run standalone and it will 
> populate its jobs from a dsl script in a separate repository.
> 
> By copying the files that I need from a running Jenkins instance I have been 
> able to configure the Dockerfile so it starts with all relevant config set 
> (plugins, configuration, email addresses etc)
> However, I am unable to set the credentials for sending mail in the Mail 
> plugin, I have tried importing all secret.key files and including all the 
> files from the secrets directory. 
> The problem is when I start up the instance Jenkins detects that there is 
> possibly something wrong and then resets all the encrypted files. I realise 
> that security is a good thing and Jenkins is doing the right thing, however I 
> am fine with the email password being saved as the image will only be used 
> internally.
> 
> Does anyone know the files I need to include so that I can preset the 
> password for Jenkins or alternatively a way that i can set the email 
> credentials on the command line, so that I can include it as a step when 
> starting Jenkins, inside the docker image?
> 
> 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/b3152fe7-a74f-4a18-96bf-9098ad79a974%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/4E59BCFD-0800-4986-A3A9-3C5EF8124AB4%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Jenkins in docker including email credentials

2016-06-24 Thread Wesley Connor
I am setting up a docker image which will start Jenkins in a known state, 
this will be deployed to multiple users to run standalone and it will 
populate its jobs from a dsl script in a separate repository.

By copying the files that I need from a running Jenkins instance I have 
been able to configure the Dockerfile so it starts with all relevant config 
set (plugins, configuration, email addresses etc)
However, I am unable to set the credentials for sending mail in the Mail 
plugin, I have tried importing all secret.key files and including all the 
files from the secrets directory. 
The problem is when I start up the instance Jenkins detects that there is 
possibly something wrong and then resets all the encrypted files. I realise 
that security is a good thing and Jenkins is doing the right thing, however 
I am fine with the email password being saved as the image will only be 
used internally.

Does anyone know the files I need to include so that I can preset the 
password for Jenkins or alternatively a way that i can set the email 
credentials on the command line, so that I can include it as a step when 
starting Jenkins, inside the docker image?

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/b3152fe7-a74f-4a18-96bf-9098ad79a974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: latest Jenkins on Docker

2016-05-19 Thread nicolas de loof
use https://hub.docker.com/_/jenkinsci/jenkins

jenkins official image only do host LTS releases.

2016-05-19 9:47 GMT+02:00 Jeeva Chelladhurai <sje...@gmail.com>:

> Where I can find the latest docker image for Jenkins?
> https://hub.docker.com/_/jenkins/ does not have Jenkins 2.0 or later
> images...
>
>
> Thanks,
> Jeeva
>
> --
> 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/a1af84d1-7bb0-48a9-8e05-36730376cff4%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/a1af84d1-7bb0-48a9-8e05-36730376cff4%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CANMVJz%3DsB7wFnfreZhuP%3D9%2B80KRRtFNyaKfKF3ezXbUe6YR7TQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


latest Jenkins on Docker

2016-05-19 Thread Jeeva Chelladhurai
Where I can find the latest docker image for Jenkins? 
https://hub.docker.com/_/jenkins/ does not have Jenkins 2.0 or later 
images...


Thanks,
Jeeva

-- 
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/a1af84d1-7bb0-48a9-8e05-36730376cff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: commonLibFolder : Jenkins within docker

2016-05-18 Thread Baptiste Mathus
IIUC your issue has just to do with the fact the file you're passing is
located on the host, hence not accessible to the container.
So, you're left with two options:
* the right one: inherit the official image and customize it with a
dedicated Dockerfile
* the quick and dirty one: bind mount the file you need (using -v) so that
it can be found when the Jenkins container starts. Note that you want to
avoid docker bind-mounts in general, so IMO this solution would possibly
only be used for quickly PoCing what you want.

Cheers
Le 16 mai 2016 10:44 PM, "ZT" <rahul.mishr...@gmail.com> a écrit :

> I am trying to enhance the Jenkins classpath with custom additional jars.
>
> While i am aware that we can include it through the additional classpath
> of groovy plugins . I am currently looking for a more generic option so i
> can run the jar code through jenkins scripting console (besides regular
> jobs) as well.
>
> In a non docker environment, augmenting
> JENKINS_ARGS="--commonLibFolder={filePath}"  while starting jenkins works.
>
> However, when i give the following line in my dockerfile (extending
>  jenkins docker image)
>
> *ENV JENKINS_ARGS --commonLibFolder={filePath}.*
>
> This doesn't work. When i try to load a class from the jar i get a failure
> saying the class cannot be resolved.
>
> Has anyone got this to work within docker? Or any other pointers to
> accomplish this?
>
> Thanks for your help
>
> ZT
>
> --
> 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/e2c7a120-b305-419f-8768-5cb6803b3899%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/e2c7a120-b305-419f-8768-5cb6803b3899%40googlegroups.com?utm_medium=email_source=footer>
> .
> 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/CANWgJS7fkQyWA33KWe8b_Vo7acXETuE9eUF51%2BZ8eS9CiAb9rQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


commonLibFolder : Jenkins within docker

2016-05-16 Thread ZT
I am trying to enhance the Jenkins classpath with custom additional jars.

While i am aware that we can include it through the additional classpath of 
groovy plugins . I am currently looking for a more generic option so i can 
run the jar code through jenkins scripting console (besides regular jobs) 
as well.

In a non docker environment, augmenting 
JENKINS_ARGS="--commonLibFolder={filePath}"  while starting jenkins works.

However, when i give the following line in my dockerfile (extending 
 jenkins docker image)

*ENV JENKINS_ARGS --commonLibFolder={filePath}.*

This doesn't work. When i try to load a class from the jar i get a failure 
saying the class cannot be resolved.

Has anyone got this to work within docker? Or any other pointers to 
accomplish this? 

Thanks for your help

ZT

-- 
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/e2c7a120-b305-419f-8768-5cb6803b3899%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins job -> docker run hello-world fails with error docker: Cannot connect to the Docker daemon.

2016-03-22 Thread 80Vikram
Hi All,

I'm trying to setup jenkins on Linux VM

I created a sample job with shell step as docker run hello-world

Job is failing with error as below


[Test-1-2] $ /bin/sh -xe /tmp/hudson643651586166715818.sh
+ docker run hello-world
docker: Cannot connect to the Docker daemon. Is the docker daemon running 
on this host?.
See 'docker run --help'.




If I run this command in command prompt , it works perfectly.

Kindly clarify


Thanks in advance.


Regards,

Vikram

-- 
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/ad4612a6-84fc-4f9b-a94c-e80ca14e0d4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Correct way to stop jenkins in docker

2015-11-18 Thread Baptiste Mathus
Kill -9 should always be a last resort solution.

docker stop should work.

But beware the stop timeout. If for some reason your Jenkins instance takes
more than 10 seconds to stop gracefully, docker will then kill (-9) it.
In that case use the option to possibly make that timeout a bit higher.
Cheers
Le 18 nov. 2015 3:04 PM, "Stanislav Baiduzhyi" <baiduzhyi.de...@gmail.com>
a écrit :

> The obvious option to stop dockered jenkins would be:
> docker stop some-container-name
>
> But is that the correct way, or is it similar to kill -9 and there is
> a proper way of stopping it "gently"?
>
> Regards,
> Stanislav
>
> --
> 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/CAFHiie7Rcsu4B2xWbNN5gJv%3DOn4H83Xaf0BS3inCtrezqtgBsQ%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 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/CANWgJS4wAo%2BYZv0xKiQJ1CTw%2BighQb_2efUHazn49hxbWNdQVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Correct way to stop jenkins in docker

2015-11-18 Thread Stanislav Baiduzhyi
The obvious option to stop dockered jenkins would be:
docker stop some-container-name

But is that the correct way, or is it similar to kill -9 and there is
a proper way of stopping it "gently"?

Regards,
Stanislav

-- 
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/CAFHiie7Rcsu4B2xWbNN5gJv%3DOn4H83Xaf0BS3inCtrezqtgBsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


jenkins in docker

2015-11-05 Thread jb
Hello all,

I am new to docker and jenkins and decided to pull in the official jenkins 
docker image. I have two containers running separate instances of jenkins 
on different ports.

I started a container with the below command:
docker run -d -p 8082:8080 -u 1003:1002 -v 
/webappsjenkins:/var/jenkins_home --name webappsjenkins jenkins

I started my second container with the next command:
docker run -d -p 8081:8080 -u 1002:1002 -v /mesjenkins:/var/jenkins_home 
--name mesjenkins jenkins


So I'm aware each container is supposed to host everything needed for it's 
own instance. Also my -v switch should have put everything needed for 
/var/jenkins_home in where I specified. I also believe JDK and Maven are 
included in the image. 

My ultimate question is what are the paths to jdk and maven from the 
official docker image? 

If this doesn't make sense please let me know and I will try to specify any 
additional information needed. I could not find this information on any of 
the resources I used:
https://github.com/jenkinsci/docker
https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin
http://www.catosplace.net/blog/2015/02/11/running-jenkins-in-docker-containers/

-- 
CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use 
by the addressee(s) named herein and may contain legally privileged and/or 
confidential information. If you are not the intended recipient of this 
e-mail message, you are hereby notified that any dissemination, 
distribution or copying of this e-mail message, and any attachments 
thereto, is strictly prohibited. If you have received this e-mail message 
in error, please immediately notify the sender and permanently delete the 
original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT 
INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the Uniform 
Electronic Transactions Act or the applicability of any other law of 
similar substance and effect, absent an express statement to the contrary 
hereinabove, this e-mail message its contents, and any attachments hereto 
are not intended to represent an offer or acceptance to enter into a 
contract and are not otherwise intended to bind the sender, Sanmina 
Corporation (or any of its subsidiaries), or any other person or entity.

-- 
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/25319913-994d-452e-a030-0d57fab5440e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jenkins in docker

2015-11-05 Thread Baptiste Mathus
inline.

2015-11-05 18:04 GMT+01:00 jb <josh.beve...@sanmina.com>:

> Hello all,
>
> I am new to docker and jenkins and decided to pull in the official jenkins
> docker image. I have two containers running separate instances of jenkins
> on different ports.
>
> I started a container with the below command:
> docker run -d -p 8082:8080 -u 1003:1002 -v
> /webappsjenkins:/var/jenkins_home --name webappsjenkins jenkins
>
> I started my second container with the next command:
> docker run -d -p 8081:8080 -u 1002:1002 -v /mesjenkins:/var/jenkins_home
> --name mesjenkins jenkins
>
>
> So I'm aware each container is supposed to host everything needed for it's
> own instance. Also my -v switch should have put everything needed for
> /var/jenkins_home in where I specified. I also believe JDK and Maven are
> included in the image.
>
> My ultimate question is what are the paths to jdk and maven from the
> official docker image?
>

JDK:

$ docker run --rm java:8-jdk which java
/usr/bin/java

I don't think Maven is included. In my opinion, this is a good thing: you
should generally try not to run things on your master.


> If this doesn't make sense please let me know and I will try to specify
> any additional information needed. I could not find this information on any
> of the resources I used:
> https://github.com/jenkinsci/docker
> https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin
>

IIUC what you're trying to do, this plugin has nothing to do here. It's
designed to run nodes (aka slaves) in Docker containers. (In your case
here, that would then you would have the master running in Docker,
contacting slaves, running in containers).

HTH

-- Baptiste

-- 
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/CANWgJS5zjOMTinsdjGSrLiLCvsDa6%3D_aEZsQcbFF9VAwxv%3DOXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.