Re: Permission denied returned from a container due to uid used = 1000

2021-06-16 Thread Charles Moulliard
No as the container is not launched using docker but using jenkins 
kubernetes plugin as a pod where the UID needed is 
1000: 
https://github.com/jenkinsci/kubernetes-plugin#pipeline-sh-step-hangs-when-multiple-containers-are-used



On Wednesday, June 16, 2021 at 10:14:44 PM UTC+2 uday1...@gmail.com wrote:

> Have you tried -u root while running the container?
>
> On Thu, 17 Jun, 2021, 1:35 am Charles Moulliard,  
> wrote:
>
>> Hi
>>
>> One of our container is reporting a permission denied as git cannot write 
>> a file on the filesystem mounted. As the uid used during the pod creation 
>> to allow the jenkins jnlp client to work correctly is 1000, what should we 
>> do to design correctly the image of that container to be able to give write 
>> permission even when the pod created will use as uid 1000 ?
>>
>> Cheers
>>
>> Charles
>>
>> -- 
>> 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/b973f0bc-210e-4a49-aaca-3936ada9b57cn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/b973f0bc-210e-4a49-aaca-3936ada9b57cn%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/77786b52-017b-45c0-bcd7-2684dc8d3820n%40googlegroups.com.


Permission denied returned from a container due to uid used = 1000

2021-06-16 Thread Charles Moulliard
Hi

One of our container is reporting a permission denied as git cannot write a 
file on the filesystem mounted. As the uid used during the pod creation to 
allow the jenkins jnlp client to work correctly is 1000, what should we do 
to design correctly the image of that container to be able to give write 
permission even when the pod created will use as uid 1000 ?

Cheers

Charles

-- 
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/b973f0bc-210e-4a49-aaca-3936ada9b57cn%40googlegroups.com.


Can we calculate the agent element ?

2021-04-23 Thread Charles Moulliard
Hi

The following Jenkins pipeline script is not working and we will get as 
error

ERROR
WorkflowScript: 20: Expected string literal @ line 20, column 11.
   agent checkEnvironment()
 ^

WorkflowScript: 20: Only "agent none", "agent any" or "agent {...}" are 
allowed. @ line 20, column 5.
   agent checkEnvironment()

CODE

@Library('snowdrop-lib') _

def checkEnvironment() {
  stage("main") {
node {
  if (fileExists('/var/run/secrets/kubernetes.io')) {
AGENT_DEF = """kubernetes {
|  defaultContainer 'jnlp'
|  yaml 
libraryResource('./podTemplates/multi-containers.yml')
|}""".stripMargin()
  } else {
AGENT_DEF = "label any"
  }
  return AGENT_DEF
}
  }  
}

