Re: enable environment variables and add variable from Dockerfile

2017-09-05 Thread Li Z
Still have not find any solution yet. 

On Wednesday, August 30, 2017 at 2:34:17 PM UTC-7, Li Z wrote:
>
> Is there a way to enable environment variables and add variable from 
> Dockerfile or a init.groovy.d script?
>
> 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/cfbadd8a-e0a4-4253-9e4b-77e41103c469%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


User log in or last time logged in history

2017-09-01 Thread Li Z
Is there any way to see user last logged in date (time) in Jenkins? 

Manage user page only show use userId and name. 

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/63df95a0-e830-4c02-b172-bed732f66373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


enable environment variables and add variable from Dockerfile

2017-08-30 Thread Li Z
Is there a way to enable environment variables and add variable from 
Dockerfile or a init.groovy.d script?

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/99b7fc94-1b39-4c03-b5df-5f7671173399%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to disable Plugin Management from Web GUI

2017-08-30 Thread Li Z
Thanks Stephen! It works. I will test to see what kind of side-effects it 
will have. 

On Tuesday, August 29, 2017 at 11:02:34 PM UTC-7, Li Z wrote:
>
> Currently, we are deploying Jenkins server using Jenkins Docker image and 
> extending the image by adding some needed plugin using Dockerfile. 
>
> We do not want Jenkins' users (admins), manually install plugins from Web 
> GUI. 
>
> Is possible to disable and remove Manage Plugin link from Jenkins Web GUI?
>
> 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/07726cd1-43a7-4f83-a77d-18b1d116d38c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to disable Plugin Management from Web GUI

2017-08-30 Thread Li Z
Currently, we are deploying Jenkins server using Jenkins Docker image and 
extending the image by adding some needed plugin using Dockerfile. 

We do not want Jenkins' users (admins), manually install plugins from Web 
GUI. 

Is possible to disable and remove Manage Plugin link from Jenkins Web GUI?

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/0515e112-c0d1-4a92-acfe-795eac0da477%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jenkins docker image create first admin user

2017-08-29 Thread Li Z
Thanks Jacob! It is exactly what I am looking for. 
Found a link with code 
too https://gist.github.com/hayderimran7/50cb1244cc1e856873a4

On Tuesday, August 29, 2017 at 11:14:18 AM UTC-7, Jacob Larsen wrote:
>
> Yes. Put this snippet into a .groovy file, e.g. usercreate.groovy:
>
> instance = Jenkins.getInstance()
>
> def hudsonRealm = new hudson.security.HudsonPrivateSecurityRealm(false)
> hudsonRealm.createAccount("admin","Password1234")
> instance.setSecurityRealm(hudsonRealm)
> def strategy = new hudson.security.GlobalMatrixAuthorizationStrategy()
> strategy.add(Jenkins.ADMINISTER, "admin")
> instance.setAuthorizationStrategy(strategy)
> instance.save()
>
> Put the usercreate.groovy file next to your Dockerfile. Then add this line 
> to your Dockerfile:
>
> COPY usercreate.groovy /usr/share/jenkins/ref/init.groovy.d/
>
> When Jenkins starts, a user with name "admin" will then be created with 
> password "Password1234". Note the plaintext password, I'm not sure how to 
> use a hash for this one.
>
> This code will run every time Jenkins starts, so you may need to add a 
> guard that checks if the admin user exists and only run the code if it does 
> not exists.
>
> /Jacob
>
> On 2017-08-29 18:57, Li Z wrote:
>
> I am trying to build a Jenkins docker image from jenkins/jenkins:2.67. Is 
> there a way to create the first admin user with dockerfile? 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-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/3927c485-df73-4fb0-82b0-70363846f432%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/3927c485-df73-4fb0-82b0-70363846f432%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/dd19f905-4a26-4fd0-8f75-1961f15db1ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jenkins docker image create first admin user

2017-08-29 Thread Li Z
I am trying to build a Jenkins docker image from jenkins/jenkins:2.67. Is 
there a way to create the first admin user with dockerfile? 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/3927c485-df73-4fb0-82b0-70363846f432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.