Reading the $POM_VERSION in a groovy system (post) build step

2014-04-15 Thread dev123
I have a maven project where I define a groovy system (I need access to the 
jenkins DOM) post build step. In this step I need to read the POM__VERSION 
parameter modify it and export it as a new env. variable that can be used 
in the following build steps. Notice that configuring a shell post step 
that does:

echo pom-version  ${POM_VERSION}

works fine.


Now in the groovy system build step:
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin

I have tried the following without success (null in all cases):

1)
println System.getProperty('POM_VERSION')


2)
def foo = build.buildVariableResolver.resolve(POM_VERSION)
println POM_VERSION=$foo

3)
def env = System.getenv()
println env[POM_VERSION]


How do I read the POM_VERSION variable from the maven build step?

-- 
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.


Bug in the promoted-build plugin when using release condition

2014-04-10 Thread dev123
It seems that the promoting a build based on  a release condition is broken 
in the promoted build plugin (version 2.17). I have reported a bug:

https://issues.jenkins-ci.org/browse/JENKINS-22565


Please comment or vote for this bug if you have the same 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.
For more options, visit https://groups.google.com/d/optout.


Re: Trigger a job Y after an artifact from job X has been released?

2014-04-10 Thread dev123
I now use the conditional trigger plugin where I set the boolean token to 
evaluate $IS_M2RELEASEBUILD. Works fine.




On Wednesday, April 9, 2014 11:09:07 PM UTC+2, dev123 wrote:

 Ah yes. I have installed the promoted build plugin. I have then checked 
 (for some reason the same option appears twice):


 https://lh3.googleusercontent.com/-DIcIBG-gbyA/U0W05spnVkI/AA4/Z9eTQ7BSiTs/s1600/promoted.png


 In a job *X*. Next I selected the job *a* to trigger under Action:



 https://lh6.googleusercontent.com/-f0Iz8BaYmoI/U0W2HK9cDvI/ABA/DJL305P4YiY/s1600/promote2.png


 But when I run the maven-release on the job *X* and it completes the job 
 *a* is not triggered. What am I missing?




 On Wednesday, April 9, 2014 10:38:23 PM UTC+2, Kevin Fleming wrote:

 This is called 'promotion'. Check out the Promoted Builds plugin.

 - Original Message -
 From: jenkins...@googlegroups.com
 To: jenkins...@googlegroups.com
 At: Apr 9 2014 16:06:41

 I have a few maven projects A, B and C on Jenkins. I have configured the 
 maven-release-plugin for the projects so I can release them with a single 
 click on the release button.

 Now I have another project that picks up released artifacts, integrates 
 them and runs a QA test. Currently I trigger this QA job manually.

 Now I need to trigger this QA job automatically when either A, B or C is 
 being released through Jenkins. I don't want to trigger the QA job each 
 time a change is pushed to either A,B or C only when they have been 
 released. Is that possible - to trigger a job Y if a job X has been 
 released?
 -- 
 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.
 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.
For more options, visit https://groups.google.com/d/optout.


Where did the Append Jenkins Build Number in the m2-release plugin go?

2014-04-10 Thread dev123
Jenkins 1.558

I understand that Append Jenkins Build Number has been removed in the 
mvn-release plugin since it had no effect
https://issues.jenkins-ci.org/browse/JENKINS-20753

But it is possible to get this feature to work automatically work somehow 
anyway?


Before:

https://lh5.googleusercontent.com/-2uDE5QlvPBQ/U0Z5nZL5l7I/ABQ/KvmBqWrxcwc/s1600/mvn-rel.png
After:

https://lh3.googleusercontent.com/-ZHQYTmnmXNA/U0Z-PXKvvwI/ABc/8YXDKCgYxiI/s1600/mvn-rel222.png

-- 
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.


Trigger a job Y after an artifact from job X has been released?

2014-04-09 Thread dev123
I have a few maven projects A, B and C on Jenkins. I have configured the 
maven-release-plugin for the projects so I can release them with a single 
click on the release button.

Now I have another project that picks up released artifacts, integrates 
them and runs a QA test. Currently I trigger this QA job manually.

Now I need to trigger this QA job automatically when either A, B or C is 
being released through Jenkins. I don't want to trigger the QA job each 
time a change is pushed to either A,B or C only when they have been 
released. Is that possible - to trigger a job Y if a job X has been 
released?

-- 
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: Trigger a job Y after an artifact from job X has been released?

2014-04-09 Thread dev123


Ah yes. I have installed the promoted build plugin. I have then checked 
(for some reason the same option appears twice):

https://lh3.googleusercontent.com/-DIcIBG-gbyA/U0W05spnVkI/AA4/Z9eTQ7BSiTs/s1600/promoted.png


In a job *X*. Next I selected the job *a* to trigger under Action:


https://lh6.googleusercontent.com/-f0Iz8BaYmoI/U0W2HK9cDvI/ABA/DJL305P4YiY/s1600/promote2.png


But when I run the maven-release on the job *X* and it completes the job *a*is 
not triggered. What am I missing?




On Wednesday, April 9, 2014 10:38:23 PM UTC+2, Kevin Fleming wrote:

 This is called 'promotion'. Check out the Promoted Builds plugin.

 - Original Message -
 From: jenkins...@googlegroups.com javascript:
 To: jenkins...@googlegroups.com javascript:
 At: Apr 9 2014 16:06:41

 I have a few maven projects A, B and C on Jenkins. I have configured the 
 maven-release-plugin for the projects so I can release them with a single 
 click on the release button.

 Now I have another project that picks up released artifacts, integrates 
 them and runs a QA test. Currently I trigger this QA job manually.

 Now I need to trigger this QA job automatically when either A, B or C is 
 being released through Jenkins. I don't want to trigger the QA job each 
 time a change is pushed to either A,B or C only when they have been 
 released. Is that possible - to trigger a job Y if a job X has been 
 released?
 -- 
 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 javascript:.
 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.
For more options, visit https://groups.google.com/d/optout.


Dynamically populate choice parameters

2014-04-08 Thread dev123
I am looking either for an existing plugin or suggestion for writing my own 
plugin that will give me the following functionality:

On the job configuration page the user has access to one or more choice 
parameter drop-down menus. Now when the user clicks one of these drop-down 
boxes the values are dynamically populated by a list of strings.

I need the list of strings to be e.g versions from all artifacts in the 
snapshot repository in artifactory/nexus having the coordinates: 
groupId:artifactId:versions.

Are there any plugins that allows generating dynamically values e.g from 
listing elements on a webserver?

I have looked at:
https://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin

Using this approach I would need to implement some logic that build a 
remote properties file. Any other suggestions?

-- 
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.


Cannot delete string parameter from job configuration

2014-04-02 Thread dev123
I have copied a Jenkins master to a new machine. Basically I just installed 
Jenkins (1.557) on the new machine and copied the plugins/jobs/config.xml 
etc. to the new machine after installing Jenkins.

Everything seems to be up and running just fine.

But when I try to delete a String parameter from one of my job 
configurations and try to save the configuration nothing happens - its 
seems that the change is not persisted. I can add a new parameter just fine.

Any ideas what might be causing this behavior?

-- 
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.


Using the git plugin and specifying git branch

2014-03-30 Thread dev123
Jenkins1.549
Git plugin 1.5.0 

I have a job in jenkins where I specify the following branch to build: 
origin/myfeature. I also have another job that is configured to build 
origin/master.

Using strategy: Default
Last Built Revision: Revision 1966b44e903862343c98c46f4a94d5a603a9a58f 
(origin/myfeature)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Commencing build of Revision 0643d142b4dfa95cbc77fd4cda11306302fd866c 
(origin/myfeature)
Checking out Revision 0643d142b4dfa95cbc77fd4cda11306302fd866c 
(origin/myfeature)

But do I need to prefix my branchId with origin? It seems to me that the 
get plugin always does:

1) Fetch latest changes
2) Checkout the specified branch on origin

It does not look like it stores local branches but instead builds from a 
Detached Head. Is that correct?


-- 
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.


Running multiple TriggerBuilder in parallel from code using Jenkin API?

2014-03-16 Thread dev123
In a plugin I need to trigger multiple builds of a job in parallel (I have 
defined 4 executors on my slave). I have this:

   
  private TriggerBuilder createTriggerBuilder(ListJob jobs) throws 
IOException {
ListBlockableBuildTriggerConfig configs = new 
ArrayListBlockableBuildTriggerConfig();
   for (MyPOJO job : pojos) {

  // to let the caller job do a clean up, don't let the failure in the 
test
  // job early-terminate the build process
  // that's why the first argument is ABORTED.
  BlockingBehaviour blocking = new BlockingBehaviour(Result.ABORTED, 
Result.UNSTABLE, Result.FAILURE);
  ListAbstractBuildParameters pp = getBuildParameters(job)
  BlockableBuildTriggerConfig blockableBuildTriggerConfig = new 
BlockableBuildTriggerConfig(workerJob, blocking, pp);
  configs.add(blockableBuildTriggerConfig);
}
return new TriggerBuilder(configs);
  }

  public void perform() throws IOException, InterruptedException, 
ExecutionException {
TriggerBuilder createTriggerBuilder = createTriggerBuilder(jobs);
createTriggerBuilder.perform(build, launcher, listener);




When I have 4 MyPOJOs 4 configs will be added to the TriggerBuilder but 
when I run the main job where this trigger is added they are executed 
sequentially.

How do I execute the 4 BlockableBuildTriggerConfig in parallel?

In the workerJob I have enabled/checked  Execute concurrent builds if 
necessary

-- 
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.


java.lang.NoClassDefFoundError: hudson/maven/MavenModuleSet

2014-03-15 Thread dev123
I am writing a jenkins plugin. In the plugin I have a class that extends 
Builder which has a method that checks if a given project is a 
MavenModuleSet:

if (workerProject instanceof MavenModuleSet) {
  MavenModuleSet mavenModuleSet = (MavenModuleSet) workerProject;
  mavenModuleSet.setGoals(clean package);
}
  }


when I run mvn hpi:run to test my plugin and run it I get:

java.lang.NoClassDefFoundError 
http://stacktrace.jenkins-ci.org/search?query=java.lang.NoClassDefFoundError: 
hudson/maven/MavenModuleSet


In the pom of my plugin I have tried to add the maven-plugin explicitly:


parent
groupIdorg.jenkins-ci.plugins/groupId
artifactIdplugin/artifactId
version1.553/version
/parent


groupIdcom.samples/groupId
artifactIdmy-plugin/artifactId
version1.0.0-SNAPSHOT/version
packaginghpi/packaging


dependencies

dependency
groupIdorg.jenkins-ci.plugins/groupId
artifactIdparameterized-trigger/artifactId
version2.22/version
/dependency
dependency
groupIdorg.jenkins-ci.main/groupId
artifactIdmaven-plugin/artifactId
version2.1/version
/dependency
dependency
groupIdorg.jenkins-ci.plugins/groupId
artifactIdbuild-name-setter/artifactId
version1.3/version
/dependency
dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.11/version
scopetest/scope
/dependency
/dependencies


but it does not help. Any suggestions?

-- 
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.


Cannot create folder/file in slave home dir when running job on a slave

2014-03-10 Thread dev123
In a plugin I start a job on a slave and at some point I need to create a 
file in a folder in the jenkins home folder on the slave 
(/var/jenkins/sampleFolder). Its a hack but necessary for now.

File outputDir = new File(/var/jenkins/sampleFolder/);
if (!outputDir.exists()) {
  outputDir.mkdirs();
  listener.getLogger().println(Created directory:  + 
outputDir.getAbsolutePath());
}
File file = new File(outputDir, config.properties);
if (!outputDir.exists()) {
  listener.getLogger().println(Not found:  + 
outputDir.getAbsolutePath());
}

boolean createNewFile = file.createNewFile();
if (createNewFile) {
  PrintWriter printWriter = new PrintWriter(new FileWriter(file));
  printWriter.println(a : v );
  printWriter.close();
} else {
  listener.getLogger().println(Error! could not create file  + 
file.getAbsolutePath());
}

But I get an error that the file cannot be created or more specifically:

ERROR: No such file or directory

If I run the job on the master it works.

Is it not allowed to create files/folders on a slave in the Jenkins home 
folder?



-- 
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.


Schedule a build in parallel from code (Jenkins API)

2014-03-09 Thread dev123
In a jenkins plugin I am writing I need to run 5 jobs in parallel. 
Currently I do (sequentially):

for (int i = 0; i  4; i++) {
  try {
build = project.scheduleBuild2(0, new Cause.UserCause(), 
myActions[i]).get();
  } catch (Exception e) {
throw new AbortException(e.getMessage());
  }  
}

How do I trigger these jobs to run in parallel - each one on a separate 
executor?

-- 
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: Schedule a build in parallel from code (Jenkins API)

2014-03-09 Thread dev123
Not sure I understand I now do:


for (int i = 0; i  4; i++) {
  try {
QueueTaskFuture? scheduleBuild2 = project.scheduleBuild2(0, new 
Cause.UserCause(), myActions[i]);
queue.add(scheduleBuild2);
  } catch (Exception e) {
throw new AbortException(e.getMessage());
  }
}

for (QueueTaskFuture? q : queue) {
  q.get();
}


I need to get the results from each job and print some info but it still 
does not execute in parallel. 

I also found this:

Queue$Item item = Jenkins.getInstance().getQueue().schedule2(null, 0, 
 myActions[i])

But I still does not give me what I want.