pipeline {
agent checkEnvironment()
...

Question: Can we do something like this ? If yes - How ? Example ?

Cheers

Charles

-- 
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/8fe8cb92-b02c-4f1d-9b63-5a7b2af5f2e6n%40googlegroups.com.


IntelliJ & pipeline.gdsl broken

2021-01-12 Thread Charles Moulliard
Hi,

It seems that the pipeline.gdsl does not work anymore using a pipeline
groovy project under IntelliJ.

The following syntax





*def pipelinesPath = /.*\/resources\/.*groovy/def ctx = context(scope:
scriptScope(), pathRegexp: pipelinesPath)contributor(ctx) {method(name:
'parallel', type: 'Object', params: ['closures':'java.util.Map'], doc:
'Execute in parallel')*
*...*

does not allow to use auto completion within the a pipeline groovy file







*@Library('snowdrop-lib@0.2') _import
org.jenkinsci.plugins.workflow.libs.Librarydef AGENT_LABEL =
nullnode('master') {stage('Determine platform and set agent'){*

A few tags/DSL are highlighted but if we click on it, we cannot access the
class or do autocompletion. This is really bad.

Cheers

Charles Moulliard

Software Engineer Manager - Spring

Red Hat <https://www.redhat.com/>

Rue de Franchimont 52A, Florennes, Belgium

cmoulli...@redhat.com
M: +32473604014
<https://red.ht/sig>

-- 
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/CAPb1sSvHWbQAof8yLofdTo82mvGjawArJH%2BFY8QiGfpmioNYBg%40mail.gmail.com.


Re: shared_lib.txt file containing makrdown or HTML syntax of a global shared lib is not rendered

2021-01-08 Thread Charles Moulliard
This is not documented but it is needed then to do a few things:

- Install the markdown-plugin, restart jenkins
- Under "configureSecurity" of jenkins, select as Markup Formatter from the 
popuplist "Markdown" instead of "Plain text"
- Launch again the job importing the shared lib
- Open now the page containing the generated doc of your job 
: http://localhost:8080/job//pipeline-syntax/globals

Remark: Can a contributor/committer update please the content of the 
page 
https://www.jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure 
?


On Friday, January 8, 2021 at 11:59:21 AM UTC+1 Charles Moulliard wrote:

> Hi,
>
> A shared_lib.txt file containing markdown or HTML syntax of a global 
> shared lib is not rendered  when I click on the sidecar link - 
> http://localhost:8080/job//pipeline-syntax/globals
>
> Test file : 
> https://github.com/ch007m/jenkins-shared-lib/blob/main/vars/buildJavaApp.txt
> See image rendered: 
> https://www.dropbox.com/s/czf6patx3068iud/Screenshot%202021-01-08%20at%2011.55.13.png?dl=0
>
> Do we have to configure a parameter on jenkins to render shared lib txt 
> file to HTML or Markdown ?
>
> Cheers
>
> Charles
>

-- 
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/3a5f4193-2bb6-4b88-ad63-fe99bd7ebfc6n%40googlegroups.com.


shared_lib.txt file containing makrdown or HTML syntax of a global shared lib is not rendered

2021-01-08 Thread Charles Moulliard
Hi,

A shared_lib.txt file containing markdown or HTML syntax of a global shared 
lib is not rendered  when I click on the sidecar link 
- http://localhost:8080/job//pipeline-syntax/globals

Test file 
: https://github.com/ch007m/jenkins-shared-lib/blob/main/vars/buildJavaApp.txt
See image 
rendered: 
https://www.dropbox.com/s/czf6patx3068iud/Screenshot%202021-01-08%20at%2011.55.13.png?dl=0

Do we have to configure a parameter on jenkins to render shared lib txt 
file to HTML or Markdown ?

Cheers

Charles

-- 
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/466907fb-ea3f-4466-9c6d-06aad4ff59f2n%40googlegroups.com.


Re: Pipeline DSL using a shared lib which is a java class

2021-01-07 Thread Charles Moulliard
Many thanks Ivan for the example which is a Groovy class and not a java
class. According to the documentation, I don't think that we can use some
java classes directly from a shared lib project excepted if thy have been
compiled, packaged as jar under a maven repository and that you import it
using "@Grab" -
https://www.jenkins.io/doc/book/pipeline/shared-libraries/#using-third-party-libraries



On Thu, Jan 7, 2021 at 6:02 PM Ivan Fernandez Calvo 
wrote:

> you can use directly a class from the Shared library
>
> This is an example in our shared library (
> https://github.com/elastic/apm-pipeline-library)
>
> https://github.com/elastic/apm-pipeline-library/blob/master/src/co/elastic/matrix/DefaultParallelTaskGenerator.groovy
>
> and a pipeline that uses that class
>
> https://github.com/elastic/apm-integration-testing/blob/master/.ci/integrationTestDownstream.groovy#L89
>
> El miércoles, 6 de enero de 2021 a las 18:23:12 UTC+1, cmou...@redhat.com
> escribió:
>
>> Hi,
>>
>> Can we define a pipeline DSL script importing a shared lib which is a
>> java class ?
>>
>> Script
>> @org.jenkinsci.plugins.workflow.libs.Library('mytools')
>>
>> import org.mytools.Messaging // The Java class imported as shared lib
>> Messaging m = new Messaging();
>>
>> The java class has been defined under the folder
>> `src/main/org/mytools/Messaging.java` within the git project cloned as
>> shared lib
>>
>> Cheers
>>
>> Charles
>>
> --
> 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/1216e835-5752-482f-b887-565bc4cc7194n%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/1216e835-5752-482f-b887-565bc4cc7194n%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/CAPb1sSt7t%2BSpafDcCW_dEykio6t316i-TTpJxwLPRD_xX1kTyQ%40mail.gmail.com.


Pipeline DSL using a shared lib which is a java class

2021-01-06 Thread Charles Moulliard
Hi,

Can we define a pipeline DSL script importing a shared lib which is a java 
class ?

Script
@org.jenkinsci.plugins.workflow.libs.Library('mytools')

import org.mytools.Messaging // The Java class imported as shared lib 
Messaging m = new Messaging();

The java class has been defined under the folder 
`src/main/org/mytools/Messaging.java` within the git project cloned as 
shared lib

Cheers

Charles

-- 
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/57934c26-d87f-4d39-88be-e829b4c94e9dn%40googlegroups.com.


Upload a groovy file from the local machine to the groovyCommand

2020-12-21 Thread Charles Moulliard
Hi

How can we upload a groovy file from a local machine to the jenkins 
instance - workspace as the following reports the error within a FreeStyle 
project "ERROR: (script, line 81) File backupPOM.groovy does not exist in 
workspace" ?

mavenJob('check-bom-dependencies') {
description 'Maven Job checking the BOM dependencies of the Spring Boot 
project'

logRotator {
numToKeep 3
}

parameters {
stringParam('TAG', '2.3.4.Final',
'The release version for the artifact. If you leave this 
empty, ' +
'the current SNAPSHOT version will be used with the 
' +
'"-SNAPSHOT" suffix removed (example: if the 
current version ' +
'is "1.0-SNAPSHOT", the release version will be 
"1.0").')
}

scm {
git {
remote {
url 'https://github.com/snowdrop/spring-boot-bom'
branch '$TAG'
}
}
}

preBuildSteps {
groovyCommand(readFileFromWorkspace('backupPOM.groovy')) {
groovyInstallation('groovy3')
  }
}

rootPOM 'pom.xml'
    goals '-B dependency:tree'
}

Regards
Charles

-- 
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/0d0bf936-b5d3-4b0b-bca8-e34f93af4c3bn%40googlegroups.com.


Re: Better way to load all the plugins/dependencies for local java testing using jenkinsrule

2020-12-18 Thread Charles Moulliard
On Thu, Dec 17, 2020 at 10:38 AM Yannick Lacaute 
wrote:

> Hi Charles,
>
> I am working on a pipeline (build java > build docker > deploy pod in
> Openshift) and currently I have no unit test.
> I think you achieved something huge !! Well done by the way :)
>
Many thanks.

>
> Could you please give me someone web links or tips in order to do the same
> as you ?
>
They are still a lot of things todo as by example we suffer from Eclipse
Sisu/Guice issues when the Maven job starts -
https://stackoverflow.com/questions/65353903/error-injecting-public-org-apache-maven-repository-internal-defaultversionresol
but what I'm currently developing i available here : client:
https://github.com/ch007m/jenkins-job-dsl/tree/main/src/test/java/dev/snowdrop


> Do you use https://github.com/jenkinsci/JenkinsPipelineUnit ?
>
No. This project doesn't seem to bootstrap a jenkins server as we can do
using the @Rule Jenkinsrule 

Is there a sample project from which we can start ?
>
See my previous remark

Should we just have to follow the same organization in JenkinsPipelineUnit
> > test ?
> Have you automatised your scripts or do you have to play them sometimes to
> update your project ?
>
I plan to create jobs using my Groovy DSL scripts with a seed job to create
all the children jobs such as a shell job, maven job, ...

>
> Thank for you advices
>
> PS : Currently my pipeline is declared in a shared library.
>
>
>
> Regards
>
>
>
> On Thu, Dec 17, 2020 at 9:51 AM Charles Moulliard 
> wrote:
>
>> I created 2 groovy scripts that I execute in a jenkins instance to figure
>> out the list to be used and to be configured within the `build.gradle` file
>>
>> Jenkins.instance.pluginManager.plugins
>> .findAll { !(it.shortName in ['job-dsl', 'structs']) }
>> .collect { "testPlugins
>> '${it.manifest.mainAttributes.getValue("Group-Id")}:${it.shortName}:${it.version}'"
>> }
>> .sort()
>> .each { println it }
>>
>> and testCompile dependencies
>> Jenkins.instance.pluginManager.plugins
>> .findAll { !(it.shortName in ['job-dsl', 'structs']) }
>> .collect { "testCompile
>> '${it.manifest.mainAttributes.getValue("Group-Id")}:${it.shortName}:${it.version}@jar'"
>> }
>> .sort()
>> .each { println it }
>>
>> On Wednesday, December 16, 2020 at 6:48:41 PM UTC+1 Charles Moulliard
>> wrote:
>>
>>> Hi
>>>
>>> As a java unit test will need jar files, it is then needed to load them
>>> nd to declare them within the pom.xml file or build.gradle file
>>>
>>> Example:
>>>
>>> testCompile("org.jenkins-ci.main:jenkins-test-harness:${jenkinsTestHarness}")
>>> testCompile("org.jenkins-ci.main:jenkins-war:${jenkinsCore}")
>>>
>>> testCompile("org.jenkins-ci.plugins:script-security:${jenkinsTestSecurityScript}@jar
>>> ")
>>>
>>> // Add the jar file as the testPlugins will install the hpi/jpi
>>> files and not the jar needed by the junit test
>>> testCompile 'org.jenkins-ci.tools:git-parameter:0.9.13@jar'
>>>
>>> testCompile 'org.jenkins-ci.plugins:structs:1.20@jar'
>>> testCompile 'org.jenkins-ci.plugins:git:3.10.0@jar'
>>> testCompile 'org.jenkins-ci.plugins:git-client:3.5.1@jar'
>>> testCompile 'org.jenkins-ci.plugins:credentials:2.3.9@jar'
>>> testCompile 'org.jenkins-ci.plugins:scm-api:2.6.4@jar'
>>> testCompile 'org.jenkins-ci.plugins:matrix-project:1.18@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins:global-variable-string-parameter:1.2@jar'
>>> testCompile 'org.jenkins-ci.plugins:junit:1.47@jar'
>>>
>>> testCompile 'org.jenkins-ci.plugins:workflow-remote-loader:1.5@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6@jar'
>>> testCompile 'org.jenkins-ci.plugins.workflow:workflow-api:2.40@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.18@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins.workflow:workflow-scm-step:2.11@jar'
>>> testCompile 'org.jenkins-ci.plugins.workflow:workflow-cps:2.80@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.35@jar'
>>> testCompile 'org.jenkins-ci.plugins.workflow:workflow-job:2.38@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.20@jar'
>>> testCompile
>>> 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.23@jar'
&

Re: Junit test : seed job to maven Job DSL

2020-12-17 Thread Charles Moulliard
FYI: I can, of course, create the job and build it using the `config.xml` 
generated on a jenkins instance running locally -> `java -jar 
jenkins-cli.jar -s http://localhost:8080 create-job maven-seed-job2 < 
seed-maven-job2.xml`

So I suspect a problem with the Job DSL Plugin when the job build is 
scheduled with the "ExecuteDslScripts". But If no stacktrace is reported, 
then it will very hard to figure out the issue
On Thursday, December 17, 2020 at 11:54:39 AM UTC+1 Charles Moulliard wrote:

> Hi
>
> I created a Junit test case which is available here:  
> https://github.com/ch007m/jenkins-job-dsl/blob/31efa049a95c333a8dba9b01ff2aa281b3520e34/src/test/java/dev/snowdrop/MavenJobDSLTest.java#L25-L53
>  
> where a seed job is created to populate a mavenJob using the DSL groovy 
> file provided 
>
> But when it is executed; the job build fails and reports this error
>
> Legacy code started this job.  No cause information is available
> Running as SYSTEM
> Building in workspace /var/folders/t2/jwchtqkn5y76hrfrws7dqtqmgn/T/j 
> h5344303144116520886/workspace/test0
> Processing provided DSL script
> ERROR: java.io.IOException: Unable to read 
> /var/folders/t2/jwchtqkn5y76hrfrws7dqtqmgn/T/j 
> h5344303144116520886/jobs/mvn-spring-boot-rest-http/config.xml
> Finished: FAILURE
>
> The error comes from the fact that the job "mvn-spring-boot-rest-http" 
> has not been created under the "jobs" folder. the jobs folder only contains 
> a "test0" folder.
>
> How can I investigate the problem and fix that ? 
>
> If I check the config.xml file generated, it looks good (vs same 
> config.xml file created using the UI)
>
> 
> 
>   false
>   
>   
>   false
>   false
>   
> false
>   false
>   
>   false
>   
> 
>   mavenJob(mvn-spring-boot-rest-http) {
> description A Maven Job compiling the project Spring Boot Rest 
> HTTP Example
>
> parameters {
> gitParameter {
> name SELECTED_TAG
> description The Git tag to checkout
> type PT_TAG
> defaultValue 2.3.4-2
> branch 
> branchFilter origin/(.*)
> quickFilterEnabled false
> selectedValue DEFAULT
> sortMode DESCENDING_SMART
> tagFilter *
> useRepository .*rest-http-example.git
> listSize 10
> }
> }
>
> scm {
> git {
> remote {
> url 
> https://github.com/snowdrop/rest-http-example.git;
> // branch($SELECTED_TAG)
> branch(2.3.4-2)
> }
> }
> }
> rootPOM pom.xml
> goals clean install
> }
>   true
>   false
>   false
>   false
>   false
>   false
>   false
>   IGNORE
>   IGNORE
>   IGNORE
>   JENKINS_ROOT
> 
>   
>   
>   
> 
>
> excepted that the config.xml created from the UI includes this additional 
> parameter
>
> 
>
> Cheers
>
> Charles
>

-- 
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/000da4cd-8384-4417-b3f0-def8986ef8d7n%40googlegroups.com.


Re: Better way to load all the plugins/dependencies for local java testing using jenkinsrule

2020-12-17 Thread Charles Moulliard
I created 2 groovy scripts that I execute in a jenkins instance to figure 
out the list to be used and to be configured within the `build.gradle` file

Jenkins.instance.pluginManager.plugins
.findAll { !(it.shortName in ['job-dsl', 'structs']) }
.collect { "testPlugins 
'${it.manifest.mainAttributes.getValue("Group-Id")}:${it.shortName}:${it.version}'"
 
}
.sort()
.each { println it }

and testCompile dependencies
Jenkins.instance.pluginManager.plugins
.findAll { !(it.shortName in ['job-dsl', 'structs']) }
.collect { "testCompile 
'${it.manifest.mainAttributes.getValue("Group-Id")}:${it.shortName}:${it.version}@jar'"
 
}
.sort()
.each { println it }

On Wednesday, December 16, 2020 at 6:48:41 PM UTC+1 Charles Moulliard wrote:

> Hi
>
> As a java unit test will need jar files, it is then needed to load them nd 
> to declare them within the pom.xml file or build.gradle file
>
> Example: 
> 
> testCompile("org.jenkins-ci.main:jenkins-test-harness:${jenkinsTestHarness}")
> testCompile("org.jenkins-ci.main:jenkins-war:${jenkinsCore}")
> 
> testCompile("org.jenkins-ci.plugins:script-security:${jenkinsTestSecurityScript}@jar")
>
> // Add the jar file as the testPlugins will install the hpi/jpi files 
> and not the jar needed by the junit test
> testCompile 'org.jenkins-ci.tools:git-parameter:0.9.13@jar'
>
> testCompile 'org.jenkins-ci.plugins:structs:1.20@jar'
> testCompile 'org.jenkins-ci.plugins:git:3.10.0@jar'
> testCompile 'org.jenkins-ci.plugins:git-client:3.5.1@jar'
> testCompile 'org.jenkins-ci.plugins:credentials:2.3.9@jar'
> testCompile 'org.jenkins-ci.plugins:scm-api:2.6.4@jar'
> testCompile 'org.jenkins-ci.plugins:matrix-project:1.18@jar'
> testCompile 
> 'org.jenkins-ci.plugins:global-variable-string-parameter:1.2@jar'
> testCompile 'org.jenkins-ci.plugins:junit:1.47@jar'
>
> testCompile 'org.jenkins-ci.plugins:workflow-remote-loader:1.5@jar'
> testCompile 
> 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6@jar'
> testCompile 'org.jenkins-ci.plugins.workflow:workflow-api:2.40@jar'
> testCompile 
> 'org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.18@jar'
> testCompile 
> 'org.jenkins-ci.plugins.workflow:workflow-scm-step:2.11@jar'
> testCompile 'org.jenkins-ci.plugins.workflow:workflow-cps:2.80@jar'
> testCompile 
> 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.35@jar'
> testCompile 'org.jenkins-ci.plugins.workflow:workflow-job:2.38@jar'
> testCompile 
> 'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.20@jar'
> testCompile 
> 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.23@jar'
> testCompile 'org.jenkins-ci.plugins.workflow:workflow-support:3.3@jar'
>
> testCompile 'org.jenkins-ci.plugins:matrix-auth:2.6.2@jar'
>
> testCompile 'org.eclipse.jgit:org.eclipse.jgit:5.10.0.202012080955-r'
> 
> // Plugins to install in test jenkins instance running locally
> testPlugins 'org.jenkins-ci.main:maven-plugin:3.8'
>
> testPlugins 'org.jenkins-ci.plugins:cloudbees-folder:5.14'
> testPlugins 'org.jenkins-ci.plugins:credentials:2.3.9'
> testPlugins 'org.jenkins-ci.plugins:structs:1.20'
> testPlugins 
> 'org.jenkins-ci.plugins:global-variable-string-parameter:1.2'
>
> testPlugins 'org.jenkins-ci.tools:git-parameter:0.9.13'
> testPlugins 'org.jenkins-ci.plugins:git:3.10.0'
> testPlugins 'org.jenkins-ci.plugins:git-client:3.5.1'
> testPlugins 'org.jenkins-ci.plugins:scm-api:2.6.4'
> testPlugins 'org.jenkins-ci.plugins:matrix-project:1.18'
>
> testPlugins 'org.jenkins-ci.plugins:workflow-remote-loader:1.5'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-api:2.40'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.18'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-scm-step:2.11'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-cps:2.80'
> testPlugins 
> 'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.35'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-job:2.38'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.20'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.23'
> testPlugins 'org.jenkins-ci.plugins.workflow:workflow-support:3.3'
>
> testPlugins 'org.jenkins-ci.plugins:matrix-auth:2.6.2'
>
> testPlugins 'org.jenkins-ci.plugins:junit:1.47'
>
> testPlugins 'org.jenkins-ci.plugins:matrix-project:1.18'
>
> As you can imagine, this process is long,tedious, will change when we 
> upgr

Access the jenkins.log or folder when using jenkinsrule

2020-12-17 Thread Charles Moulliard
Hi,

Is it possible to access to the jenkins.log or the folder containing the 
files as I got this error when I run a junit test case ?

Legacy code started this job.  No cause information is available
Running as SYSTEM
Building in workspace /var/folders/t2/jwchtqkn5y76hrfrws7dqtqmgn/T/j 
h2639828161785432376/workspace/test0
Processing DSL script mavenProject/mavenJob.groovy
ERROR: java.io.IOException: Unable to read 
/var/folders/t2/jwchtqkn5y76hrfrws7dqtqmgn/T/j 
h2639828161785432376/jobs/mvn-spring-boot-rest-http/config.xml
Finished: FAILURE

Example of code:

@Rule
public JenkinsRule j = new JenkinsRule();

@Test
public void useMavenDSLGroovyFileAsJob() throws Exception {
FreeStyleProject p = j.createFreeStyleProject();
p.scheduleBuild2(0).get(); // run a build to create a workspace

p.getSomeWorkspace().child("mavenProject/mavenJob.groovy").copyFrom(getClass().getResourceAsStream("/mavenJob.groovy"));

ExecuteDslScripts e = new ExecuteDslScripts();
e.setTargets("mavenProject/mavenJob.groovy");
p.getBuildersList().add(e);

// Assert if build succeeded, if the Script executed includes the 
echo message
FreeStyleBuild b = 
j.assertBuildStatusSuccess(p.scheduleBuild2(0).get());

Cheers

Charles



-- 
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/e4dfe5ba-f5be-4fad-9366-0d9566b5d281n%40googlegroups.com.


Better way to load all the plugins/dependencies for local java testing using jenkinsrule

2020-12-16 Thread Charles Moulliard
Hi

As a java unit test will need jar files, it is then needed to load them nd 
to declare them within the pom.xml file or build.gradle file

Example: 

testCompile("org.jenkins-ci.main:jenkins-test-harness:${jenkinsTestHarness}")
testCompile("org.jenkins-ci.main:jenkins-war:${jenkinsCore}")

testCompile("org.jenkins-ci.plugins:script-security:${jenkinsTestSecurityScript}@jar")

// Add the jar file as the testPlugins will install the hpi/jpi files 
and not the jar needed by the junit test
testCompile 'org.jenkins-ci.tools:git-parameter:0.9.13@jar'

testCompile 'org.jenkins-ci.plugins:structs:1.20@jar'
testCompile 'org.jenkins-ci.plugins:git:3.10.0@jar'
testCompile 'org.jenkins-ci.plugins:git-client:3.5.1@jar'
testCompile 'org.jenkins-ci.plugins:credentials:2.3.9@jar'
testCompile 'org.jenkins-ci.plugins:scm-api:2.6.4@jar'
testCompile 'org.jenkins-ci.plugins:matrix-project:1.18@jar'
testCompile 
'org.jenkins-ci.plugins:global-variable-string-parameter:1.2@jar'
testCompile 'org.jenkins-ci.plugins:junit:1.47@jar'

testCompile 'org.jenkins-ci.plugins:workflow-remote-loader:1.5@jar'
testCompile 
'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-api:2.40@jar'
testCompile 
'org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.18@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-scm-step:2.11@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-cps:2.80@jar'
testCompile 
'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.35@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-job:2.38@jar'
testCompile 
'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.20@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.23@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-support:3.3@jar'

testCompile 'org.jenkins-ci.plugins:matrix-auth:2.6.2@jar'

testCompile 'org.eclipse.jgit:org.eclipse.jgit:5.10.0.202012080955-r'

// Plugins to install in test jenkins instance running locally
testPlugins 'org.jenkins-ci.main:maven-plugin:3.8'

testPlugins 'org.jenkins-ci.plugins:cloudbees-folder:5.14'
testPlugins 'org.jenkins-ci.plugins:credentials:2.3.9'
testPlugins 'org.jenkins-ci.plugins:structs:1.20'
testPlugins 
'org.jenkins-ci.plugins:global-variable-string-parameter:1.2'

testPlugins 'org.jenkins-ci.tools:git-parameter:0.9.13'
testPlugins 'org.jenkins-ci.plugins:git:3.10.0'
testPlugins 'org.jenkins-ci.plugins:git-client:3.5.1'
testPlugins 'org.jenkins-ci.plugins:scm-api:2.6.4'
testPlugins 'org.jenkins-ci.plugins:matrix-project:1.18'

testPlugins 'org.jenkins-ci.plugins:workflow-remote-loader:1.5'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.6'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-api:2.40'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.18'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-scm-step:2.11'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-cps:2.80'
testPlugins 
'org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.35'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-job:2.38'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-multibranch:2.20'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.23'
testPlugins 'org.jenkins-ci.plugins.workflow:workflow-support:3.3'

testPlugins 'org.jenkins-ci.plugins:matrix-auth:2.6.2'

testPlugins 'org.jenkins-ci.plugins:junit:1.47'

testPlugins 'org.jenkins-ci.plugins:matrix-project:1.18'

As you can imagine, this process is long,tedious, will change when we 
upgrade to another jenkins server (as the list of the default plugins will 
be updated).

Question:
Is there a script, tool able to grab from jenkins the plugins list and next 
to create the corresponding plugins to be imported for Jenkinsrule unit 
test and GAVs dependencies (pom.xml or build.gradle) ?

Cheers

charles

-- 
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/2ba5c703-6caf-4dcd-9fe4-93dbc9301786n%40googlegroups.com.


Re: How to Import a java jar on jenkins to be used by Job DSL - Groovy Script ?

2020-12-14 Thread Charles Moulliard
Same remark as before. The approach you propose is only supported if you 
create Pipeline Jobs.

On Monday, December 14, 2020 at 5:13:17 PM UTC+1 yeik...@gmail.com wrote:

> How about shared libraries? 
>
> https://www.jenkins.io/doc/book/pipeline/shared-libraries/
>
> On Mon, Dec 14, 2020 at 10:55 AM Charles Moulliard  
> wrote:
>
>> Hi,
>>
>> How can we Import a java jar on jenkins in order to allow a Groovy Script 
>> part of a Job DSL to use java classes packaged within the jar file ?
>>
>> Example of groovy script using the Java class Hello and method "message" 
>>
>> package groovy
>> import dev.snowdrop.jenkins.Hello;
>> println new Hello().message();
>>
>> Cheers 
>>
>> Charles
>>
>> -- 
>>
> 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/d28daa31-1da7-423c-ab7c-f14820f985ecn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/d28daa31-1da7-423c-ab7c-f14820f985ecn%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/d28ed4b5-fc66-4b68-9564-3e94a886807bn%40googlegroups.com.


Re: How to Import a java jar on jenkins to be used by Job DSL - Groovy Script ?

2020-12-14 Thread Charles Moulliard
The approach you propose is only supported if you create Pipeline Jobs.

On Monday, December 14, 2020 at 5:12:04 PM UTC+1 Nick Stolwijk wrote:

> Hi Charles,
>
> I think you can do this using the third party library @Grab [1]. I have 
> taken a look in the documentation of Grape [2] and I see they use a custom 
> Maven repository to load the libraries.
>
> [1] 
> https://www.jenkins.io/doc/book/pipeline/shared-libraries/#using-third-party-libraries
> [2] 
> https://docs.groovy-lang.org/latest/html/documentation/grape.html#_quick_start
>
> Hth,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when 
> your turn comes to die, you can die happy in feeling that at any rate you 
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
>
> On Mon, Dec 14, 2020 at 4:55 PM Charles Moulliard  
> wrote:
>
>> Hi,
>>
>> How can we Import a java jar on jenkins in order to allow a Groovy Script 
>> part of a Job DSL to use java classes packaged within the jar file ?
>>
>> Example of groovy script using the Java class Hello and method "message" 
>>
>> package groovy
>> import dev.snowdrop.jenkins.Hello;
>> println new Hello().message();
>>
>> Cheers 
>>
>> Charles
>>
>> -- 
>> 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/d28daa31-1da7-423c-ab7c-f14820f985ecn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/d28daa31-1da7-423c-ab7c-f14820f985ecn%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/b5945d8f-1c6a-44a3-8df5-785cc22a0666n%40googlegroups.com.


Missing jenkin jobs.

2020-01-20 Thread Charles Ong
Hello,
So recently i fixed a bug and push my code up to github. Then jenkin was 
running fine and it actually push to the AWS but it did not deploy 
accordingly. During which, i thought of restarting the AWS and it changes 
the ip address for the server. Upon the ip address change, my previous 
information on the jobs i previously did on jenkin disappear. I tried to 
look it up through cmd and was able to find it in the file but it just not 
shown on the jenkin page. I tried to create another project and it was 
shown in the same path as the missing projects. Any suggestion on how to 
get back my projects to be shown on the Jenkins webpage?

-- 
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/a59a66f8-3f76-4782-b687-9709874238b3%40googlegroups.com.


Certificate Credentials Binding: How to use

2019-04-30 Thread anthony . charles . green
I've been unable to find instructions on how to use the certificate setting 
with the credentials binding plugin. Selecting certificate gives you 4 
fields: Keystore Variable, Password Variable, Alias Variable and 
Credentials. Credentials presents a dropdown menu allowing you to select a 
certificate from Jenkins Credentials Store.
I'm trying to test its use with a simple execute shell build step that 
calls curl on an API that requires you to present a certificate.
Advice?
TIA
Anthony


-- 
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/d92d3ad7-8f13-46fc-aa92-01d1b42aaf6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Installer return 3010, and pipeline failed

2017-11-15 Thread Charles Choi
In my pipeline, after installation, there is a pending reboot.  Installer 
return 3010
Pipeline failed:
ERROR: script returned exit code 3010

How can I tell pipeline to ignore code 3010 and goto next stage?

-- 
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/97d5bffa-770e-464a-93e7-5c86de34e44a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ERROR: Processing failed due to a bug in the code.

2017-10-06 Thread Charles Karney
Thanks for the information.  My problem seems to have cleared up by itself!

  --Charles

On Thursday, October 5, 2017 at 11:05:51 AM UTC-4, Mark Waite wrote:
>
> That failure message is unrelated to git.
>
> The message "java.lang.RuntimeException: java.lang.IllegalArgumentException: 
> No
> matching Artifactory server was found in General Configuration. Please
> update your job configuration." seems to indicate that some method which 
> expects an artifactory server to be defined globally is not finding a 
> globally defined artifactory server.  Check what changed in your global 
> configuration.
>
> Mark Waite
>
> On Thu, Oct 5, 2017 at 8:47 AM Charles Karney <cha...@karney.com 
> > wrote:
>
>> I'm running Jenkins 1.589.
>>
>>
>> On Thursday, October 5, 2017 at 10:32:20 AM UTC-4, Charles Karney wrote:
>>>
>>> Triggering a Jenkins build on a job that has "usually" worked gives: 
>>>
>>>   ERROR: Processing failed due to a bug in the code. Please report this 
>>>   to jenkins...@googlegroups.com  
>>>
>>> The log up to this point is 
>>>
>>>   Started by user Charles Karney 
>>>   [EnvInject] - Loading node environment variables. 
>>>   Building remotely on bso-centos7-gpu (centos7gpu slave) in workspace 
>>> /var/lib/jenkins/workspace/vt-geographiclib 
>>>
>>>   Deleting project workspace... done 
>>>
>>>   Cloning the remote Git repository 
>>>   Cloning repository ssh://
>>> g...@scm-vt.sarnoff.com/common/geographiclib.git 
>>> <http://www.google.com/url?q=http%3A%2F%2Fgit%40scm-vt.sarnoff.com%2Fcommon%2Fgeographiclib.git=D=1=AFQjCNHXr7KkPWGLrPz-tBvX7JULmCA_yQ>
>>>  
>>>> /usr/bin/git init 
>>> /var/lib/jenkins/workspace/vt-geographiclib/project # timeout=10 
>>>   Fetching upstream changes from 
>>> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
>>>> /usr/bin/git --version # timeout=10 
>>>> /usr/bin/git -c core.askpass=true fetch --tags --progress 
>>> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
>>> +refs/heads/*:refs/remotes/origin/* 
>>> <http://g...@scm-vt.sarnoff.com/common/geographiclib.git+refs/heads/*:refs/remotes/origin/*>
>>>  
>>>> /usr/bin/git config remote.origin.url 
>>> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git # timeout=10 
>>>> /usr/bin/git config --add remote.origin.fetch 
>>> +refs/heads/*:refs/remotes/origin/* # timeout=10 
>>>> /usr/bin/git config remote.origin.url 
>>> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git # timeout=10 
>>>   Fetching upstream changes from 
>>> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
>>>> /usr/bin/git -c core.askpass=true fetch --tags --progress 
>>> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
>>> +refs/heads/*:refs/remotes/origin/* 
>>> <http://g...@scm-vt.sarnoff.com/common/geographiclib.git+refs/heads/*:refs/remotes/origin/*>
>>>  
>>>> /usr/bin/git rev-parse refs/remotes/origin/feature/majic^{commit} 
>>> # timeout=10 
>>>> /usr/bin/git rev-parse 
>>> refs/remotes/origin/origin/feature/majic^{commit} # timeout=10 
>>>   Checking out Revision efd6519b02aa23c02af3c4f25064b9ea91ec09f0 
>>> (refs/remotes/origin/feature/majic) 
>>>> /usr/bin/git config core.sparsecheckout # timeout=10 
>>>> /usr/bin/git checkout -f efd6519b02aa23c02af3c4f25064b9ea91ec09f0 
>>>> /usr/bin/git rev-list f98d0f44741e37d12d849870df884c0cdbd24bc5 # 
>>> timeout=10 
>>>   ERROR: Processing failed due to a bug in the code. Please report 
>>> this to jenkins...@googlegroups.com  
>>>   java.lang.RuntimeException: java.lang.IllegalArgumentException: No 
>>> matching Artifactory server was found in General Configuration. Please 
>>> update your job configuration. 
>>>   ... 
>>>
>>> I can execute the git commands "manually" on my machine OK.  The last 
>>> command 
>>>
>>>   /usr/bin/git rev-list f98d0f44741e37d12d849870df884c0cdbd24bc5 
>>>
>>> returns a list of 166 commits.  Let me know if you want additional 
>>> information. 
>>>
>> -- 
>> 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/7302f169-666b-49bf-8743-c75459343dac%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/7302f169-666b-49bf-8743-c75459343dac%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/623bdf82-ccd9-41fc-90ad-8cbdfc6a67b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ERROR: Processing failed due to a bug in the code.

2017-10-05 Thread Charles Karney
I'm running Jenkins 1.589.

On Thursday, October 5, 2017 at 10:32:20 AM UTC-4, Charles Karney wrote:
>
> Triggering a Jenkins build on a job that has "usually" worked gives: 
>
>   ERROR: Processing failed due to a bug in the code. Please report this 
>   to jenkinsci-users@googlegroups.com 
>
> The log up to this point is 
>
>   Started by user Charles Karney 
>   [EnvInject] - Loading node environment variables. 
>   Building remotely on bso-centos7-gpu (centos7gpu slave) in workspace 
> /var/lib/jenkins/workspace/vt-geographiclib 
>
>   Deleting project workspace... done 
>
>   Cloning the remote Git repository 
>   Cloning repository ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
> <http://www.google.com/url?q=http%3A%2F%2Fgit%40scm-vt.sarnoff.com%2Fcommon%2Fgeographiclib.git=D=1=AFQjCNHXr7KkPWGLrPz-tBvX7JULmCA_yQ>
>  
>> /usr/bin/git init 
> /var/lib/jenkins/workspace/vt-geographiclib/project # timeout=10 
>   Fetching upstream changes from 
> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
>> /usr/bin/git --version # timeout=10 
>> /usr/bin/git -c core.askpass=true fetch --tags --progress 
> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
> +refs/heads/*:refs/remotes/origin/* 
> <http://g...@scm-vt.sarnoff.com/common/geographiclib.git+refs/heads/*:refs/remotes/origin/*>
>  
>> /usr/bin/git config remote.origin.url 
> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git # timeout=10 
>> /usr/bin/git config --add remote.origin.fetch 
> +refs/heads/*:refs/remotes/origin/* # timeout=10 
>> /usr/bin/git config remote.origin.url 
> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git # timeout=10 
>   Fetching upstream changes from 
> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
>> /usr/bin/git -c core.askpass=true fetch --tags --progress 
> ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git 
> +refs/heads/*:refs/remotes/origin/* 
> <http://g...@scm-vt.sarnoff.com/common/geographiclib.git+refs/heads/*:refs/remotes/origin/*>
>  
>> /usr/bin/git rev-parse refs/remotes/origin/feature/majic^{commit} 
> # timeout=10 
>> /usr/bin/git rev-parse 
> refs/remotes/origin/origin/feature/majic^{commit} # timeout=10 
>   Checking out Revision efd6519b02aa23c02af3c4f25064b9ea91ec09f0 
> (refs/remotes/origin/feature/majic) 
>> /usr/bin/git config core.sparsecheckout # timeout=10 
>> /usr/bin/git checkout -f efd6519b02aa23c02af3c4f25064b9ea91ec09f0 
>> /usr/bin/git rev-list f98d0f44741e37d12d849870df884c0cdbd24bc5 # 
> timeout=10 
>   ERROR: Processing failed due to a bug in the code. Please report 
> this to jenkinsci-users@googlegroups.com 
>   java.lang.RuntimeException: java.lang.IllegalArgumentException: No 
> matching Artifactory server was found in General Configuration. Please 
> update your job configuration. 
>   ... 
>
> I can execute the git commands "manually" on my machine OK.  The last 
> command 
>
>   /usr/bin/git rev-list f98d0f44741e37d12d849870df884c0cdbd24bc5 
>
> returns a list of 166 commits.  Let me know if you want additional 
> information. 
>

-- 
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/7302f169-666b-49bf-8743-c75459343dac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ERROR: Processing failed due to a bug in the code.

2017-10-05 Thread Charles Karney
Triggering a Jenkins build on a job that has "usually" worked gives:

  ERROR: Processing failed due to a bug in the code. Please report this
  to jenkinsci-users@googlegroups.com

The log up to this point is

  Started by user Charles Karney
  [EnvInject] - Loading node environment variables.
  Building remotely on bso-centos7-gpu (centos7gpu slave) in workspace
/var/lib/jenkins/workspace/vt-geographiclib

  Deleting project workspace... done

  Cloning the remote Git repository
  Cloning repository ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git
   > /usr/bin/git init
/var/lib/jenkins/workspace/vt-geographiclib/project # timeout=10
  Fetching upstream changes from
ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git
   > /usr/bin/git --version # timeout=10
   > /usr/bin/git -c core.askpass=true fetch --tags --progress
ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git
+refs/heads/*:refs/remotes/origin/*
   > /usr/bin/git config remote.origin.url
ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git # timeout=10
   > /usr/bin/git config --add remote.origin.fetch
+refs/heads/*:refs/remotes/origin/* # timeout=10
   > /usr/bin/git config remote.origin.url
ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git # timeout=10
  Fetching upstream changes from
ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git
   > /usr/bin/git -c core.askpass=true fetch --tags --progress
ssh://g...@scm-vt.sarnoff.com/common/geographiclib.git
+refs/heads/*:refs/remotes/origin/*
   > /usr/bin/git rev-parse refs/remotes/origin/feature/majic^{commit}
# timeout=10
   > /usr/bin/git rev-parse
refs/remotes/origin/origin/feature/majic^{commit} # timeout=10
  Checking out Revision efd6519b02aa23c02af3c4f25064b9ea91ec09f0
(refs/remotes/origin/feature/majic)
   > /usr/bin/git config core.sparsecheckout # timeout=10
   > /usr/bin/git checkout -f efd6519b02aa23c02af3c4f25064b9ea91ec09f0
   > /usr/bin/git rev-list f98d0f44741e37d12d849870df884c0cdbd24bc5 # timeout=10
  ERROR: Processing failed due to a bug in the code. Please report
this to jenkinsci-users@googlegroups.com
  java.lang.RuntimeException: java.lang.IllegalArgumentException: No
matching Artifactory server was found in General Configuration. Please
update your job configuration.
  ...

I can execute the git commands "manually" on my machine OK.  The last
command

  /usr/bin/git rev-list f98d0f44741e37d12d849870df884c0cdbd24bc5

returns a list of 166 commits.  Let me know if you want additional
information.

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


j_acegi_security_check login error

2015-10-07 Thread Charles Choi
I am using:
Jenkins ver. 1.609.3
Matrix Authorization Strategy Plugin 1.2 

I use Windows SG to control access.  I added a SG.  There is one user in 
the SG, he is not able to login and get error: 
http://:8080/j_acegi_security_check.
If I add him as individual user, he has access.

What is causing this issue?
It is a nightmare to manage just one user.

-- 
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/feded1f1-8925-40ec-955f-72a7635bf2ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OSX Slave Agent Crashing/Closing

2014-11-11 Thread Charles Blessing
Well, it survived the night so it looks like that might have been the 
problem - thanks for the help!

On Monday, 10 November 2014 15:53:29 UTC, Charles Blessing wrote:

 I have a Windows-based master and a single OSX client. Builds are run on 
 the OSX client using the Jenkins slave agent which is launched manually by 
 downloading and running the appropriate jnlp file from the master web 
 server.

 Once running, builds and notifications progress as expected.

 However, approximately once a day - usually overnight when no builds are 
 running, the slave agent closes. Sometimes when I go to check it just isn't 
 running any more, once or twice it has crashed. I'm intending to gather 
 more information next time a crash occurs, although typically since 
 deciding to do this it has just been closing 'cleanly'.

 Unfortunately I'm not entirely sure when this started to happen as there 
 was an extended period of one project being left in a 'known broken state', 
 resulting in Jenkins getting turned off.

 Any suggestions on how to fix this situation would be much 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.
For more options, visit https://groups.google.com/d/optout.


OSX Slave Agent Crashing/Closing

2014-11-10 Thread Charles Blessing


I have a Windows-based master and a single OSX client. Builds are run on 
the OSX client using the Jenkins slave agent which is launched manually by 
downloading and running the appropriate jnlp file from the master web 
server.

Once running, builds and notifications progress as expected.

However, approximately once a day - usually overnight when no builds are 
running, the slave agent closes. Sometimes when I go to check it just isn't 
running any more, once or twice it has crashed. I'm intending to gather 
more information next time a crash occurs, although typically since 
deciding to do this it has just been closing 'cleanly'.

Unfortunately I'm not entirely sure when this started to happen as there 
was an extended period of one project being left in a 'known broken state', 
resulting in Jenkins getting turned off.

Any suggestions on how to fix this situation would be much 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.
For more options, visit https://groups.google.com/d/optout.


Re: OSX Slave Agent Crashing/Closing

2014-11-10 Thread Charles Blessing
Hi rginga,

Thanks for the suggestion.  It was configured to go to sleep between 
midnight and 8am (when there were no jobs running).  I have changed it to 
never sleep and will see if that makes any difference.

Charles

  

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Help required for Android plugin - 'use emulator snapshots'

2014-05-15 Thread Charles Chan
Figured out it's an old issue with 2.10 release:

https://github.com/jenkinsci/android-emulator-plugin/blob/android-emulator-2.10/src/main/java/hudson/plugins/android_emulator/Constants.java#L49

   static final String REGEX_SNAPSHOT = [0-9]+ ++ SNAPSHOT_NAME + +[0-9]+M ;


Since the regex looking for M (megabyte) and my snapshot is 1.0G. The 
regex fails and the snapshot is not found.

This has been fixed in the head.

On Tuesday, May 13, 2014 12:31:01 PM UTC-7, Charles Chan wrote:

 Thanks for the information.

 I try setting to emulator-x86 again and I still get the same behaviour 
 from Jenkins:
 $ /opt/android-sdk-linux/tools/emulator-x86 -snapshot-list -no-window -avd 
 hudson_en-US_160_WVGA_android-19_x86

 [android] Starting Android emulator and creating initial snapshot


 However, if I execute from the command line, I can see the snapshot are 
 present:

 $ /opt/android-sdk-linux/tools/emulator-x86 -snapshot-list -no-window -avd 
 hudson_en-US_160_WVGA_android-19_x86
 Snapshots in file 
 '/home/jenkins/.android/avd/hudson_en-US_160_WVGA_android-19_x86.avd/snapshots.img':
  IDTAG VM SIZEDATE   VM CLOCK
  1 jenkins1.0G 2014-05-13 12:11:26   00:07:51.870


 Any ideas?


-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Help required for Android plugin - 'use emulator snapshots'

2014-05-13 Thread Charles Chan
Thanks for the information.

I try setting to emulator-x86 again and I still get the same behaviour 
from Jenkins:
$ /opt/android-sdk-linux/tools/emulator-x86 -snapshot-list -no-window -avd 
hudson_en-US_160_WVGA_android-19_x86

[android] Starting Android emulator and creating initial snapshot


However, if I execute from the command line, I can see the snapshot are present:

$ /opt/android-sdk-linux/tools/emulator-x86 -snapshot-list -no-window -avd 
hudson_en-US_160_WVGA_android-19_x86
Snapshots in file 
'/home/jenkins/.android/avd/hudson_en-US_160_WVGA_android-19_x86.avd/snapshots.img':
 IDTAG VM SIZEDATE   VM CLOCK
 1 jenkins1.0G 2014-05-13 12:11:26   00:07:51.870


Any ideas?

On Tuesday, May 13, 2014 2:24:17 AM UTC-7, Christopher Orr wrote:

 On 10/05/14 00:49, Charles Chan wrote: 
  I have been trying to use the snapshot functionality in the Android 
  plugin but somehow it keeps creating a new snapshot every time. 
  
  I looked at the code EmulatorConfig.hasExistingSnapshot(), and saw the 
 comment. But I don't think it apply? 
  
   // Work around 
   // https://code.google.com/p/android/issues/detail?id=34233 
   // by always using EMULATOR_ARM to view the snapshot list. 

 That bug does apply.  That code you quoted isn't in a released build 
 yet; I'm aiming to do a new plugin release this week. 

 As mentioned here (and hinted at by that code), you can change the 
 emulator binary in your job config to get around that Android SDK tools 
 bug: 

 http://stackoverflow.com/questions/13381460/why-is-jenkins-android-emulator-plugin-recreating-my-emulator-snapshots-in-every
  

 Regards, 
 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.
For more options, visit https://groups.google.com/d/optout.


Help required for Android plugin - 'use emulator snapshots'

2014-05-09 Thread Charles Chan
I have been trying to use the snapshot functionality in the Android plugin 
but somehow it keeps creating a new snapshot every time.

$ /opt/android-sdk-linux/platform-tools/adb start-server

$ /opt/android-sdk-linux/tools/emulator -snapshot-list -no-window -avd 
hudson_en-US_160_WVGA_android-19_x86

[android] Starting Android emulator and creating initial snapshot

[android] Erasing existing emulator data...

$ /opt/android-sdk-linux/tools/emulator -no-boot-anim -ports 54032,48039 -prop 
persist.sys.language=en -prop persist.sys.country=US -avd 
hudson_en-US_160_WVGA_android-19_x86 -no-snapshot-load -no-snapshot-save 
-wipe-data -no-window -force-32bit

...

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:60122 shell log -p v 
-t Jenkins Creating snapshot...

[android] Creating snapshot...

$ /opt/android-sdk-linux/platform-tools/adb connect localhost:60122

[android] Emulator is ready for use (took 705 seconds)

...



I can confirm the snapshot exists:

$ /opt/android-sdk-linux/tools/emulator -snapshot-list -no-window -avd 
hudson_en-US_160_WVGA_android-19_x86

Snapshots in file 
'/home/jenkins/.android/avd/hudson_en-US_160_WVGA_android-19_x86.avd/snapshots.img':

 IDTAG VM SIZEDATE   VM CLOCK

 1 jenkins1.0G 2014-05-09 14:07:09   00:08:23.364



But if I restart the job again, the log will show the saw message:

$ /opt/android-sdk-linux/tools/emulator -snapshot-list -no-window -avd 
hudson_en-US_160_WVGA_android-19_x86

[android] Starting Android emulator and creating initial snapshot

[android] Erasing existing emulator data...



I looked at the code EmulatorConfig.hasExistingSnapshot(), and saw the comment. 
But I don't think it apply?

// Work around
// https://code.google.com/p/android/issues/detail?id=34233
// by always using EMULATOR_ARM to view the snapshot list.



How can I figure out what's wrong? (Note: Running OS CentOS 6.4 64bit Linux)

Thanks,
Charles

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Does the Android emulator work inside a VM?

2014-05-07 Thread Charles Chan
Summary: Does the Android emulator work inside a VM? Or must it be run on a 
bare metal machine?

I am trying to setup some automated tests using Jenkins with the Android 
plugin. The slave is a VM (on top) of VMWare ESXi, running Ubuntu Linux (32 
bit x86). When the emulator tries to start the VM, it shows an error 
Failed to Initialize backend EGL display and nothing happens.

[android] Using Android SDK: /home/hudson/hudson/tools/android-sdk

[android] Creating Android AVD: 
/home/hudson/.android/avd/hudson_en-US_160_1080x1920_android-19_x86.avd

[android] /home/hudson/hudson/tools/android-sdk/tools/android create avd -f 
-a -s 1080x1920 -n hudson_en-US_160_1080x1920_android-19_x86 -t android-19 
--abi x86
[android] Setting hardware properties:
hw.ramSize: 768
vm.heapSize: 64

$ /home/hudson/hudson/tools/android-sdk/platform-tools/adb start-server

$ /home/hudson/hudson/tools/android-sdk/tools/emulator -snapshot-list 
-no-window -avd hudson_en-US_160_1080x1920_android-19_x86
[android] Starting Android emulator and creating initial snapshot
$ /home/hudson/hudson/tools/android-sdk/tools/emulator -no-boot-anim -ports 
45507,44892 -prop persist.sys.language=en -prop persist.sys.country=US -avd 
hudson_en-US_160_1080x1920_android-19_x86 -no-snapshot-load 
-no-snapshot-save -wipe-data -no-window -noaudio -gpu off
* daemon not running. starting it now on port 39784 *
* daemon started successfully *
Failed to Initialize backend EGL display
...
emulator: WARNING: Could not initialize OpenglES emulation, using software 
renderer.

I tried with different abi (x86|x86) and options (combinations of -noaudio 
-gpu off). All failing. I also tried to login to the console and launch the 
emulator manually. All I see is a black emulator window. The emulator 
process is actively running ('top' command), but I don't see the home 
screen.

Thanks,
Charles

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins slave appear offline - SSHLauncher threads BLOCKED

2014-05-06 Thread Charles Chan
Thanks for the confirmation.

On Tuesday, May 6, 2014 4:40:59 AM UTC-7, Stephen Connolly wrote:

 Yes, it sounds like there is a race condition between the post disconnect 
 tasks and the reconnect tasks: 
 https://github.com/jenkinsci/ssh-slaves-plugin/blob/ssh-slaves-1.6/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L1152is
  blocking until the slave is connected... but the slave cannot connect 
 until the disconnect tasks are complete... 


Is there any workaround for this issue? eg. Would it help if we download to 
an older version (which one)?
Secondly, is a fix scheduled for this? Or do I need to create an issue 
first?

Cheers,
Charles 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Jenkins slave appear offline - SSHLauncher threads BLOCKED

2014-05-05 Thread Charles Chan


Hello,

One of the issue we have recently been experiencing with Jenkins is that the 
slaves (node) would go offline for no apparent reason and would not reconnect 
automatically.
When slaves appear as offline, we tried to launch/reconnect the slave manually 
but it does not work either. However, we are able to SSH into the machine using 
PuTTy.
The only workaround is to restart the Jenkins server, until the problem 
surfaces again. (Typically in a week.)

Instance Information

Jenkins Server:1.562
SSH Credentials Plugin:1.6.1
SSH Slaves Plugin  1.6

Thread dump of slave node:
{dump}
Channel reader thread: qa-linbuild-02 prio=5 WAITING
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)

com.trilead.ssh2.channel.ChannelManager.waitUntilChannelOpen(ChannelManager.java:109)

com.trilead.ssh2.channel.ChannelManager.openSessionChannel(ChannelManager.java:583)
com.trilead.ssh2.Session.init(Session.java:41)
com.trilead.ssh2.Connection.openSession(Connection.java:1129)
com.trilead.ssh2.SFTPv3Client.init(SFTPv3Client.java:99)
com.trilead.ssh2.SFTPv3Client.init(SFTPv3Client.java:119)

hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:1160)
hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:437)
hudson.remoting.Channel.terminate(Channel.java:819)

hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:76)

Channel reader thread: qa-linbuild-03 prio=5 WAITING
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)

com.trilead.ssh2.channel.ChannelManager.waitUntilChannelOpen(ChannelManager.java:109)

com.trilead.ssh2.channel.ChannelManager.openSessionChannel(ChannelManager.java:583)
com.trilead.ssh2.Session.init(Session.java:41)
com.trilead.ssh2.Connection.openSession(Connection.java:1129)
com.trilead.ssh2.SFTPv3Client.init(SFTPv3Client.java:99)
com.trilead.ssh2.SFTPv3Client.init(SFTPv3Client.java:119)

hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:1160)
hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:437)
hudson.remoting.Channel.terminate(Channel.java:819)

hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:76)
{dump}

Also concerning is the number of threads is in the BLOCKED (126!). 
Doesn't seem normal as there are no BLOCKED threads after the server is 
restarted.
{dump}
// 118 instances
Computer.threadPoolForRemoting [#26] daemon prio=5 BLOCKED

hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:1152)
hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:542)

jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)

// 8 instances
Computer.threadPoolForRemoting [#2922] daemon prio=5 BLOCKED
hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:639)
hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:222)

jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)
{dump}

Looking forward to any ideas or suggestions.

Thank you.
Charles Chan

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins slave appear offline - SSHLauncher threads BLOCKED

2014-05-05 Thread Charles Chan
On Monday, May 5, 2014 2:26:19 PM UTC-7, Kevin Fleming wrote:

 Unfortunately it's not possible to reconnect to an SSH session; if the 
 session is disconnected, the SSH daemon on the receiving end will close its 
 end, and kill any processes that had been launched by that connection. In 
 other words, any job that was running will be lost.


Fair enough. If the ssh session is disconnected, the existing job shall be 
terminated and the slave appears offline.

It appears Jenkins has the ability to automatically reconnect via SSH 
(bring the slave online) but is blocked. Subsequent attempts to reconnect 
manually will then fail as well until a server restart -- even if the slave 
is accessible via PuTTy. 

It would be nice to be able to figure out how these SSHLauncher threads 
were spawned in the first place, the root cause of the blocked threads, and 
how to recover from the incident after. 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


CI and optimize build time

2014-04-07 Thread Charles Chan
I came across this article from the Google Testing Blog a while ago:
http://googletesting.blogspot.ca/2011/06/testing-at-speed-and-scale-of-google.html

As our builds are taking longer run, I wonder if there is any tools/plugins 
available to help implement the pipeline described in the article:
* analyze code changes and dependencies
* re-run test case based on changes
* split job into jobs automatically if it is advantageous to do so

Projects are mostly Maven based, some Ant (Android / C++)

Look forward to any feedback.

Thanks!
Charles

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Is it possible to scan for warnings in Visual Studio PREfast files

2014-02-20 Thread Charles Chan
In our Jenkins job, we set up Visual Studio to run the static code 
analysis. This produces an XML file, similar to the one above. We would 
like to use the plugin Scan for compiler warnings to monitor the number 
of violations. I have tried a number of different parser, but it doesn't 
seem to be picking up on the defects.

Example PREfast XML file
https://code.google.com/p/cstracker/source/browse/trunk/CsTracker/Sys/PREfast_defects_chk_wlh_x86.xml?r=4

Looking for pointer from anyone who might have done something similar.

Thanks in advance.
Charles

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Broken pipe with bash script

2012-10-26 Thread Charles-Axel Dein
Amazing. Will try that now.

Thanks!

On Fri, Oct 26, 2012 at 4:01 PM, Bap old_ho...@a1.org.uk wrote:

 Quoting Charles-Axel Dein charlesaxel.d...@gmail.com:

  Hi,

 I'm trying to have MySQL and Redis run on two different ports. Since I
 want
 to parallelize builds, I'm using this command to find an unused,
 unprivileged port:

 export MYSQL_PORT=$( (netstat  -atn | awk '{printf %s\n%s\n, $4, $4}' |
 grep -oE '[0-9]*$'; seq 32768 61000) | sort -n | uniq -u | head -n 1)
 export REDIS_PORT=$( (netstat -atn | awk '{printf %s\n%s\n, $4, $4}' |
 grep -oE '[0-9]*$'; seq 32768 61000) | sort -n | uniq -u | grep -v
 $MYSQL_PORT | head -n 1)

 Yet I'm always getting all sorts of :

 uniq: write error: Broken pipe
 grep: writing output: Broken pipe

 I tried running those commands on the machine with the jenkins user, they
 work perfectly.

 Any idea?

 Thanks!

 Charles


 Have you seen https://wiki.jenkins-ci.org/**display/JENKINS/Port+**
 Allocator+Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin?

 May make your job a bit easier :-)




Re: Broken pipe with bash script

2012-10-26 Thread Charles-Axel Dein
Works perfectly. Thanks again!

On Fri, Oct 26, 2012 at 4:18 PM, Charles-Axel Dein c...@d3in.org wrote:

 Amazing. Will try that now.

 Thanks!


 On Fri, Oct 26, 2012 at 4:01 PM, Bap old_ho...@a1.org.uk wrote:

 Quoting Charles-Axel Dein charlesaxel.d...@gmail.com:

  Hi,

 I'm trying to have MySQL and Redis run on two different ports. Since I
 want
 to parallelize builds, I'm using this command to find an unused,
 unprivileged port:

 export MYSQL_PORT=$( (netstat  -atn | awk '{printf %s\n%s\n, $4, $4}' |
 grep -oE '[0-9]*$'; seq 32768 61000) | sort -n | uniq -u | head -n 1)
 export REDIS_PORT=$( (netstat -atn | awk '{printf %s\n%s\n, $4, $4}' |
 grep -oE '[0-9]*$'; seq 32768 61000) | sort -n | uniq -u | grep -v
 $MYSQL_PORT | head -n 1)

 Yet I'm always getting all sorts of :

 uniq: write error: Broken pipe
 grep: writing output: Broken pipe

 I tried running those commands on the machine with the jenkins user, they
 work perfectly.

 Any idea?

 Thanks!

 Charles


 Have you seen https://wiki.jenkins-ci.org/**display/JENKINS/Port+**
 Allocator+Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin?

 May make your job a bit easier :-)





Project based security defaults - full access only to personal/group jobs

2012-03-07 Thread Charles Gagnon
We use Jenkins to monitor and run a number of external jobs (mainly)
and builds. We have started using the project based security and would
like a setup where user can login and create jobs and only see their
own jobs (or group related jobs).

We have something close now as we can permission users to create
jobs but when they do, they don't automatically get permissioned for
their own jobs and the user gets a error page until someone who has
overall permissions adds them for this job.

Seems very hard in general to keep users segregated in groups in
Jenkins and have them view only what they allowed to.

We may end-up just doing seperate instances in Jenkins but if someone
has good advice, it would be welcome at this point.

Tks



Re: Git+Gitolite+Jenkins

2012-02-27 Thread Charles
yep...  that was it...  removed the /repositories directory and all
worked as it should...

Thanks!!

On Feb 27, 9:43 am, matthew.web...@diamond.ac.uk wrote:
 Try git clone ssh://git@myGitServer/repo.git (WITHOUT repositories/ in the 
 URL). That's a gitolite thing.









  -Original Message-
  From: jenkinsci-users@googlegroups.com 
  [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Charles
  Sent: 27 February 2012 15:38
  To: Jenkins Users
  Subject: Re: Git+Gitolite+Jenkins

  If I do this from my workstation:

  git clone git@myGitServer:repo.git

  The repo clones correctly.

  However, if I do this:

  git clone ssh://git@myGitServer/repositories/repo.git

  I get:

  charles.brown /c/Development
  $ git clone ssh://git@myGitServer/repositories/hub-application.git
  Cloning into 'hub-application'...
  Using keyboard-interactive authentication.
  R access for repositories/hub-application DENIED to charles.brown
  (Or there may be no repository at the given path. Did you spell it
  correctly?)
  fatal: The remote end hung up unexpectedly

  Same if I su to the 'jenkins' user...

 --
 This e-mail and any attachments may contain confidential, copyright and or 
 privileged material, and are for the use of the intended addressee only. If 
 you are not the intended addressee or an authorised recipient of the 
 addressee please notify us of receipt by returning the e-mail and do not use, 
 copy, retain, distribute or disclose the information in or attached to the 
 e-mail.
 Any opinions expressed within this e-mail are those of the individual and not 
 necessarily of Diamond Light Source Ltd.
 Diamond Light Source Ltd. cannot guarantee that this e-mail or any 
 attachments are free from viruses and we cannot accept liability for any 
 damage which you may sustain as a result of software viruses which may be 
 transmitted in or with the message.
 Diamond Light Source Limited (company no. 4375679). Registered in England and 
 Wales with its registered office at Diamond House, Harwell Science and 
 Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom