Re: Relationship between GitHub credentials and Jenkins Service account (running as Windows Service)

2018-09-13 Thread 'Björn Pedersen' via Jenkins Users
Hi,

Am Donnerstag, 13. September 2018 17:07:28 UTC+2 schrieb Christopher List:
>
> We are running Jenkins as a windows service on win2012 machine, and it's 
> working fine. 
>
> The problem we have is that we're trying to change the service account 
> that it is running under. 
> The old and new service accounts are both local admins on the machine.
>
> When we change the service account, everything seems to run fine, but our 
> connection to GitHub using a Personal Access token stored in the global 
> jenkins credentials stops working with the classic error:
>
> stderr: Host key verification failed.
> fatal: Could not read from remote repository.
>
>
This is a typical ssh error if the hostkey (from the github server) is 
unknow to the local user account trying to access it. Probably the easiest 
way is to access github via ssh once from that account and accept the 
hostkey.

Björn

-- 
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/81ef25de-a262-4732-933a-da540559905d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkinsfile syntax to change pipeline default docker run command

2018-09-13 Thread hce h
Hi,

I successfully run following docker command locally:

docker run -it -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static 
arm32v7/debian:jessie /bin/bash

But Jenkins has a default docker run command in the pipleline:

docker run -t -d -u 1000:1000 -w 
/var/jenkins_home/workspace/jenkinsbuild-GKBECTLK5VFZTEERVIZTJXC7I72XPCA26MJCHUVG63SOLTV6KNUA
 
--volumes-from 
f8ef7502d1b87996312d6a5fc40804a0f998179adcd627265cd6e5449f2a17af -e 
 -e  -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 builddockerimage

How can I change the Jenkins docker run default command to add "-v 
/usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static"? To give the background 
reason why I need to add qemu is because Jenkins failed to run shell 
/bin/sh or /bin/bash in ARM Docker Image. Are there any Jenkins plubin to 
fix the pipleline to run ARM Docker Image?

Thank you


-- 
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/deda02f0-ee0a-441c-a501-6cd396d5de73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Relationship between GitHub credentials and Jenkins Service account (running as Windows Service)

2018-09-13 Thread Mark Waite
The message "Host key verification failed" is only reported by git when it
is using a private key for authentication.  A personal access token is a
type of username/password, not a type of private key.

You may want to double check that the GitHub URL that you are using is an
https URL, not an ssh URL.  The https URL's use personal access tokens.
The ssh URL's (like ssh://g...@github.com/MarkEWaite/git-plugin.git and
g...@github.com:MarkEWaite/git-plugin.git) use private keys.

Mark Waite

On Thu, Sep 13, 2018 at 9:07 AM Christopher List  wrote:

> We are running Jenkins as a windows service on win2012 machine, and it's
> working fine.
>
> The problem we have is that we're trying to change the service account
> that it is running under.
> The old and new service accounts are both local admins on the machine.
>
> When we change the service account, everything seems to run fine, but our
> connection to GitHub using a Personal Access token stored in the global
> jenkins credentials stops working with the classic error:
>
> stderr: Host key verification failed.
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
>
>
>
> I've re-entered the credentials into Jenkins (thinking perhaps they are
> secured by the service account) and they still don't work.
> As soon as I change the jenkins service back to the old service account,
> the pull from GitHub works fine.
>
> Do I need to grant the new account access to something? Is there something
> I need to configure in Jenkins for the new service account? (note that I
> didn't do the original setup of jenkins on this server, I've inherited it)
>
> Thanks,
> Chris
>
> --
> 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/ca29e9ef-fa81-4040-9ea2-49f1a9d36417%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/CAO49JtFKeZeRX9yZ78a1HgKZ75rNK0k29UHVy_Fq3oYy7rvGLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Still Have Login Problem.

2018-09-13 Thread Steve Burrus
*This is Steve Burrus again and even though it's been several edays si nce
I last posted I STILL have that problem with getting that login page when I
go to "http://localhost:[port num.]", which is attached. Is there any
"fresh ideas" from anyone as to how to FINALLY resolve this problem?*

-- 
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/CABinwmWmEAG%3D%3DPrUBRLWdJHA81Sg%3DsP0r3cjQw7roegqkUQZAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Title: Jenkins





Skip to content log in JenkinsUser:Password:Remember me on this computerlog inPage generated: Sep 13, 2018 11:24:05 AM CDTREST APIJenkins ver. 2.121.3

Managed scripts are missing after upgrade to 2.131.3

2018-09-13 Thread Steve K
Just upgraded from 2.89.2 to 2.131.3

I copied over the org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml  
and reloaded the configuration from disk, but that didn't help.

Any clues?

-- 
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/f85aefa8-86db-4a2e-b25d-da9b0e71cdd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cannot open TCP port for JNLP agents

2018-09-13 Thread Fábio Cabrita
Hello,

I am trying to connect one windows agent with a jenkins server, where both 
are in the same network, and that windows is at reach of jenkins server, 
but still I am getting this error:

[image: Screenshot_3.jpg]

This windows can ping to jenkins.XXX.local without problem, but seems like 
port 8090 is closed from outside:


[image: Screenshot_5.jpg]

And from jenkins server perspective I have add that 8090 port to firewall 
but still nothing, so I think that I can conclud that there is no service 
running in that port:


[image: Screenshot_6.jpg]

I have already reboot jenkins but no effect has been done.

Anyone knows if I need to config anything else then port number in jenkins 
server?

-- 
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/8c7ad78a-88c7-4ab6-837d-87a6aeabd9f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Relationship between GitHub credentials and Jenkins Service account (running as Windows Service)

2018-09-13 Thread Christopher List
We are running Jenkins as a windows service on win2012 machine, and it's 
working fine. 

The problem we have is that we're trying to change the service account that 
it is running under. 
The old and new service accounts are both local admins on the machine.

When we change the service account, everything seems to run fine, but our 
connection to GitHub using a Personal Access token stored in the global 
jenkins credentials stops working with the classic error:

stderr: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.



I've re-entered the credentials into Jenkins (thinking perhaps they are 
secured by the service account) and they still don't work.
As soon as I change the jenkins service back to the old service account, 
the pull from GitHub works fine. 

Do I need to grant the new account access to something? Is there something 
I need to configure in Jenkins for the new service account? (note that I 
didn't do the original setup of jenkins on this server, I've inherited it)

Thanks,
Chris

-- 
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/ca29e9ef-fa81-4040-9ea2-49f1a9d36417%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to abort a job during it's execution by itself

2018-09-13 Thread Viacheslav Dubrovskyi

Hi

You can use this function for pipeline

@NonCPS
def killthis_job() {
  def jobname = env.JOB_NAME
  def buildnum = env.BUILD_NUMBER.toInteger()

  def job = Jenkins.instance.getItemByFullName(jobname)
  for (build in job.builds) {
    if (!build.isBuilding()) { continue; }
    if (buildnum == build.getNumber().toInteger()) { continue; println 
"equals" }

    currentBuild.result = 'ABORTED'
    error("Old build ${build} working.")
  }
}


11.04.2018 13:33, iostrym пишет:

Is there a possibility to abort a job during it's execution by the job itself.

For instance the job launch a script that do the update from versioning tool 
and if no update are available, then the job is aborted.
This way the job is not stored at all by Jenkins.

Some plugin do already the tool versioning scrutation but we can't use them for 
our specific tool versioning version.

This is why I'm looking for a smart way to abort a build.


--
WBD,
Viacheslav Dubrovskyi


--
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/39a6142b-0597-c343-391e-125eaca31c31%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Chroot: base image as matrix axis

2018-09-13 Thread Simon Richter
Hi,

I'd like to build a project against different Linux distributions.

Using the chroot plugin, I can easily set up a chroot for each, but I
need to specify the name of the base image in the project config.

Can I somehow select the chroot base image by a label, so a matrix build
with "debian-stretch", "debian-buster", "debian-sid", "ubuntu-xenial",
... would use the image configured with the appropriate label?

   Simon

-- 
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/d64d1cab-3025-1742-1fb9-07751bf4638f%40hogyros.de.
For more options, visit https://groups.google.com/d/optout.


java.lang.NoClassDefFoundError: Could not initialize class sun.util.calendar.ZoneInfoFile

2018-09-13 Thread Víctor Puertas
Console Output shows the following issue 

java.lang.NoClassDefFoundError: Could not initialize class 
> sun.util.calendar.ZoneInfoFile
>

This is are the traces

Required context class hudson.FilePath is missing
Perhaps you forgot to surround the code with a step that provides this, such 
as: node[Pipeline] }[Pipeline] // stage[Pipeline] End of PipelineAlso:   
hudson.remoting.Channel$CallSiteStackTrace: Remote call to fatcat (192.168.1.4)
at 
hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at 
hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:955)
at hudson.FilePath.act(FilePath.java:998)
at hudson.FilePath.act(FilePath.java:987)
at hudson.FilePath.mkdirs(FilePath.java:1175)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:784)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1154)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
at 
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at 
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.NoClassDefFoundError: Could not initialize class 
sun.util.calendar.ZoneInfoFile
at sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:589)
at java.util.TimeZone.getTimeZone(TimeZone.java:560)
at java.util.TimeZone.setDefaultZone(TimeZone.java:666)
at java.util.TimeZone.getDefaultRef(TimeZone.java:636)
at java.util.TimeZone.getDefault(TimeZone.java:625)
at java.util.Calendar.getInstance(Calendar.java:1640)
at 
java.util.Formatter$FormatSpecifier.printDateTime(Formatter.java:2826)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2740)
at java.util.Formatter.format(Formatter.java:2526)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:161)
at java.util.logging.StreamHandler.publish(StreamHandler.java:211)
at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:116)
at java.util.logging.Logger.log(Logger.java:738)
at java.util.logging.Logger.doLog(Logger.java:765)
at java.util.logging.Logger.log(Logger.java:876)
at hudson.remoting.UserRequest.perform(UserRequest.java:217)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
Caused: java.io.IOException: Remote call on fatcat (192.168.1.4) failed
at hudson.remoting.Channel.call(Channel.java:961)
at hudson.FilePath.act(FilePath.java:998)
Caused: java.io.IOException: remote file operation failed: 
/home/jenkins/workspace/fatcat at hudson.remoting.Channel@28db12e1:fatcat 
(192.168.1.4)
at hudson.FilePath.act(FilePath.java:1005)
at hudson.FilePath.act(FilePath.java:987)
at hudson.FilePath.mkdirs(FilePath.java:1175)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:784)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1154)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
at 
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at 