On Sunday, March 9, 2014 10:32:31 PM UTC+1, Daniel Beck wrote:

 Don't immediately call .get(), instead assign the Future returned from 
 scheduleBuild2 to a variable. Only .get() once you're willing to wait for 
 the build to complete. 

 On 09.03.2014, at 22:27, dev123 delb...@gmail.com javascript: wrote: 

  In a jenkins plugin I am writing I need to run 5 jobs in parallel. 
 Currently I do (sequentially): 
  
  for (int i = 0; i  4; i++) { 
try { 
  build = project.scheduleBuild2(0, new Cause.UserCause(), 
 myActions[i]).get(); 
} catch (Exception e) { 
  throw new AbortException(e.getMessage()); 
}   
  } 
  
  How do I trigger these jobs to run in parallel - each one on a separate 
 executor? 
  
  
  -- 
  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 javascript:. 
  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.
For more options, visit https://groups.google.com/d/optout.


Re: Schedule a build in parallel from code (Jenkins API)

2014-03-09 Thread dev123
Yes I did a check in allow concurrent execution.

Now when I run mvn clean hpi:run it starts the jobs in parallel on the 
available executors, but its spawns jobs infinitely and the text:  Done 
in:  + object.getTime() is never printed. And I have not even pressed the 
build button.

Why do I get something that seems like an infinite loop?

Here is my code based on your script:

ListFuture? futures = new ArrayListFuture?();
for (int i = 0; i  5; i++) {
  System.out.println(Running:  + i +  out off:  + executors);
  try {
QueueTaskFuture? scheduleBuild2 = 
build.getProject().scheduleBuild2(0, new Cause.UserCause(), 
parametersAction);
futures.add((Future) scheduleBuild2);
  } catch (Exception e) {
throw new AbortException(e.getMessage());
  }
}
for (Future? future : futures) {
  AbstractBuild?, ? object = (AbstractBuild?, ?) future.get();
  System.out.println( Done in:  + object.getTime());
}




On Sunday, March 9, 2014 11:23:37 PM UTC+1, Daniel Beck wrote:

 Since you seem to be triggering multiple builds of the same project, did 
 you enable the project for parallel execution of multiple builds? 

 On 09.03.2014, at 23:21, Daniel Beck m...@beckweb.net javascript: 
 wrote: 

  If you have the executors, the builds should run in parallel 



-- 
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: Schedule a build in parallel from code (Jenkins API)

2014-03-09 Thread dev123
A my bad I of course had to call the correct job, it now works thanks :-)

On Sunday, March 9, 2014 11:47:20 PM UTC+1, dev123 wrote:

 Yes I did a check in allow concurrent execution.

 Now when I run mvn clean hpi:run it starts the jobs in parallel on the 
 available executors, but its spawns jobs infinitely and the text:  Done 
 in:  + object.getTime() is never printed. And I have not even pressed the 
 build button.

 Why do I get something that seems like an infinite loop?

 Here is my code based on your script:

 ListFuture? futures = new ArrayListFuture?();
 for (int i = 0; i  5; i++) {
   System.out.println(Running:  + i +  out off:  + executors);
   try {
 QueueTaskFuture? scheduleBuild2 = 
 build.getProject().scheduleBuild2(0, new Cause.UserCause(), 
 parametersAction);
 futures.add((Future) scheduleBuild2);
   } catch (Exception e) {
 throw new AbortException(e.getMessage());
   }
 }
 for (Future? future : futures) {
   AbstractBuild?, ? object = (AbstractBuild?, ?) future.get();
   System.out.println( Done in:  + object.getTime());
 }




 On Sunday, March 9, 2014 11:23:37 PM UTC+1, Daniel Beck wrote:

 Since you seem to be triggering multiple builds of the same project, did 
 you enable the project for parallel execution of multiple builds? 

 On 09.03.2014, at 23:21, Daniel Beck m...@beckweb.net wrote: 

  If you have the executors, the builds should run in parallel 



-- 
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.


Add executors to a slave from code

2014-03-06 Thread dev123
I am working on a jenkins plugin where I need to simulate that my job can 
run on up to 10 executors. I have a test class that extends the JenkinsRule 
making it possible to create a DumbSlave like this:

DumbSlave slave = jenkins.createSlave(mySlave, myLabel, null);
//slave.getComputer().getNode().
// List is read-only
slave.getComputer().getExecutors()
.add(new Executor(slave.getComputer(), 77));


But I can't find a way to and a new executor to the slave. Does the API
groupIdorg.jenkins-ci.plugins/groupId
artifactIdplugin/artifactId
version1.553/version

not support configuring the number of executors for a slave?

-- 
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.


Update existing job configuration parameter from code

2014-03-06 Thread dev123
In my plugin I need to dynamically update the values of a bunch of String 
parameters that the user specified when building a job

ParametersAction params = project.getAction(ParametersAction.class);
// How do we update existing parameters?
StringParameterValue parameter = (StringParameterValue) params
.getParameter(MyParam);

// Fails since value is final :-(
parameter.value = asd;


how do I update values of existing parameters?

-- 
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.


Cannot write file to disk using the build Flow plugin

2014-03-04 Thread dev123
I have a build flow job where the first step I need to execute is writing a 
file to disk:


Properties props = new Properties();
props.setProperty(Var1, asdasd);
File f = new File(Configs.properties);
OutputStream out = new FileOutputStream( f );
props.store(out,null);

When I run the job I get:

Building in workspace /var/lib/jenkins/workspace/test-flow
ERROR: Failed to run DSL Scriptjava.io.FileNotFoundException 
http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException: 
Configs.properties (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.init(FileOutputStream.java:209)
at java.io.FileOutputStream.init(FileOutputStream.java:160)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at 
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at 
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at Script1.run(Script1.groovy:4)
at Script1$run.call(Unknown Source)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at 
com.cloudbees.plugins.flow.FlowDSL.executeFlowScript(FlowDSL.groovy:82)
at com.cloudbees.plugins.flow.FlowRun$RunnerImpl.doRun(FlowRun.java:154)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566)
at hudson.model.Run.execute(Run.java:1678)
at hudson.model.Run.run(Run.java:1625)
at com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:133)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
FATAL: Configs.properties (Permission denied)java.io.FileNotFoundException 
http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException: 
Configs.properties (Permission denied)


Why does jenkins not have rights to write a file to the workspace where its 
executing the job?

-- 
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.


For loop in the Jenkins build flow

2014-02-22 Thread dev123
Is it possible to create a for loop in the jenkins build flow plugin DSL? 
Currently I have:

parallel (
{ build( a, STEP: 1) },
{ build( a, STEP: 2 ) },
{ build( a, STEP: 3 ) }
)

Which I need to scale to e.g. 100 parallel executions. Therefore I need to 
be able to do something like:

parallel (

 for (int i=1; 1100; i++) {
  { build( a, STEP: i) }
}
)

But that gives an error.

-- 
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: Groovy Plugin VS Build Flow Plugin

2014-01-09 Thread dev123
Yes that make sense but it seems to me that the same functionality can be 
achieved with the Groovy Plugin not as pretty though.

And why is the Build Environment removed from the Build Flow job type (e.g 
Set Build Name is not possible which I need)?



On Thursday, January 9, 2014 9:37:34 AM UTC+1, Nicolas De loof wrote:

 build flow is an orchestration plugin, not a scripting one. The DSL  is 
 actually groovy based, but should be used only to trigger jobs. 


 2014/1/8 dev123 delb...@gmail.com javascript:

 I have installed the Build Flow Plugin:
 https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin

 making the Build Flow Job Type available. But this jobtype does not have 
 the *Build Environment *configuration like the other jobtypes 
 (freestyle, maven, etc.) which I need.

 I have also installed the Groovy plugin:
 https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin

 which I can enable in e.g a freestyle project as a build step. It seems 
 that you can more or less do the same with the Groovy Plugin (in e.g a 
 freestyle project) as with the Build Flow plugin + you have access to the 
 Build Environment configuration.

 Is there anything that the build flow plugin gives besides some wrapped 
 groovy methods like : parallel, ignore etc. that I cannot do with the 
 Groovy Plugin?

 In short what are the most significant differences between the Groovy 
 plugin and the Build Flow plugin when it comes to functionality?
  
 -- 
 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 javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
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.


Groovy Plugin VS Build Flow Plugin

2014-01-08 Thread dev123
I have installed the Build Flow Plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin

making the Build Flow Job Type available. But this jobtype does not have 
the *Build Environment *configuration like the other jobtypes (freestyle, 
maven, etc.) which I need.

I have also installed the Groovy plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin

which I can enable in e.g a freestyle project as a build step. It seems 
that you can more or less do the same with the Groovy Plugin (in e.g a 
freestyle project) as with the Build Flow plugin + you have access to the 
Build Environment configuration.

Is there anything that the build flow plugin gives besides some wrapped 
groovy methods like : parallel, ignore etc. that I cannot do with the 
Groovy Plugin?

In short what are the most significant differences between the Groovy 
plugin and the Build Flow plugin when it comes to functionality?

-- 
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.