Re: Jenkins class sun.util.calendar.ZoneInfoFile issue

2018-09-13 Thread Víctor Puertas
I am having the same issue. Did you find the solution?

On Wednesday, December 24, 2014 at 12:28:26 PM UTC+1, nidhi singh wrote:
>
> Hi All,
>
> While running sonar analysis in jenkins, m facing few issues
>
> Failed to instantiate [ch.qos.logback.classic.LoggerContext]*16:47:42* 
> Reported exception:*16:47:42* java.lang.ExceptionInInitializerError
>
>
> Caused by: Could not initialize class sun.util.calendar.ZoneInfoFile
>
>
> I don't know how to fix this one. Please help 
>
>
> Thanking You
>
>
>
>
>

-- 
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/ef5ab0fd-1712-441b-b193-3f80f2740cf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Update upstream job in case of downstream job is rerun

2018-09-13 Thread Mahima Mishra
*I have a RELEASE pipeline which triggers a parameterized job: TEST (which 
can be triggered standalone too). If the TEST job fails I can rerun it 
rather than triggering the complete RELEASE job. Is there a way I can list 
the rerun of the TEST job to the upstream release job? So that the 
triggered jobs list on upstream job is also populated with the URL of rerun 
downstream job?*

stages {
stage('RELEASE') {
failFast false
parallel {
stage("Project A") {
stages{
stage("Build") {
steps {
//steps to build project A
}
}
stage("invoke Test") {
steps{
build job: "TEST", parameters: [
string(name: 'PROJECT_NAME', value:"project 
A")
]
}
}
stage("Release") {
steps {
//steps to build project A
}
}
}
}
stage("Project B") {
stages{
stage("Build") {
steps {
//steps to build project B
}
}
stage("invoke Test") {
steps{
build job: "TEST", parameters: [
string(name: 'PROJECT_NAME', value:"project 
B")
]
}
}
stage("Release") {
steps {
//steps to build project B
}
}
}
}
}
}



-- 
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/e33902bf-e738-47d5-addf-26b8ac8e0f03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I find the plugin name to use with install-plugins.sh?

2018-09-13 Thread Thomas Sundberg
Hi!

This is partly answering my own question:

Install the plugin you want to try.

Run the script

Jenkins.instance.pluginManager.plugins.each{
  plugin ->
println ("${plugin.getDisplayName()} (${plugin.getShortName()}):
${plugin.getVersion()}")
}

Locate the short name of the plugin you want to deploy and add it to
the Dockerfile.

In this particular case, look for the line

Docker Pipeline (docker-workflow): 1.17

and add

RUN /usr/local/bin/install-plugins.sh docker-workflow

in your Dockerfile.

Clumsy? Yes
Did it work? Yes

What would you like?
A section at the page
https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin stating
that the command line name for this plugin is docker-workflow

Cheers,
Thomas

On Thu, 13 Sep 2018 at 13:42, Thomas Sundberg  wrote:
>
> Hi!
>
> I am creating a Jenkins installation from a Dockerfile. I want to
> specify all plugins so they are available when the image is built.
>
> This typically looks like many lines like this:
>
> RUN /usr/local/bin/install-plugins.sh greenballs
>
> Is there a way to find the proper name for each plugin? I am currently
> looking for the proper name for the Docker Pipeline
> Plugin,https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin
>
> Cheers,
> Thomas
>
> --
> Thomas Sundberg
> M. Sc. in Computer Science
>
> Mobile: +46 70 767 33 15
> Blog: http://www.thinkcode.se/blog
> Twitter: @thomassundberg
>
> Better software through faster feedback



--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback

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


How can I find the plugin name to use with install-plugins.sh?

2018-09-13 Thread Thomas Sundberg
Hi!

I am creating a Jenkins installation from a Dockerfile. I want to
specify all plugins so they are available when the image is built.

This typically looks like many lines like this:

RUN /usr/local/bin/install-plugins.sh greenballs

Is there a way to find the proper name for each plugin? I am currently
looking for the proper name for the Docker Pipeline
Plugin,https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin

Cheers,
Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback

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