Re: Jenkins not able to launch the slave due to unrecognizable JAVA_HOME

2024-04-19 Thread 'Maciej Jaros' via Jenkins Users

Just do this on the agent:

 * Get JDK 17 from Adoptium
   
   (Linux x64 in my case).
 * Unpack to |/var/jenkins|.
 * Rename unpacked “jdk[version]” to “jdk”.
 * Check: |/var/jenkins/jdk/bin/java -version|

Jenkins agent will use |/var/jenkins/jdk/bin/java| over any other version.

Cheers,
Nux

Sai Bhargav Kottisa (2024-04-18 18:40):

Hi,

I have upgraded java on both the controller and agent machines to 
OpenJdk 17 and tried to launch again via ssh but still i am getting 
the same error


*Controller* machine(*/usr/lib/jvm/Openjdk_17.0.6.0/bin/java*
* drwxr-xr-x* 10 *root* *root* 131 Jan 13  2023 *Openjdk_17.0.6.0* )
*
*
*Agent* machine (*/etc/java/Openjdk_17.0.6.0/bin/java*
*drwxr-xr-x* 10 *root    root*      131 Jan 14  2023 *Openjdk_17.0.6.0*)

SSHLauncher{host='md1npdvlnx416.dev.corp.local', port=22, 
credentialsId='taf-jenkins', jvmOptions='', javaPath='', 
prefixStartSlaveCmd='', suffixStartSlaveCmd='', 
launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, 
sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy, 
tcpNoDelay=true, trackCredentials=true} [04/18/24 12:27:46] [SSH] 
Opening SSH connection to md1npdvlnx416.dev.corp.local:22. [04/18/24 
12:27:46] [SSH] WARNING: SSH Host Keys are not being verified. 
Man-in-the-middle attacks may be possible against this connection. 
[04/18/24 12:27:46] [SSH] Authentication successful. [04/18/24 
12:27:46] [SSH] The remote user's environment is: Checking Java 
version in the PATH Java is not in the PATH nor configured with the 
javaPath setting, Jenkins will try to guess where is Java, this guess 
will be removed in the future. :Launch agents via SSH [04/18/24 
12:27:46] [SSH] Checking java version of /var/lib/jenkins/jdk/bin/java 
Couldn't figure out the Java version of /var/lib/jenkins/jdk/bin/java 
[04/18/24 12:27:46] [SSH] Checking java version of java Couldn't 
figure out the Java version of java [04/18/24 12:27:46] [SSH] Checking 
java version of /usr/bin/java Couldn't figure out the Java version of 
/usr/bin/java [04/18/24 12:27:46] [SSH] Checking java version of 
/usr/java/default/bin/java Couldn't figure out the Java version of 
/usr/java/default/bin/java [04/18/24 12:27:46] [SSH] Checking java 
version of /usr/java/latest/bin/java Couldn't figure out the Java 
version of /usr/java/latest/bin/java [04/18/24 12:27:46] [SSH] 
Checking java version of /usr/local/bin/java Couldn't figure out the 
Java version of /usr/local/bin/java [04/18/24 12:27:46] [SSH] Checking 
java version of /usr/local/java/bin/java Couldn't figure out the Java 
version of /usr/local/java/bin/java java.io.IOException: Java not 
found on hudson.slaves.SlaveComputer@3242743c. Install Java 8 or Java 
11 on the Agent. at 
hudson.plugins.sshslaves.JavaVersionChecker.resolveJava(JavaVersionChecker.java:83) 
at 
hudson.plugins.sshslaves.SSHLauncher.lambda$launch$0(SSHLauncher.java:460) 
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
at java.base/java.lang.Thread.run(Thread.java:829) [04/18/24 12:27:46] 
Launch failed - cleaning up connection [04/18/24 12:27:46] [SSH] 
Connection closed.




--
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/7fab73df-4486-1e10-a05a-5c846ac6a89c%40mol.com.pl.


Re: Need IP address of Jenkins

2024-02-23 Thread 'Maciej Jaros' via Jenkins Users

|# You can check like so: dig +short domain.com|

|nslookup domain.com|

Or other tools you have handy.

surabhi vinchurkar (2024-02-23 08:30):

Hello Team,
I need list of common Jenkins IP addresses or please confirm does such 
common IP addresses available or not, or we have to check on our local 
server?

Regards,
Surabhi

On Thursday, February 22, 2024 at 10:53:35 PM UTC+5:30 
alan.l...@gmail.com wrote:


This looks like you're asking for information from us that is
private and specific for your company.  We can't provide
information on your IP addresses or configuration.  You need to
reach out to whomever manages your Jenkins server at your company.

On Thursday, February 22, 2024 at 7:56:40 AM UTC-7
surabhivi...@gmail.com wrote:

Hello team,

Please consider it as *urgent *and guide me to whom I have to
reach out for this.
Surabhi

On Wednesday, February 21, 2024 at 1:03:04 PM UTC+5:30 surabhi
vinchurkar wrote:

Hello Team,

Waiting for your response.

Thank you

On Tuesday, February 20, 2024 at 7:10:21 PM UTC+5:30
surabhi vinchurkar wrote:

Hi Team,

We are trying to migrate the Flosum Pipeline (with
Jenkins WebHook for Selenium scripts) setup from Azure
to AWS machine.

The Setup is working fine in the Azure machine and we
need to do the same setup in AWS machine.But we are
getting the below error in AWS. We recently changed
the Jenkins URL from HTTP to HTTPS.

Error message: System.CalloutException: Read timed out

I have whitelisted Salesforce IP addresses for inbound
rule. But for outbound rule, required Salesforce IP
addresses and Jenkins IP addresses.

*Requesting you to provide me the list of Jenkins IP
addresses and port. *(For setup I have used port 8080
and 8443)

**

Note: The inbound rule specifies from where the server
can be accessed. The outbound configuration determines
where the server can obtain access. In the inbound
rule you should have Salesforce IP addresses, and in
the outbound rule you should have Salesforce IP
addresses and Jenkins IP addresses.

--
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/e02ef0dc-c5e6-4069-a658-2c77b2fbfa75n%40googlegroups.com 
.


--
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/30b059be-7cb0-4849-f5d4-5174c5951851%40mol.com.pl.


Re: id_rsa" is not a valid key file.

2023-10-12 Thread 'Maciej Jaros' via Jenkins Users

praveen@gmail.com (2023-10-11 06:40):
We are setting up gerrit trigger in jenkins & getting id_rsa" is not a 
valid key file error

Verified the file permission
drwx--   2 x xx 4.0K Oct 11 04:39 .ssh
-rw---  1 x xx 2.6K Oct 11 04:23 id_rsa --


That key seems a bit short for RSA, maybe jenkins-gerrit requires longer 
one?


Another option I would see is that the client is old and will not be 
able to use RSA at all. OpenSSH 8.8 disables RSA using SHA-1 and so you 
might need to use ECDSA key. ECDSA might work in clients as far back as 
in OpenSSH 5.x and be able to connect event to OpenSSH 9.x based servers.


So you might want to generate a new key (and configure the key with gerrit):
ssh-keygen -t "ecdsa-sha2-nistp521"

Regards,
Maciej Nux.

--
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/aac8bd13-13da-e90e-fe7a-9bb83c1e19c7%40mol.com.pl.


Re: How does one deploy to webdav server?

2023-08-28 Thread 'Maciej Jaros' via Jenkins Users

'Kari Cowan' via Jenkins Users (2023-08-28 14:11):

I was looking for a plugin to deploy over WebDav - any such thing?

How about example over pipeline?


By WebDav you mean an SVN server? Don't think I've ever used WebDav 
without SVN, but if you have a WebDav then you should be able to setup 
SVN on it.


You can use SVN to publish build artificats to it. SVN is pretty good in 
handling large files (contrary to a basic Git server). So you can build 
stuff and commit files to an SVN repo. And then download the files in 
another jobs. That should be fairly easy as long as you don't need 
authorization.


Cheers,
Nux

--
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/566d1d35-2f6b-a5b5-b450-f5d019a25b28%40mol.com.pl.


Re: Enquiry: Reliability of "Plugin Usage" Tool and Alternatives

2023-08-24 Thread 'Maciej Jaros' via Jenkins Users

The plugin seems like a good starting point...
https://stackoverflow.com/a/36279537/333296

...but if you use pipeline you would have to analyse it yourself probably:
Plugins Usage Plugin isn't very useful IMO because it doesn't detect 
plugin usage from pipeline jobs. I installed this months ago and the 
Plugin only reports that 4/100 of my installed plugins are used and I 
know this to be false. Then I found their own docs admit this as well: 
"Plugins used in pipeline scripts would not be listed normally as used 
by jobs, because they are used dynamically in Jenkinsfiles." 


Also it would be nice if there was some dependency tree for the 
installed plugins. Pipeline has a lot of dependencies and you cannot 
uninstall most of the plugin if you use that (e.g. Folders seem to be 
required).


Cheers,
Maciej Nux

Onkar Kadam (2023-08-22 08:01):


Hi,

Our team is looking to optimize our Jenkins environment by removing 
unused plugins. We came across the "Plugin Usage" tool and wonder 
about its reliability. Any insights? Also, could you help us with any 
alternative suggestions.



Thanks,

Onkar Kadam



--
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/93db96cc-733b-6d5c-939f-6367b62716e8%40mol.com.pl.


Re: Executing external Groovy script in Jenkins 2

2023-08-02 Thread 'Maciej Jaros' via Jenkins Users

'Maciej Jaros' via Jenkins Users (2023-08-02 11:55):


Can I load a groovy class in some other way? Or maybe I can enable 
some standalone/single-user/single-admin mode or something that 
disables all this security checks?


Posted to the community forum/Q&A too
https://community.jenkins.io/t/executing-external-groovy-script-in-jenkins-2/8802?u=nux

--
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/559048a1-9ecd-3917-cd35-1c68b407dbdb%40mol.com.pl.


Executing external Groovy script in Jenkins 2

2023-08-02 Thread 'Maciej Jaros' via Jenkins Users

Hi.

I have some Groovy scripts that worked just fine in Jenkins 1.x but are 
now broken in 2.x. This is actually blocking my update, so I would be 
grateful for any suggestions on how to proceed.


I run the script in a post build step.


I already used Permissive Script Security to try and disable additional 
security added in Jenkins 2.x (which honestly I don't need as I'm the 
only person editing jobs).


It now breaks on this code I think:
```
// load class
def scriptDir = "/var/www/jenkins-groovy-helpers/JenkinsBuildHelper";
def parent = getClass().getClassLoader();
def loader = new GroovyClassLoader(parent);
def buildLogChecker = loader.parseClass(new File(scriptDir, 
"BuildLogChecker.groovy")).newInstance();

```

Jenkins 2.x says:

[PostBuildScript] - [INFO] Executing post build scripts.
ERROR: Build step failed with exception
groovy.lang.MissingMethodException: No signature of method: 
java.lang.Class.newInstance() is applicable for argument types: 
(java.util.LinkedHashMap) values: [[ignoreMode:false, ignoreLevels:[], 
maxLevel:error]]
Possible solutions: newInstance(), newInstance(), 
newInstance([Ljava.lang.Object;), isInstance(java.lang.Object)
    at 
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:159)




Can I load a groovy class in some other way? Or maybe I can enable some 
standalone/single-user/single-admin mode or something that disables all 
this security checks?


As you can imagine `BuildLogChecker` is used to check log, but also 
needs access to job description as it sets descriptions based on errors 
in the job log (`build.setDescription(...)`). It also sets results:

```
if (!buildLogChecker.firstLogLines.error.isEmpty()) {
    build.setResult(Result.FAILURE);
} else if (!buildLogChecker.firstLogLines.warn.isEmpty()) {
    build.setResult(Result.UNSTABLE);
}
```

Regards,
Maciej Nux.

--
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/2a5df42a-b21d-8c9a-987c-602a89b08374%40mol.com.pl.


What happens to tasks on disconnected slaves?

2018-02-02 Thread 'Maciej Jaros' via Jenkins Users

Hi.

I'm wondering if using Jenkins slaves is the right solution for long 
running tasks on remote servers.


I want to run a long running task (like e.g. restoring databases), but 
I'm worried about temporary connection issues. Note that my Jenkins 
server is non-public and it has a one way connection to the deployment 
server. So I'm planning to use SSH to connect from Jenkins to slave 
(using SSH Slaves plugin).


So... What happens if a Jenkins slave is disconnected from master while 
running my restore task?
Will the task keep on running (i.e. run commands that restore databases 
and run other build steps)?
Will I be able to see log of the tasks from master (i.e. will Jenkins 
automatically re-connect to slave and download logs from slave)?
If not will I be able to at least retrieve a log form the slave (e.g. by 
downloading files manually)?


Regards,
Nux.

--
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/24f23029-6c60-b052-af7d-717e987fc08b%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: A job to update other jobs

2017-05-16 Thread 'Maciej Jaros' via Jenkins Users

Morgan Blackthorne (2017-05-12 20:05):
So I'm a little confused as to setting job to a value, but then 
referencing build.setDescription afterwards... or should that be 
job.setDescription?


// loop over jobs (possible also in Script Console)
for (item in hudson.model.Hudson.instance.items) {
  println("Saving " + item);
  item.save();
}

Do I need to save them all, or just the one I modified? Like job.save(); ?


I don't think you need to save jobs after doing something with them. 
That was just an example action in the loop. Just test your commands in 
the script console and see if it works. Make sure you you have backup of 
at least config.xml of your jobs ;-).


Regards,
Nux.

PS: I actually use this loop in our Jenklins installation. I do this to 
re-fresh configs after plugin updates. Doing `save` forces plugins to 
verfiy job config and possibly insert defaults.


--
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/2e786696-48d8-87ca-7d1e-1b2c732bc70b%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: A job to update other jobs

2017-05-10 Thread 'Maciej Jaros' via Jenkins Users

Morgan Blackthorne (2017-05-08 19:56):
We're using Chef automation around configuring our Jenkins jobs. 
Basically chef clones a git repo with the job XML files, and then 
tells Jenkins to use them.


What we want to have is:

 1. One job to edit other jobs description to say "FROZEN by 
at " or to remove the FROZEN line (basically a toggle)
 2. Chef will then be updated to look at the job XML currently on the
Jenkins server
 1. If the description includes FROZEN, skip that job and leave it
alone
 2. If the description does not include FROZEN, update the job
from the XML file

I'm not really up to speed on Groovy, so what's the simplest way to 
approach this? (I already know how to do the XML check for step 2, we 
can just look at the XML over HTTP.)


This should get you started...

Install Groovy plugin 
. Use Groovy 
system step -- allows running scripts in Jenkins context (with 
Jenkins.instance available).


Java/Groovy API reference:
http://javadoc.jenkins.io/

// getting any job:
def job = Jenkins.instance.getItem("some-job-name");
// BUT`job` here is not just a Job 
, it is an 
AbstractProject 
.


// set desc. for current build
build.setDescription(someDescriptionString);

// loop over jobs (possible also in Script Console)
for (item in hudson.model.Hudson.instance.items) {
  println("Saving " + item);
  item.save();
}

--
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/08353e5a-6d3e-f01a-1b44-99dd15a3ae4c%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: svn error 'ISVNAuthentication provider did not provide credentials'

2017-05-02 Thread 'Maciej Jaros' via Jenkins Users
There is bug in Subversion Plugin. It seem that new versions of this 
plugin cannot handle svn:externals well.


See:
https://issues.jenkins-ci.org/browse/JENKINS-32167

David Aldrich (2017-04-11 14:52):


Hi

Since upgrading:

SCM API plugin from 1.3 to 2.1.1

Subversion Plugin 2.7.1 to 2.7.1

we are seeing the following exception occurring occasionally:

svn: E200015: ISVNAuthentication provider did not provide credentials; 
HTTP authorization cancelled.
at 
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:66)
at 
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
at 
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798)
at 
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391)
at 
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379)
at 
org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862)
at 
org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698)
at 
org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118)
at 
org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049)
at 
org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189)
at 
org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)
at 
org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195)
at 
org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46)
at 
org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)
at 
org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
at 
org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at 
org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
at 
org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at 
org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:968)
at 
org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)
at 
hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194)
Caused: hudson.util.IOException2: revision check failed on 
/GlobalRegs.tcl 

at 
hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)
at 
hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)

at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860)
at hudson.scm.SCM.checkout(SCM.java:496)
at 
hudson.model.AbstractProject.checkout(AbstractProject.java:1280)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at 
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)

at hudson.model.Run.execute(Run.java:1733)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at 
hudson.model.ResourceController.execute(ResourceController.java:97)

at hudson.model.Executor.run(Executor.java:405)

The credentials for the job are correct – they worked fine before the 
upgrade.


The exception occurs following a svn commit.  If I then run the job 
manually it succeeds.


Any advice please?

Best regards

David

--
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/9838a10cbeff41b982300a1aac1daf90%40EUX13SRV1.EU.NEC.COM 
.

For more options, visit https://groups.google.com/d/optout.





--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/dffbc5dd-b58c-db9b-c8eb-1ca7a16bef7d%40mol.com.pl.
For more options, visit https://group

Re: Add the version after the app name (Deploy to Container Plugin)

2017-04-07 Thread 'Maciej Jaros' via Jenkins Users

Elcio Junior (2017-04-06 16:00):

Hi,
I use Jenkins with the Deploy to Container Plugin and I can deploy to 
my server (glassfish).

The app looks like this:

Test.war

But I want to add the version after the app name.
Example:

Test-1.0.war

Could someone tell me what configuration is needed so that when 
accessing the glassfish control panel (4848) the app name is with the 
version?


Not sure about Glasfish, but Tomcat supports war versions with `##`.

E.g. revision 1 app would be:
ROOT##1.war

E.g. revision 123 app would be:
ROOT##123.war

Not sure what if you can only use numbers after `##` or any alpha-numerics.

Regards,
Nux.

--
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/1b9d88a6-a887-c4d2-c8a6-d6885874b569%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Disable new jobs if a build fails

2017-04-04 Thread 'Maciej Jaros' via Jenkins Users

Idan Adar (2017-04-03 15:11):

Hello,

I received a request, which sounds kinda far-fetched to me, but maybe 
I wrong.


Lets assume there is a job that is scheduled to run 3 times ago. End 
to end sort of tests. And at some point one of the job runs fails.
The request here is to block all future PRs for any repository in 
GitHub from triggering their respective jobs (each repo has a 
Jenkinsfile, a PR triggers it).


Is this at all possible? Blocking all jobs until an error is fixed?


I think you would have to manually enable builds after the error is 
fixed, but you can disable builds with Groovy:

def job = Jenkins.instance.getItem("your-job-name");
job.disable()
//job.enable()

Regards,
Nux.

--
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/f5fecaad-dbc3-d665-c35f-15e97345d2fa%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: scp files located outside of workspace

2017-04-03 Thread 'Maciej Jaros' via Jenkins Users

t3knoid (2017-03-31 19:50):
Is it possible to scp files located outside of a workspace simply 
using existing Jenkins plugins? I am currently using a Python script 
to this currently by calling the scp command-line. The SCP plugin nor 
Publish over SSH does not appear to support this. Maybe in conjunction 
with another plug-in it is possible.


You can simply run `scp` command from shell execute step. Why would you 
need Python for that? You just need to configure ssh connection to 
whatever server you need to connect with. So basicaly you simply need to 
run `ssh-keygen` on your Jenkins to generate keys and `ssh-copy-id 
your-server` to copy key to your-server. And then...


Copy file to remote:
scp /some/local/file.sh root@your-server:/some/remote/file.sh

Copy dir from remote:
scp -r root@your-server:/some/remote/dir /some/local/dir/

--
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/91f0a3d7-613c-7876-3f5f-c8d701412973%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Dynamically Change Job Name

2017-03-10 Thread 'Maciej Jaros' via Jenkins Users



JJ (2017-03-10 15:55):

Does anyone know how to do this:


Use Case

Job Name: ABC-JOB 

ABC-JOB can be used by dozens of teams, at any time. If submissions of 
ABC-JOB are made while one is running, they will queue up until the 
one executing finishes because multiple jobs with the same name cannot 
run simultaneously.


I want to create a job that calls ABC-JOB but dynamically changes the 
name of the job so they don't queue up. For example, three people 
submit the job that triggers ABC_JOB. Instead of 3 instances of 
ABC_JOB submitting, with two of them in a queue status, the trigger 
job would name them:
ABC_JOB_appl1, ABC_JOB_appl2, and ABC_JOB_appl3 so they can run 
concurrently.


Thanks in advance for your help.



You might also want to set build description as a first build step. That 
way you will see which parameters where used when building.



Here's what I do (you might do it in one step with Groovy):

--
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/70594adf-f02e-e3dc-0089-9f9801bcc7d8%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Run Shell Scripts Added to/Changed in a Project?

2017-03-10 Thread 'Maciej Jaros' via Jenkins Users

Christopher O'Grady (2017-02-28 22:12):
I'm currently working on automating deployments of our mongodb shell 
scripts when we have database updates in a release. I am fairly new to 
Jenkins. I was wondering if anybody has experience getting Jenkins to 
run only new or updated scripts in a folder? My current idea is that 
Jenkins would (as part of a build) only run those scripts which have 
been added or changed since the last build.


If there are other better ways to achieve this kind of automated 
deployment of mongo updates in a release, I would be happy to hear them.


That would be possible by comparing changes but a bit risky. You should 
keep a record of updates (like e.g. a database version) in the database 
and run updates when required. You should create an update script (in 
whatever language you like) and run that script from Jenkins.


Regards,
Nux.

--
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/3a4b03fc-02ed-1431-d9a7-c8031ace6803%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins plugin for merge.

2017-02-24 Thread 'Maciej Jaros' via Jenkins Users

RRoy (2017-02-22 11:15):

Hi All,

Currently we are using parallel development approach for development 
process in our organization.Please considered the below scenario of 
our build process.


Build Tool -- ant
CI Tool --  Jenkins.
Repository Tool - SVN

We want multiple SVN branches to checkout and code merging between 
this branches should be happen before performing the whole build.


Please suggest us, is there any plugin available in jenkins for 
fulfilled above scenario and implementation for the same.


You can't merge automatically (not just with Jenkins, in general). In 
many cases you have to resolve conflicts before you merge and that 
cannot be done automatically.


Regards,
Nux.

--
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/643f478c-d79d-b9fb-2c1a-718ad783aec0%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: multi text parameter

2017-02-20 Thread 'Maciej Jaros' via Jenkins Users
You might want to use Groovy System Script to process those parameters 
(note that /System/ script is not an OS script, it's Jenkins script). It 
will be much easier to process strings in it.


Here is something to get you started. This is a script that schedules 
"Some-job-name" to be run with some parameters. If you use string 
parameters you might want to trim and validate values passed by users to 
avoid some security/consistency problems.


// start
//--
import hudson.model.*

//
// run
//
def appServersString = 
build.buildVariableResolver.resolve("parameterOfCurrentJob")
def appServersList = appServersString.split(',')
for (appServer in appServersList) {
  scheduleAppRollout(appServer)
}

/**
Schedule rollout helper
*/
def scheduleAppRollout(dstServer) {
  def job = Hudson.instance.getJob("Some-job-name")

  // prepare parameters
  def params = []
  params += new StringParameterValue('dstServer', dstServer)
  params += new BooleanParameterValue('somBooleanParamOfTheJobToBeStarted', 
true)
  params += new BooleanParameterValue('imABot', true)
  def paramsAction = new ParametersAction(params)

  //preapre cause
  def cause = new Cause.UpstreamCause(build)
  def causeAction = new CauseAction(cause)

  // run
  println("[INFO] Scheduling rollout to `" + dstServer + "`");
  Hudson.instance.queue.schedule(job, 0, causeAction, paramsAction)
}
//--
// EOF

--
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/22393ccf-5398-d10f-80c8-9f49e42b6a33%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Conditional build parameter

2017-02-14 Thread 'Maciej Jaros' via Jenkins Users

Danny Wong (2017-02-14 07:33):


*Hi All,*

*Is there a way in Jenkins where if I have 2 radio buttons 
(yes/no) as a build parameter. if the user selects “yes”, then a 
dropdown will display and gets populated with data. If no, the 
dropdown disappears from the UI? Is there a way to implement this? 
Thanks!*




There is no built-in way to do that. But you can vote fore a feature 
request here:

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

There is also a bit hacky script that allows to do what you are asking for:
https://github.com/Eccenux/jenkins-scripts/blob/master/theme/nux-js/parameter-grouping.js

Regards,
Nux.

--
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/97dd6589-995c-ff4c-f91b-157e368b5287%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Build and jump to console in one click?

2017-02-09 Thread 'Maciej Jaros' via Jenkins Users

Hi.

Is it possible to build and jump to console in one click?Most of the 
time when I build jobs I want to see what is going on (observe log).


So is there some plugin that provides "Build and View Log" action. That 
would be very handy. Or maybe something similar is available on Jenkins 2.x?


Regards,
Nux.

--
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/d15f935e-35b7-033f-6b46-c80af7a75895%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Force result change in Groovy

2017-02-09 Thread 'Maciej Jaros' via Jenkins Users

Daniel Beck (2017-02-08 16:01):

On 08.02.2017, at 15:48, 'Maciej Jaros' via Jenkins Users 
 wrote:

But that throws `cannot change build result while in COMPLETED`. So can I 
somehow force the result?

While there's probably a way to accomplish that, it's likely other things will 
break as a result of this as (obviously) Jenkins components don't expect build 
results to change after a build is finished.

This looks a lot like an X/Y problem kind of situation. What are you actually 
trying to accomplish?


The problem is the build in question should have failed as it is not 
functional (some artifacts don't work). Other jobs take artifacts from a 
last stable build from this job and deploy this to test (staging) 
server. So this works like so:

build job --stable artifacts--> deploy job --> test server

I ended up doing manual change which seems to work (at least in Jenkins 
1.x):


1. Go to `[jenkins-data]/jobs/[YOUR-job]/builds/[number]/`.
2. Open `build.xml`.
3. Find `` tag.
4. Change resolution to `UNSTABLE`.
5. Reload Jenkins configuration from disk.
6. Make sure `Last stable build (#[number])...` is correct (not the 
one you just changed).


And it seems to work (at least it works if artifacts wasn't removed for 
the older build).


Regards,
Nux.

--
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/b1fdbaed-5911-a3e9-5303-6580b8430c4c%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Force result change in Groovy

2017-02-08 Thread 'Maciej Jaros' via Jenkins Users

Hi.

I wanted to manully change last build from stable to unstable. Is it 
possible? I tried using Groovy


def job = Jenkins.instance.getItem("GOPAC-build-alfa");
def build = job.getLastStableBuild();
build.setResult(Result.UNSTABLE);

But that throws `cannot change build result while in COMPLETED`. So can 
I somehow force the result?


Regards,
Nux.

--
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/c8c7921f-5f72-8931-a91f-ff3184c4cc12%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: how to pull latest source code when build module only

2016-08-30 Thread Maciej Jaros

严细浪 (2016-08-23 08:16):

I am using Jenkins to build a multi module maven project, in Jenkins i can 
trigger to build a maven module, however when build module, Jenkins will not 
pull latest source code, source code only pulled when whole project is built. 
how to make Jenkins pull source code when build module?


You could just run `svn update ./svn-checkut-path/my/module/path`. Don't 
think it's possible with git though. With git you would probably need 
separate repos.


Regards,
Nux.

--
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/a8a46f42-22c7-0d87-33ce-f6830673bf3e%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Powershell calls to SQL - thread safe?

2016-06-29 Thread Maciej Jaros
It's not a Jenkins problem. if you would run this from two PS terminals 
then you would probably run into the same issues.


I would guess that PS is sharing SQL connection or something like that. 
Maybe you should use `osql` or `sqlcmd` to run commands you need to run...


In any case not a Jenkins issue really so you are asking in a wrong place.

Regards,
Nux.

--
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/81ddc60f-fc35-e69c-c56b-e8f9a711a15c%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Need help on usage of Jenkins console data

2016-06-14 Thread Maciej Jaros
Another method (without using Groovy) is to simply get path and do 
whatever you need with it.


buildLogPath="../builds/$BUILD_NUMBER/log"


Might be a good idea to copy the file if you are going to change it or 
you need to make sure it's not change during other operations.


buildLogPath="../builds/$BUILD_NUMBER/log"
cat $buildLogPath > ./build.log.copy

# run reports asynchronously
doreportrs ./build.log.copy &


Regards,
Nux.

--
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/65d33303-0651-4fa6-1cc1-94dc48442aec%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: [Blue Ocean] A new user experience project for Jenkins

2016-05-27 Thread Maciej Jaros

Stephen Connolly (2016-05-27 12:12):



On 27 May 2016 at 07:59, Craig Rodrigues > wrote:


Hi,

The new Jenkins UI looks nice, and will be a big improvement over
the existing UI.

The original selling point of Jenkins was that even with the
simplistic forms-based UI,
someone could fill out a relatively simple form, and have a
continuous integration pipeline.
I have met people who were general devops and scripting people,
and could use Jenkins quite nicely.

While I understand the motivation for Pipeline (previously known
as Workflow), I can't say I'm very happy with the results.

Here are some of the pain points I've encountered with Pipeline
scripts:

  * Other than the most trivial of scripts, you need to be a
knowledgable Groovy programmer.  For example, to make a global
variable, you need to use a @Field. (What?!)  Most scripting
and devops people that I know don't really know Groovy.

So in my personal opinion, this is a sign of People Doing Things Wrong™

By this I mean that your Jenkinsfile should *not* be doing complex 
things. You should have shell scripts or equivalent to do the complex 
functionality. That lets you test each individual step in the phase on 
local developer machines. Then your pipeline should end up mostly being


But you cannot test everything locally, because you e.g. don't have 
build parameters, you might not have certain SSH credentials defined... 
That said I do tend to move everything to scripts, but this really 
defeats the purpose of almost all Jenkins plugins... And plugins gives 
you some integrations (especially with credentials) you don't have in 
scripts. And it's much easier to add build step for triggering e.g. call 
of another project and passing all parameters to it from current build 
(which BTW is overly hard with Groovy).


Regards,
Nux.

--
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/fac125e7-9e6c-46f1-bbe7-42067660d98c%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: [Blue Ocean] A new user experience project for Jenkins

2016-05-27 Thread Maciej Jaros

Craig Rodrigues (2016-05-27 08:59):

Hi,

The new Jenkins UI looks nice, and will be a big improvement over the 
existing UI.


The original selling point of Jenkins was that even with the 
simplistic forms-based UI,
someone could fill out a relatively simple form, and have a continuous 
integration pipeline.
I have met people who were general devops and scripting people, and 
could use Jenkins quite nicely.


While I understand the motivation for Pipeline (previously known as 
Workflow), I can't say I'm very happy with the results.


Here are some of the pain points I've encountered with Pipeline scripts:

  * Other than the most trivial of scripts, you need to be a
knowledgable Groovy programmer.  For example, to make a global
variable, you need to use a @Field.  (What?!)  Most scripting and
devops people that I know don't really know Groovy.

[...]



Groovy is not my thing either. The syntax is not very hard, but using it 
with Jenkins is just trail and error. There are some changes from 
version to version and no central place to learn from.


I think this would be solved by providing recepies that would be updated 
for each Jenkins version. Some recepies ideas:


1. How to read a build parameter and conditionally run some shell script.
2. How to trigger build of another project.
3. How to trigger build of another project with some static parameters
   of various types.
4. How to trigger build of another project passing all parameters from
   current job/build.
5. How to copy artifacts from another project.
6. How to send files over SSH.
7. How to execute scripts over SSH.

Regards,
Nux.

--
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/2c5be2a6-607a-7cae-e935-e285a7c70266%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Create a temporay file via groovy

2016-05-26 Thread Maciej Jaros

'Niksan' via Jenkins Users (2016-05-23 14:15):
I'm wanting to create a temporary batchfile on a Jenkins slave via 
groovy similar to the way Jenkins itself does when invoking a Windows 
batch file.


cmd /c call C:\Windows\TEMP\hudson6180922768700485046.bat

How do I go about doing that via groovy in Jenkins?


You can use build variables (e.g. BUILD_TAG or even just BUILD_NUMBER) 
to create a unique file name for a build. Depends on your use case.


See this for a list of all variables.
https://[your.jenkins.domain]/env-vars.html/

Regards,
Nux.

--
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/48bd5ff8-c759-a639-07f8-eacfbc1480ab%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: I want to run jobs in between build events

2016-05-02 Thread Maciej Jaros

myke (2016-04-13 10:20):

Looking for ideas...

I have build events which do not have a fixed time between events
I have downstream jobs running tests after each build.
Thereafter my environment is doing nothing until the next build event 
(could be multiple days)

I want my test environment to make use of the quiet periods

Following the downstream test job I would like to run another job.
It would be great if this new job could be terminated in some way so 
as not to interfere with the next build job when it happens


I have looked at plugin's but cant find a good fit.
I would appreciate any ideas out there please
Myke


You can schedule your build with `H` for minute and hour. This will run 
a job in a quiet period. Some examples are in contextual help in job 
configuration.


Not sure how would you automatically kill a job though... But I wouldn't 
do that automatically. It's easy to do it manually from build queue and 
I wouldn't kill a long running job when it's nearing the end of execution.


Regards,
Nux.

--
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/425de5da-dc09-b04f-110e-2bec0f91b701%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Preventing jobs from executing

2016-05-02 Thread Maciej Jaros

Depending on your need you might also want to try:
https://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin

This allows you to configure a category for each project and prevent 
executing jobs in that category to run in paralel (either globaly or on 
a single node).



Victor Martinez (2016-04-12 21:02):
https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin might 
help you


On Tuesday, 12 April 2016 19:51:34 UTC+1, Hector Magnanao wrote:

Is there a way in Jenkins to prevent jobs from executing if a
another job that it is not dependent on is already running ?  I
didn't see any options like that in the build section. in
other words,  I want to hold a job from running while another job
that it is not dependent on is already running.
I'm running Jenkins 1.625.2 on Windows Server 2008.



--
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/8ef02c44-4fa2-6619-fb5d-8978fc9d3255%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0 alpha release available

2016-03-01 Thread Maciej Jaros

Dirk Heinrichs (2016-03-01 08:31):

Am 01.03.2016 um 00:39 schrieb R. Tyler Croy:


You can read more
about it on the 2.0 landing page (https://jenkins-ci.org/2.0/)


The link to "the 2.0 plan" on this page is dead.


The link:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+2.0

Fix:
https://github.com/jenkins-infra/jenkins.io/pull/97

Regards,
Nux

--
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/56D590CD.2080501%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Save all configurations after Jenkins update

2016-02-17 Thread Maciej Jaros

jieryn (2016-02-17 17:01):

for (item in hudson.model.Hudson.instance.items) {
   println("Saving " + item);
   item.save();
}


Thanks, works great :-). I've just run it through Script Console.

Regards,
Nux.

--
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/56C4B401.5070706%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Save all configurations after Jenkins update

2016-02-17 Thread Maciej Jaros

Hi.

When you save configuration of a Job after Jenkins update there are some 
changes made in the config.xml (e.g. plugin version change). Since I 
keep a history of all config.xml files in a repository that mess up 
history of changes...


So. Is there some script or plugin that can re-save configuration of all 
Jobs in a batch?


Maybe something like (?):
for job in jobs
  job.save()

Regards,
Nux.

--
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/56C492E6.9040009%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: How do I get a Jenkins server to push bash code to a different server?

2016-02-04 Thread Maciej Jaros

Kiran (2016-02-02 03:43):
If the job just deploys a file to different servers (and uses no 
slaves) is a Freestyle project?




You can use a freestyle project to either and Publish Over SSH plugin to 
simply push files to other computers.


If you have many deploy servers you can configure a password-less SSH 
connection (certificate without password) and then in a Execute shell 
step do something like:

serverList=(app001 app002 app003 app004 app005 app006 app007 app008)
for appServer in ${serverList[@]}
do
connectionString="root@$appServer"
scp ./some-folder-in-jenkins-job-workspace/* 
$connectionString:/destination/folder/

done


Some more information on how to setup SSH connection:
https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys

Basicly there are 3 steps:

1. Generate password-less certificate (on Jenkins machine):
ssh-keygen -b 4096

2. Copy client cert to remote machine (login is required 1st time):
ssh-copy-id root@app001

3. Check connection:
ssh root@app001


Regards,
Nux.

--
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/56B3327C.6070104%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Performing tasks in remote servers as slave or SSH?

2016-01-28 Thread Maciej Jaros

hezjing (2016-01-28 02:03):

Hi

I want to create a job that will login to multiple remote servers (and 
with multiple user accounts) and install some products. How should I 
create this job?


One way is to create a slave node for every user in each of the remote 
servers, then trigger the job on that specific slave node.


Another way is use SSH plugin that login to the remote hosts and 
execute the commands.


What are the differences between these two ways? Any better idea?


One blocker would be if you have a Windows machine to test. SSH on 
Windows is very unstable (or at least I haven't found any that would 
work fine with Jenkins).


For Linux machines I find it easier to setup SSH connection and it's 
handy anyway. Just remember to generate password-less key. Then for each 
machine just use `ssh-copy-id` to set it up.


Sometimes I even find it more convinet to use `scp` and `ssh` commands 
in jenskins as you can easily do loops like:

serverList=(app1 app2 app5 app7)
for appServer in ${serverList[@]}
do
  connectionString="root@$appServer"
  scp commands.sh $connectionString:/remote/path/commands.sh
  ssh $connectionString "cd /remote/path/; commands.sh"
done

I don't think you can easily do something like that with slaves. But 
maybe you can with Groovy scripts? Haven't tried.


Regards,
Nux.

--
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/56A9F7A8.40709%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way to fail the build after it's finished?

2016-01-15 Thread Maciej Jaros
That doesn't work. There doesn't seem to be a simple way to promote all 
sucessfull build automatically (i.e. make them OK by default) and then 
revoke promotion status (effectively marking it is failed).


So still looking for a way to fail the build on demand (manually).

Eric Pyle (2016-01-13 15:16):

Seems like this could be handled by build promotion?

On 1/13/2016 8:50 AM, Maciej Jaros wrote:

Hi.

I want to fail one of the builds to be able to mark it as something 
that should not be deployed.


My setup is that I have two task:

 1. One just builds project and saves artifacts (war files).
 2. Second copies artifacts of last successful build and deploys them.

Occasionally some build passes automatic tests, but then fails after 
deployment. If I can mark the build as failed, then re-deployment 
would use older, but working version.


Regards,
Nux.
--
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 
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/56965633.6030301%40mol.com.pl.

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/5698EBDC.5030305%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Is there a way to fail the build after it's finished?

2016-01-13 Thread Maciej Jaros

Hi.

I want to fail one of the builds to be able to mark it as something that 
should not be deployed.


My setup is that I have two task:

1. One just builds project and saves artifacts (war files).
2. Second copies artifacts of last successful build and deploys them.

Occasionally some build passes automatic tests, but then fails after 
deployment. If I can mark the build as failed, then re-deployment would 
use older, but working version.


Regards,
Nux.

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


Re: Is it possibel to pass the file from loacl machine to Jenkins server thru File Parameter

2015-11-13 Thread Maciej Jaros

Narmadha Vigneshwaran (2015-11-04 10:35):

hi
I am new to JENKINS.I have a requirement . I would like to pass an 
excel file as a parametere from my local machine.I hav eused FIle 
Parameter for this requirment. But it does not work as expected.Is it 
possible to pass the excel or text file from local machine to Jenkins 
server?.


Iti is possible. Maybe this will help you:
http://stackoverflow.com/questions/13951833/jenkins-parameterized-build-upload-file-and-save-original-file-name

--
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/5645FAD1.4010701%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 2.0 Proposal: Pipeline as code front and center

2015-11-10 Thread Maciej Jaros
I think there are two problems with workflow and other script related 
plugins:


1. There is slim-to-none documentation on Jenkins APIs. There is no
   single authoritative place to learn about available interfaces with
   basic to advanced examples of their usage. Frankly, I haven't found
   a good book about it either.
2. A killer feature would be to be able to convert build steps (at
   least some basic ones) to e.g. Groovy. This would greatly lower the
   barrier of converting from GUI based configuration to code driven
   job dentitions.

Regards,
Nux.

--
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/5641EA0F.1020507%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: is 51,000 tests too much in a job?

2015-10-14 Thread Maciej Jaros

Kevin Goess (2015-10-09 17:32):

> Check how much heap you have allowed jenkins to use.

We're currently running with

 -XX:PermSize=128M -XX:MaxPermSize=512M -Xmx16384M

and the jenkins memory graph under /monitoring shows us maxing out 
under 12GB, and that seems excessive to me, since we only have about a 
dozen builds going on. Is 12-16GB there excessive and maybe indicative 
of a problem, or is that all standard?


That might depend on what/how you're testing. I've noticed that Maven 
actually uses a separate JVM. So Jenkins instance heap is one thing but 
you need to leave room for other processes. As seems if you have many 
Maven builds then all of them will allocate at least `Xms` memory. So 
you might want to keep `CATALINA_OPTS` low and `MAVEN_OPTS` as high as 
you can.


Regards,
Nux.

--
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/561E1D1C.907%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: LDAP in Jenkins Fails, but ldapsearch works

2015-10-09 Thread Maciej Jaros

Sverre Moe (2015-10-09 09:22):

|Usersearch base:ou=users
|


I think it should be "CN=Users".

|
Usersearch filter:samaccountname={0}
|

Not sure if case matters, but we use "sAMAccountName={0}"


|ManagerDN:ldapu...@arctic.company.com
|


This is Windows AD? If so then I think you should use "domain\user" 
format. At least it works for me.


Regards,
Nux.


--
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/5617A515.6090806%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: How to Deploy the jar file through jenkins after build process

2015-10-08 Thread Maciej Jaros

sumanth veera (2015-10-04 16:35):

Hi All,

 i am trying to Deploy the jar files to remote server from the 
artifacts created.after the build process can any one tell me how to 
do this .


Basically i need to deploy the jar to remote server.


If you have many servers (or plan to grow) it might be easier to setup 
certificate authentication through SSH. This allows easier 
parametrization and making easier to read scripts.


Basic steps are (assuming your Jenkins and remote server is Linux based):

1. Generate your local key (use a default options to generate
   password-less authentication):
   ssh-keygen -b 4096
2. Copy your key to remote server:
   ssh-copy-id username@remote_host
3. Test login:
   ssh username@remote_host

Note that from now on anyone having the certificate will be able to 
connect to your remote host. So some extra security measures might be 
required (e.g. enabling drive encryption).


So to copy a file you just execute shell script:
connectionString=username@remote_host
scp /some/local/file.jar $connectionString:/some/remote/file.jar

You can also run scripts:
scp /some/local/file.sh $connectionString:/some/remote/file.sh
ssh $connectionString /some/remote/file.sh

Or copy whole folder to remote:
scp -r /some/local/dir/ $connectionString:/some/remote/dir

Or you can copy remote folder to your jenkins:
scp -r $connectionString:/some/remote/dir /some/local/dir/

Regards,
Nux.

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


Re: New stuff for Jenkins GUI

2015-10-07 Thread Maciej Jaros

Gus Reiber (2015-09-23 20:26):

Hey all,
   This likely isn't a news flash for most of you, but the Jenkins GUI 
isn't great, but what might be news is that there is an active effort 
to make it a lot better. As part of that effort, I will be pushing out 
content, showing prototypes, concepts, and the occasional critique of 
the current GUI. The goal of this media push by me is to get you to 
holler back and help steer the effort towards actual improvements that 
matter to real users.


Last JUC: https://www.youtube.com/watch?v=wIOD622KqlE


I like the direction set in the presentation, but it would great if you 
could work more on the configuration page of jobs. You can see how 
important it is just browsing through all the plugins that attempt to 
fix problem of changing job configurations (e.g. Job DSL plugin).


For me it would help a lot if I would be able to collapse build steps. 
The more complicated the job is the more steps there are and it becomes 
harder and harder to change its flow. Smart collapsing would allow to 
easily glance through the configuration and add new step in the middle 
of the process. I've made a proof-of-concept of this smart collapsing 
and attached it to this issue:

https://issues.jenkins-ci.org/browse/JENKINS-27484?filter=-2

Please have look and good luck :-). I know changing GUI of old software 
is always hard on many levels ;-).


Regards,
Nux.

--
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/5614E984.7070908%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Script executed. The exit code is 255.

2015-10-01 Thread Maciej Jaros

Nayan Jyoti Gogoi (2015-09-30 14:44):

Hi All,

I am executing a shell script using jenkins on a hpux machine.
It goes like this.
--
set +e
set +x
#!/bin/sh
cd /tmp/
rm -rf bc_env.txt
echo "SANDBOX:${sandbox}" >> /tmp/bc_env.txt
echo "SERVER:${aquarius}" >> /tmp/bc_env.txt

echo ""
cat  /tmp/bc_env.txt
---


Run that script in console and check which part is failing. Using 
`#!/bin/sh` is kind of weird there. That might be a problem.


Regards,
Nux.

--
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/560CDBF1.4030204%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: When editing a script in a Jenkins text area -- has anyone looked into having language aware editors be enabled

2015-09-30 Thread Maciej Jaros

Rinaldo DiGiorgio (2015-09-21 22:37):
Has anyone tried to enable javascript based language editors for all 
the times one can enter code in a Jenkins text area. I prefer to use 
SCM systems but the turn around time for that is too slow when doing 
development. It would be a big productivity boost to have a language 
editor be available. It might be possible to add support for pushing 
the code from the editor box to a repo to make data entry in the 
script area window part of the development process. I am looking for 
any past work or thought in this area.


I've used EditArea  for editing shell 
scripts. You could integrate it (or some other syntax-highlighter) using 
Simple Theme Plugin 
. You 
can see my implementation on Github 
. It has a flaw in that it 
only works for existing fields (I would have to hook some create-step 
event to prepare new fields), but in your case this shouldn't be a 
problem. You can just check on load if there is some specific parameter 
(e.g. with specific name-prefix) available in HTML and enhance it.


Regards,
Nux.

--
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/560BAF3D.3080303%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Understanding Jenkins builds and processes when running in parallel

2015-09-28 Thread Maciej Jaros

John Wadleigh (2015-09-28 09:58):

Hello all,

I am trying to find some documentation on how Jenkins handles multiple 
builds on a specific node. Does it spawn separate processes? threads? 
How does it manage parallel builds?  And can I see these running on 
the OS? I have checked on our Linux OS but cannot find specific 
processes that seem to match the build.   We have a Linux machine with 
16 CPUs, and I would like to make sure that Jenkins is using these 
CPUs when running 10 build jobs at the same time.  How can I monitor 
this better and understand it better?


AFAIK build operations are handled by JVM so you would see threads for 
builds there. Not sure if every build is a single thread and if they are 
reused in any way.


Of course build might run another operation (especially if running shell 
commands), which might be visible in the OS itself.


Regards,
Nux.

--
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/56092DC7.3000403%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: How Can I copy log (from System Log) from my GUI to my linux machine through plugin/script?

2015-09-17 Thread Maciej Jaros

Shubham Sharma (2015-09-14 13:34):

Hi All,

I want to copy Log under Manage Jenkins-->>system Log through some 
script or plugin to my host machine .

Please Help how Can I do this.


Some logs (like Audit Trail) are in:
.../jenkins-data/log

Path of the "all" log depends on which server you use for Jenkins. For 
Tomcat sever this is in:

.../apache-tomcat/logs/catalina.out

Regards,
Nux.

--
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/55FA96C9.9050200%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Use Repository Sharing - advice please

2015-07-28 Thread Maciej Jaros

David Brown (2015-07-28 22:51):


Here is my scenario. I have a number of Jenkins projects which build 
from the same set of Mercurial repositories, compile source code and 
generate executable files, etc.  I’m used to being able to run any 
combination of these jobs in parallel. Each build runs for at least 3+ 
hours, but the first third of the build time is spent cloning the 
repositories and preparing an individual workspace. I have restricted 
disc space so the jobs are setup to delete their workspace at completion.


I am looking to reduce my build times.

When I discovered the “Use Repository Sharing” option I was hoping it 
would enable me to shave the repository cloning time off the start of 
each build. However I have not been able to find much in the way of 
documentation or advice on the use of this feature, perhaps I’ve not 
been looking in the right places or else I’ve not looked hard enough.


Here’s what I’ve discovered so far, partly through trial and error:

  * Need to also assign a specific Directory in the “Use custom
workspace” option within Advanced Project Options (a per Project
setting)
  * I set the same shared workspace folder against two jobs
  * When I attempted to run both jobs in parallel one job failed with
message “The process cannot access the file because it is being
used by another process.”, suggesting that I have to wait for the
build of Project A to finish before I can start a build of Project B

Am I naive in expecting this feature to allow jobs to be run in 
parallel? If I can’t do this then I don’t think this feature will be 
of any benefit to me.


Any tips, guidance or advice would be gratefully received.



I think you can approach this problem differently.

1. Create a separate job (e.g. `load-repo`) which will only load
   current repository to some folder (this can be just workspace).
2. In the build/test jobs simply use the folder (you can use it
   directly or add symbolic link to it or copy if you must - depending
   on your build process).
3. Create a separate job that just runs above jobs. In this job you run
   `load-repo` as a blocking job and then run other jobs in parallel.

I don't think you can do it with just repository sharing as you would 
always have a problem when one job is already running (using repository) 
and other job wants to update repository.


Regards,
Nux.

--
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/55B87867.6050008%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Argument for removing old jobs

2015-07-24 Thread Maciej Jaros

VFloyd (2015-07-16 16:21):

Morning,
Jumping straight to the point - we have jobs in our Jenkins instance 
that have not run in two years (successfully or unsuccessfully).  We 
have jobs that people set up months ago and have never run.  I have 
sent e-mails, made visits to peoples desks, made calls all trying to 
get people to take care of their jobs and I still have them out there.


I started disabling anything that hadn't run successfully in 12 
months.  My boss says I am wrong for doing this.  I am also wrong for 
wanting to shelve or just put these job in a zip file.


I have better things to do.  Can anyone give me a for or against 
leaving abandoned jobs in Jenkins?


If you remove the job it is lost. That's obviously the main problem of 
just deleting jobs. The problem is that not only it's configuration is 
lost, but also it's test history and release history (unless you have a 
copy of it elsewhere)...


I usually follow this schema:

1. Disable job.
2. If after some time (week, month) nobody cared, then I move the
   folder from `jenkins-data/jobs` to `jenkins-data-old/jobs`. That way
   it is no longer visible in Jenkins. It's no longer in jenkins-data
   backups either.
3. If we start running low on space I remove jobs from `jenkins-data-old`.

At a very least I would just keep a backup of `config.xml` of all jobs. 
We have them in SVN so that I don't have to worry too much about 
deleting things.


Regards,
Nux.

--
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/55B20DDD.1040308%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Build status depending on build failure type

2015-07-24 Thread Maciej Jaros

Jakub Czaplicki (2015-07-08 17:57):


I would like to be able to set a build status to "Not built" or 
"Aborted" when a certain failure occur (specific string in a log I 
suppose).


For instance when a infrastructure failure occurs: "failed receiving 
gdi request response for mid=2 (got syncron message receive timeout 
error).".


Ideally, in such case, email notification should only be sent to 
Jenkins admin/Test team rather than individuals who commited the 
change that triggered Jenkins.


What would be the best way to approach this ?


When you catch some error you can echo something like "[ERROR] 
something". Just remeber to use something like `echo "[""ERROR]"` so 
that you won't match the code.


Then you can have a final guard that fails the build if it find 
"[ERROR]" and make it unstable if it finds a text "[WARNING]" (see 
screenshot below). Then in another post build step you can set build 
description based on the first matched error (example below). Probably 
might be more flexiable to do it with Groovy, but that method is fine if 
you don't have too many jobs.


Regards,
Nux.




--
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/55B2085B.7010503%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: End to end tests with CasperJS and Jenkins

2015-06-24 Thread Maciej Jaros

Daniela Morais (2015-06-19 18:28):
I have a script that checks whether all application modules are up and 
returning the result correctly, but need to test the *upload .xlsx and 
.zip files*.
I'm developing in *|CasperJS|* and desire to integrate with 
*|Jenkins|* (which I'm still learning about).


My question is: How do I access these .xlsx files and zip when 
integrating with Jenkins?
Just put in the Jenkins workspace directory and access or is something 
more complex than having to use Parameterized Trigger Plugin 
? 
There's another solution?


You mean the files are uploaded by the user during the build? If so then 
this is a bit tricky...


1. Then name of the file will be the same as what you put into the
   "File location" field of "File parameter".
2. An original name of the file will be available in an environment
   variable with the same name as what you put into the "File location"
   field of "File parameter".

So. if in the "File location" you put "myZipFile". Then

1. The name of the file after upload is just that -- "myZipFile" and it
   lands in the workspace.
2. The original name is available (which you can print to log on
   Windows as: `echo %myZipFile%` or on Linux: `echo $myZipFile`)

You can rename the file to original name by executing shell command:
mv myZipFile $myZipFile

Or by issuing Windows batch command like (depending where your Jenkins 
is installed):

move myZipFile %myZipFile%

Regards,
Nux.

--
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/558AA508.2090805%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Doubts about Publish Over SSH Plugin

2015-04-30 Thread Maciej Jaros

Erick Macedo (2015-04-27 22:54):

Hi,

I configured this way and it worked,

Another question, as you usually split between the build environment 
(Stage, test, production)?


Create a build for each environment? or a single build and different 
parameters?


You should have separte builds for several reasons:

1. Copy artifact plugin copies latest build from given job.
2. For alfa/test builds you might want to do full unit and integration
   tests and Jenkins will show you charts with failing tests and such.
   For production builds you can assume those tests already pass and
   make build proccess faster (or run different tests depeneding on
   your needs).
3. Stage and production builds might use code from different
   tags/branches... And Jenkins will show changes nicely if you let it
   pull changes from single branch in a single job.

In other words the build process will most likely be different and it 
will be much easier to observe it in separate jobs.


Regards,
Nux.

--
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/55424D79.9020003%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Efficiently copying artifacts

2015-04-27 Thread Maciej Jaros

Simon Richter (2015-04-25 02:02):

Hi,

I have a project that outputs a few large files (compiled DLL and static
library) as well as a few hundred header files as artifacts for use by
the next project in the dependency chain. Copying these in and out of
workspaces takes quite a long time, and the network link is not even
near capacity, so presumably handling of multiple small files is not
really efficient.

Can this be optimized somehow, e.g. by packing and unpacking the files
for transfer? Manual inspection of artifacts is secondary, I think.


If some of the files remain unchanged then it can be done more 
efficently when you NOT pack the files. You could for example create a 
respository (SVN) for artifacts and instead of copying all files you 
would simple run `svn update` and get only changed files. Another option 
would be using rsync for synchronisation but that might not work as good 
as SVN would.


Regards,
Nux.

--
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/553DF5D5.9040304%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Getting error during deployment

2015-04-23 Thread Maciej Jaros

Bharath Raj (2015-04-22 21:28):

Hi team ,
I am trying to deploy artifact through Weblogic server ..After building project 
I have written build.xml which is generating war successfully .. I am able to 
undeploy but while deploying I am getting the below error . Could you please 
help me in solving the issue and let me know the cause for the error..

  Task completed abnormally (exit code =1) .


Not sure about Weblogic server, but for Tomcat the best way to make sure 
deployment works is to stop the server (and wait for it to actually 
stop) and then copy war and then start the sever again.


Here is a stopping script which you could adjust for Weblogic server:
# Set timeout (in seconds).
# default value
TIMEOUT=240
# run-time value
if [ ! -z "$1" ]; then
TIMEOUT=$1
fi
echo "[INFO] Timeout will occur at: " $(date -d "$TIMEOUT seconds")

# stopping...
/etc/init.d/tomcat stop

# timeout setup
END_TIME=$(date -d "$TIMEOUT seconds" +%s)

# waiting...
echo "---"
echo "  Stop log"
echo "- - - - - - - - - -"
while read line
do
echo $line
if echo $line|grep -i "INFO: Destroying ProtocolHandler \[\"ajp"
then
break
fi
# break if no java is running...
runningJava=`ps -A|grep -i "java"`
if [ -z "$runningJava" ]
then
echo "[INFO] Java is not running"
break
fi
if [ $(date +%s) -ge $END_TIME ]
then
echo "[INFO] Timeout occurred - killing java"
killall java
break
fi
done < <(tail -5f /usr/share/apache-tomcat/logs/catalina.out)
echo -e "\n---\n\n"

--
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/5538BDA8.8000909%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: LDAP: does not work for jenkins 1.606 with Ldapplugin 1.6

2015-04-23 Thread Maciej Jaros
PS: Also `managerDN` should simply be a user name prefixed with domain 
name e.g. `MYCOMPANY\MyUser`. Any user with basic permissions should work.



Maciej Jaros (2015-04-23 11:26):

v_sathyamurthy (2015-04-02 19:00):

Hello Folks,
   I would really appreciate if some one could help me. I have 
installed jenkins 1.606 on windows,and tried to enable the global 
security link. I configured everything correctly. When enver I tried 
to test the login I always brought back to error page.

*Invalid login information. Please try again.
Try again*

*If you are a system administrator and suspect this to be a 
configuration problem, see the server console output for more details.*

My configuration looks like below:
true
  class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy"/>
  plugin="ldap@1.6 <mailto:ldap@1.6>">

ldap://dev-corpldap.com:389
dc=mycompany,dc=com
false
ou=internal,ou=users,dc=mycompany,dc=com
uid={0}
uid=bindid,ou=system,ou=users,dc=mycompany,dc=com
UGFzc3dvcmRAMTIz
true
  

...

If you are using AcitveDirectory (Windows domain) as LDAP then 
`userSearch` should be `sAMAccountName={0}`. Also `userSearchBase` 
might be different. This might vary between installations, but I'm 
using `CN=Users` and it works fine.


Regards,
Nux.
--
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 
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5538BAD6.2010300%40mol.com.pl 
<https://groups.google.com/d/msgid/jenkinsci-users/5538BAD6.2010300%40mol.com.pl?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.





MOL sp. z o.o.  *Maciej Jaros*
e-mail: mac...@mol.com.pl <mailto:mac...@mol.com.pl>
WWW: www.mol.pl <http://www.mol.pl/>  
tel: 58 669 80 90
fax: 58 669 80 91

--
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/5538BB72.9020306%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: LDAP: does not work for jenkins 1.606 with Ldapplugin 1.6

2015-04-23 Thread Maciej Jaros

v_sathyamurthy (2015-04-02 19:00):

Hello Folks,
   I would really appreciate if some one could help me. I have 
installed jenkins 1.606 on windows,and tried to enable the global 
security link. I configured everything correctly. When enver I tried 
to test the login I always brought back to error page.

*Invalid login information. Please try again.
Try again*

*If you are a system administrator and suspect this to be a 
configuration problem, see the server console output for more details.*

My configuration looks like below:
true
  class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy"/>
  plugin="ldap@1.6 ">

ldap://dev-corpldap.com:389
dc=mycompany,dc=com
false
ou=internal,ou=users,dc=mycompany,dc=com
uid={0}
uid=bindid,ou=system,ou=users,dc=mycompany,dc=com
UGFzc3dvcmRAMTIz
true
  

...

If you are using AcitveDirectory (Windows domain) as LDAP then 
`userSearch` should be `sAMAccountName={0}`. Also `userSearchBase` might 
be different. This might vary between installations, but I'm using 
`CN=Users` and it works fine.


Regards,
Nux.

--
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/5538BAD6.2010300%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Using signed SSL certificates to start Jenkins

2015-04-22 Thread Maciej Jaros

Mike Bayliss (2015-04-03 15:09):
To follow up myself, actually I only have the problem in Firefox. 
Using IE or chrome I don't get a warning (although the self signed 
certificate gave me warnings). So should I be trying to fix this in my 
keystore or is just my Firefox is missing a certificate from my company?


This is not a Jenkins issue... but IE and Chrome use certificate 
authorities installed in your system. Firefox uses internal registry for 
extra certificates. You need to install CA certificate from your company 
by simply opening it in Firefox and enabling required options in a 
dialog that will popup.


Regards,
Nux.

--
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/55377D85.6030109%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: are jenkins groups only part of the enterprise version

2015-03-20 Thread Maciej Jaros

Eric Wood (2015-03-19 20:43):
I have been trying to set up filtering on folder using the role-based 
security and folders plugin in the open source version.  I have been 
reading about groups and the capability to provided filtering on 
these, but it is in reference to the enterprise role-based access 
plugin.  Is this only a enterprise feature?  Is there a way to provide 
filtering on folders in the open source version? If so, can somebody 
help point me in the right direction?


What kind of filtering do you mean? Authorization based, static 
groupping or dynamic filtering?


 * There is a Role Strategy Plugin which is for adding roles and
   filtering jobs based on their name (e.g. admins have access to any
   job, developers have access to jobs that end with "-build"...).
 * There is a Categorized Jobs View plugin which allows you to group
   some jobs within a single view.
 * And I've made a simple ViewFilter script
   

   that can be used to dynamically filter jobs based on their name.

Regards,
Nux.

--
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/550C5A3E.2000304%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Promote jobs from test -> staging -> production

2015-03-18 Thread Maciej Jaros

Jochen Hinrichsen (2015-03-18 12:08):

Dear group,

we want to follow the same rules for Jenkins jobs that our software 
itself must confirm to: development in test, testing in staging, and 
the official version in a production environment. Copy and paste will 
always work, but i'm too lazy to do that for the 200+ jobs. Maybe 
something more git-ish?


From a first glance, i can see that everything credential related is 
different in the underlying xml configuration files. So a plain 1:1 
copy of a job's external xml representation will not work.


If you have 3 Jenkins installations that are identical (i.e. two of them 
have jenkins-data folder copied at first) then you could simply copy 
config.xml between them. I'm not sure which of the files is used for 
credentials encryption but my wild guess is that its the `secret.key` 
file ;-).


Regards,
Nux.

--
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/550962A5.9050902%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: How to run Jenkins job with build parameter

2015-03-18 Thread Maciej Jaros



Hi I'm new to jenkins and need to know how to use jenkins build parameter
plugin.

we have 4 different environments

...

Note:- Difference between all the environments are only the URLs however we
also need to make sure that if we use build parameter then results needs to
be accurate . Not like they will be confusing and we dont know which results
is for which environments .



If you the only difference is the URL then you could simply make changes 
in one Job and copy config.xml to others changing the URL manually... Or 
you could even use job name to figure out which URL to use.


Or you could use Build parameter as you mention and then expose its 
value in the build description with Description Setter Plugin. Summary 
will not be accurate, but you will be able to see which environment 
failed in the build history.


Regards,
Nux.

--
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/5509597E.6010909%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: How to make copy artifact plugin copy multiple artifact from jobs dynamically

2015-03-17 Thread Maciej Jaros

2015-03-17 o 04:44, Bala murugan:
So I have 21 different jobs which runs seperately for each git repo 
and archives the artifact.


And i have a job which deploys to a integration environment. in this 
job, i want to have these 21 jobs as choices , and i can select what 
jobs i need to copy each time when i trigger this job,,  the problem 
for me is if i have extended choice parameter i cannot use that value 
to pass to the copy_artifact plugin.


Does it make sense of what i am trying to achieve?


You can use a Conditional step with a Regular expression match. You 
still need 21 steps... which is kind of hard to set up... But it is doable.


In the below screen "WhatBranchShoulBeUsed" is a Choice Parameter 
exposed to users (on of its values is "release").



--
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/5507FE55.80803%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Password Parameter not masked in Console output

2015-03-17 Thread Maciej Jaros

2015-03-02 o 17:42, lfast:

Let me try again:
Script:
any_command -p $my_pwd

Console Output:
any_command -p the_password_I_typed
error: any_command not found

The password is still displayed.  Maybe I'm misunderstanding what you 
mean by "just use the variable."  Is masking the use of $my_pwd not 
supported?


Not sure about your exact command but adding `set +x` on top of "Execute 
shell" should block most of what is displayed in the logs. AFAIK the 
password variable is used as any other variable. There doesn't seem to 
be any special behaviour around it.


Regards,
Nux.

--
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/5507FC04.5070302%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Moving from built-in Jenkins user DB to another source (like Google)

2015-03-12 Thread Maciej Jaros

2015-03-09 o 17:13, Mike Chmielewski wrote:

Hi everyone,

I was wondering if anyone has experiences they are willing to share 
about moving the user DB from the built-in Jenkins DB to an outside 
one like LDAP or Google OpenID/Oauth (Google Oauth experience is more 
applicable to my use case).


We have have 50-75 users with access now, and the company uses Google 
Apps, so it is a natural fit to move to the shared auth in Google, as 
we grow larger/have multiple remote offices, etc.


Are there manual steps to migrate? Is it seamless? Does it default to 
internal?


The only gotcha I have is that we have some outsourcing groups with 
access, with their own email systems... Is the current Google 
authentication integration flexible enough?


Not sure about Google, but we moved to LDAP login with Role Strategy 
Plugin to mange authorization. There is no migration. You define roles 
all over, but defining roles is easier then in default authorization 
Jenkins model (where it is done per-job)...


I guess you could parse jobs config.xml and maybe create new 
configuration semi-automatically, but I didn't found any tool for that.


Regards,
Nux.

--
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/55017B77.6020209%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Disabling/enabling parameters basing on value from the other parameter

2015-02-12 Thread Maciej Jaros

Hi.

I added example grouping `config.xml` that has some more explanations 
inside:

https://github.com/Eccenux/jenkins-scripts/blob/master/example-grouping/config.xml

Also added screenshots in the Readme:
https://github.com/Eccenux/jenkins-scripts/

Regards,
Nux.

--
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/54DC75E7.9080005%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Disabling/enabling parameters basing on value from the other parameter

2015-02-11 Thread Maciej Jaros

W dniu 2015-02-11 o 12:25, Wojciech Korzenny pisze:

Hi Maciek,

Thanks for the answer. It looks really promising.
But I have some problems with applying this feature.

I installed plugin Simple Theme Plugin successfully.
I downloaded entire content from github and what should I do now to 
see "Group Start" parameter type on list during job Configuration?


That script doesn't define new parameter types. It uses existing ones 
with special values which - I admit - is a bit hackish ;-). You can find 
instructions for defining groups in the readme:

https://github.com/Eccenux/jenkins-scripts/#grouping-parameters

There is also a request to make it a standard Jenkins feature with a new 
"group" definition (instead of a hacky version I use):

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

Regards,
Nux.

--
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/54DB3F36.5000908%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: Disabling/enabling parameters basing on value from the other parameter

2015-02-11 Thread Maciej Jaros

2015-02-11 at 08:53, Wojciech Korzenny wrote:

Hi.

I'm trying to configure job in Jenkins with some list of parameters.
I'd like have some PARAMETER_X which turns to read-only (or 
disappeared at all) when PARAMETER_Y (simple choice parameter or 
choice parameter supplied by Scriptler) has value XYZ, otherwise 
PARAMETER_X is read-write (string/choice parameter).


Is it possible?


I don't think there is a plugin for that but you could implement that 
with a user-side script.


Here is something you might want to start with:
https://github.com/Eccenux/jenkins-scripts

Specifically this is a script used for grouping (hiding a group of 
parameters based on a checkbox state):

https://github.com/Eccenux/jenkins-scripts/blob/master/theme/nux-js/parameter-grouping.js

Regards,
Nux.

--
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/54DB0D88.6020902%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.


Re: question on BUILD_ID

2014-10-29 Thread Maciej Jaros

alok kumar (2014-10-28 17:42):

Hi All,
I am using ZEN timestamp plugin to modify the BUILD_ID as per our 
requirements.
It works well when I use it any build step, but when I try using the 
changed BUILD_ID variable in the extended email build step it doesnt 
show the modified BUILD_ID, but, the default one instead.


Has anyone come across this before? If so, can you please help me to 
overcome this issue.


AFAIK changes in environment variables do not stick between steps. Not 
sure about emails, but I use values written in files to pass variables 
between steps.


Regards,
Nux.

--
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: How to structure Jenkins with a build that has 100's of projects?

2014-10-29 Thread Maciej Jaros

Patrick van Dissel (2014-10-29 02:35):

[...]
About the jobs structure..
It really depends how you're going to use Jenkins.
Start simpel, and only add what is nessesary.
The amount of jobs does not really matter. For your idea, with my team
we currently have a Jenkins setup of 1 master with 3 slaves running a
bit more then 1000 jobs. With multiple jobs for single
apps/libraries/.., eg. CI, Deploy, DEV, TEST, ACC, PRO, etc. Almost all
managed with JobDSL scripts.


The JobDSL sounds very interesting! But how do you configure 
authorization in a complex environment? I mean I'd like to put DSL in 
SVN, but do not want to put passwords there. So two issues really:


1. SSH authorization (executing and sending files).
2. SVN authorization.

Regards,
Nux.

--
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: LDAP Plugin authentication issue

2014-10-29 Thread Maciej Jaros

Gil Br (2014-10-29 08:51):

Hi,

Your answer relates to Active Directory, I'm using LDAP 389 on Linux.
Any other idea?


Depending on your LDAP configuration you should use correct search base 
and search filter... But I'm not sure how would you use NT password if 
LDAP is on Linux? Or what do you mean by NT? I though you meant Windows 
NT password (hence I mentioned Active Directory which is kind of built 
in Windows domain).


Regards,
Nux

--
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: LDAP Plugin authentication issue

2014-10-28 Thread Maciej Jaros

Gil Br (2014-10-28 15:58):

All,

I installed the latest LDAP Plugin for Jenkins.
When I use ldap://server.name I get *no* error under the LDAP Server 
line, however when I use ldap*s*://server.name:636 I get the following 
error:
/Unable to connect to ldaps://server.name:636 : 
javax.naming.CommunicationException: simple bind failed: 
server.name:636 [Root exception is 
javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target]//

//
//[...]/


Most probably your LDAP uses a certifacte that is not valid on Jenkins 
box. This is when you have a self generated certificate. You would 
probably have to install CA on your Jenkins box.


In either case (ldaps or ldap) I get login failed when I try to login 
with my NT user/password, Jenkins runs on windows.


I haven't tried using ldap protocol in server address but that should 
work for Active Directory LDAP:


* server: your.domain.com
* rootDN: DC=your,DC=domain,DC=com
* userSearchBase: CN=Users
* user search filter: sAMAccountName={0}
* managerDN: DOMAIN\someUser
* managerPassword: someUser password

AFAIK `userSearchBase` and `user search filter` are the same for all 
Active Directory installations.


Regards,
Nux

--
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: How can I get a job to fail when a regex does not matches the output?

2014-10-27 Thread Maciej Jaros

Sahil Minocha (2014-10-16 13:50):

Hi,

I am using Conditional Steps(Multiple) and Steps to run if condition 
is met.
I have a scenario to fail the build if an expression is not found in 
the Console Output.
What I am able to achieve is, I can change the build output when an 
expression matches using Text FInder, however I need to do the 
vice-a-versa.

I need to abort/fail the build if the regex does not matches the output.


You can create a file if the condition was met (e.g. file 
"condition_x_matched"). Then add a Execute shell step and chaeck for the 
existance of the file. If the file does not exist - fail the build e.g. 
by doing `exit 1`.


Regards,
Nux

--
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: How to make the Job name not updatable

2014-07-28 Thread Maciej Jaros

Emmanuel DEMEY (2014-07-21 14:30):

Hi everyone,

After the creation of a job, how can I make the job name read-only for 
all users ?


I need this, in order to break the link between the job and our 
database that use our jenkins resource.


Even if you could do this in Jenkins it would be pointless. Anyone with 
access to job configuration has access to the machine Jenkins is on - 
i.e. one could create a job that changes a directory of Jenkins job and 
Jenkins job name is connected to the directory name.


Regards,
Nux.

--
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: Contents of Jar

2014-07-28 Thread Maciej Jaros

Thomas (2014-07-24 21:59):

Hi All,

is there are way to view the contents of a generated jar?

I don´t want to download the whole jar and open it on my desktop but 
instead view it in the web interface.


Is there a plugin that does that or is the feature somehow already 
included?


Thanks for your answers in advance.


You could add a build step to list contents:
unzip -l my-package.jar > my-package-contents.txt

And then add my-package-contents.txt to artifacts or just view it in 
workspace viewer.


Regards,
Nux

--
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: Regex in securitybased role strategy

2014-07-22 Thread Maciej Jaros

Jan Seidel (2014-07-22 14:06):

Hi friends,

I am struggling with regular expressions and they drive me atm to 
Nutsville!


There is a set of jobs and they look like this:
GUIDE_DISPATCHER
GUIDE_CB_xxx_P4
MB_GUIDE_HEAD
MB_GUIDE_PAG_P4
MB_GUIDE_MIB_D_BILBAO

I am now trying to remove the view of everything that either has an 
MIB or a P4 in the name.

Note MIB is located in the string, P4 always at the end

Output should be:
GUIDE_DISPATCHER
MB_GUIDE_HEAD

Output is:
GUIDE_DISPATCHER
*GUIDE_CB_xxx_P4*
MB_GUIDE_HEAD
*MB_GUIDE_PAG_P4*

I have tested a tremendous amount of different expressions but I am 
never able to find the matching one.
My problem is that jobs ending on P4 simply cannot be removed. 
Including works but excluding not :(


This regex looks to me like the most reasonable tto work but nope, it 
isn't.*(.*)GUIDE_(?!MIB)(.*)(?!P4) *


Use "MB_GUIDE_MIB_D_BILBAO".match("your regexp") to test.

AFAIK "?!" won't work like you expect. I don't think you will be able to 
do a negative match but you can try ;-).


Regards,
Nux.

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

2014-07-22 Thread Maciej Jaros

Herman De Vries (2014-07-04 10:23):

Hi all,

We have developed a jenkins app 
 to 
monitor all jobs, builds, artifacts and console outputs and on top to 
easy install the APKs of Android jobs. It would be great if you could 
have a look at the app, and let me know your improvement thoughts. Do 
you have suggestions where to post this app?


1. In Overview please add HTML parsing or at least remove tags you
   cannot parse.
2. Also in Overview please add an ability to hide description - long
   descriptions
   make bottom frame not visible. Would be cool if basic description
   (up to e.g. 3 lines) would be shown by default and "view full
   description" button would be added.
3. Views support in jobs list would be usefull.
4. Show display name on job list instead of folder name.
5. Add job filtering on main view (preferably by both diplay and folder
   name).
6. Filtering jobs by name and display name (this can be very easily
   done in jQuery Mobile list view, but of course doable in Android
   list view too).

BTW. Why not PhoneGap? Would be easier to add HTML parsing ;-). And you 
could release iOS version and for some other systems...


If you would decide to go for PhoneGap and keep code on Github then I 
would be more then happy to help :-).


Regards,
Nux.

--
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: syntax highlighting of "Build" -> "execute shell"

2014-06-25 Thread Maciej Jaros

min yuan (2014-06-23 16:03):
Well, thank you very much, I'd like to know how to install it to my 
jenkins server, but actually i didn't find your plugins in "manage 
plugins".


It's not a plugin. You need to download stuff from the "_build 
" 
folder to your server and point "URL of theme JS" to downloaded theme.js.


You need Simple Theme Plugin to have "URL of theme JS" in Jenkins 
configuration.

http://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin



在 2014年6月13日星期五UTC+2下午12时33分14秒,maciej写道:

min yuan (2014-06-12 18:25):

Hello,

I have installed Jenkins last week and I can see the field
"*Build execute shell*" has *syntax highlighting support* when I
type my shell  script.
But today I reinstalled Jenkins and then the *syntax
highlighting* is no more supported.

Can somebody tell me why? Or should I send a bug report to Jenkins?


With latesty LTS version this should work fine:
https://github.com/Eccenux/jenkins-scripts


You can fork my repository or just download it and use everything
from here:
https://github.com/Eccenux/jenkins-scripts/tree/master/theme/_build 


Cheers,
Nux.



--
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: Problem matching a value separated with commas

2014-06-16 Thread Maciej Jaros

Maciej Jaros (2014-06-16 18:51):

Not sure if this is a bug or somehow desired behaviour, but I get this:

Run condition [Regular expression match] preventing perform for step 
[Trigger/call builds on other projects]
Regular expression run condition: Expression=[(^|,)dev2(,|$)], 
Label=[dev,dev2,dev3]


So "dev,dev2,dev3" didn't match expression "(^|,)dev2(,|$)".
Why is that? Should I report a bug for this? Any workaround?

As you might guess I'm using Extended Choice Parameter Plug-In to have 
checkbox values and return CSV. I then use the value of the parameter 
in a label for Run condition plugin.


Regards,
Nux.



Never mind. I figured out that it's a full match and so I need 
"^(.*,)?dev2(,.*)?$".


Regards,
Nux.

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


Problem matching a value separated with commas

2014-06-16 Thread Maciej Jaros

Not sure if this is a bug or somehow desired behaviour, but I get this:

Run condition [Regular expression match] preventing perform for step 
[Trigger/call builds on other projects]
Regular expression run condition: Expression=[(^|,)dev2(,|$)], 
Label=[dev,dev2,dev3]


So "dev,dev2,dev3" didn't match expression "(^|,)dev2(,|$)".
Why is that? Should I report a bug for this? Any workaround?

As you might guess I'm using Extended Choice Parameter Plug-In to have 
checkbox values and return CSV. I then use the value of the parameter in 
a label for Run condition plugin.


Regards,
Nux.

--
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: syntax highlighting of "Build" -> "execute shell"

2014-06-13 Thread Maciej Jaros

min yuan (2014-06-12 18:25):

Hello,

I have installed Jenkins last week and I can see the field "*Build 
execute shell*" has *syntax highlighting support* when I type my 
shell  script.
But today I reinstalled Jenkins and then the *syntax highlighting* is 
no more supported.


Can somebody tell me why? Or should I send a bug report to Jenkins?


With latesty LTS version this should work fine:
https://github.com/Eccenux/jenkins-scripts

You can fork my repository or just download it and use everything from here:
https://github.com/Eccenux/jenkins-scripts/tree/master/theme/_build

Cheers,
Nux.

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


Choose destination SSH server in parameters

2014-06-10 Thread Maciej Jaros

Hi.

Please correct me if I'm wrong but labeling SSH servers (in "Send files 
or execute commands over SSH") only allows to skip whole step.


I want a different thing. I want to execute exact same commands on one 
of several different servers. So is it possible to choose to publish 
some servers without duplicating steps or jobs?


Regards,
Nux.

--
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: People using the LDAP plugin to connect to Active Directory

2014-06-10 Thread Maciej Jaros

Stephen Connolly (2014-05-22 17:12):
OK, so there is now rumoured to be a faster and better way to look up 
the groups that a user belongs to in the LDAP 1.10 plugin.


I say rumoured because due to the complexities of Active Directory 
server configurations, one can never be quite sure until one has had a 
fair amount of testing.


To that end, please could you set up a simple test Jenkins instance 
and upgrade to ldap:1.10 and configure the `Parse user attribute for 
list of groups` group membership strategy (again rumour has it that on 
Active Directory the attribute `memberOf` is the magic attribute.


See if that ends up giving you the same JENKINS_URL/whoAmI list of 
groups as when you have the `Search for groups containing user` set 
with the filter being `(member:1.2.840.113556.1.4.1941:={0})`... 
though the `Parse user attribute for list of groups` should be very 
very fast for login while the `Search for groups containing user` 
could take *ages*.


Seems the rumors are right ;-). New version is very snappy. It's the 
first time I could disable LDAP cache.


BTW if we don't use LDAP/AD groups could I disable checking for groups 
in LDAP somehow? Maybe that would make it even faster... We only use 
"authenticated" group to assign roles (we use Role Strategy plugin).


BTW "role-strategy/assign-roles" now loads icons on the list within 1-2 
seconds. It used to load about 10 times slower so good work!


Regards,
Nux.

--
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: Setting global variables without using parameterized build in job

2014-06-10 Thread Maciej Jaros

Eric Wood (2014-06-05 16:15):
Can I set global variables and then use in jobs without using 
parameterized builds.  This forces me into a manual response mode that 
does not work in my scenario.


We use a trick to save data into files (`echo "1" > 
./exitStatus.jenkins`) and then read in another build step 
(exitStatus=`cat ./exitStatus.jenkins`). AFAIK there is no other way 
(other then exporting variables which seem like an overkill and would 
not be safe as it would break job isolation).


Cheers,
Nux.

--
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: Default build log location

2014-06-10 Thread Maciej Jaros

Landry, Conor (2014-06-02 23:52):


Hi,

I haven't been able to find much information about this online, but is 
there a way to save the build logs from jobs in a location other than 
where they are saved by default? If not are there any plugins to do so?




You could simply copy the log (the name of the file is simply "log" and 
you can find in every build). Note however that this files contains 
formatting garbage and so is not really directly readable.


Cheers,
Nux.

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

2014-05-19 Thread Maciej Jaros

Hajarita Bm (2014-05-19 11:03):

Hey,

thank for your answer Richard

I use the phing script to copy mysql database from a directory to 
another so how can I configure jenkins to ensure the database exists 
when the work is done for not crush files.


Seems unrelated to Jenkins. You can use mysql tools to check if database 
exist or just use shell to check if physical db files exists.


Regards,
Nux.

--
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: Add version and build number to Artifactory directory in repository

2014-05-19 Thread Maciej Jaros

M M (2014-05-19 00:42):

Hi,

I wonder if someone can help me please.  I am trying to add the 
version and build number to the directory in Artifactory.


I am using Jenkins and I can configure using the Artifactory 
Configuration where I want my artifacts to go.
The Published Artifacts entry allows me to set the directory in 
Artifactory eg:


release/=>PROJECT1

The above will push any artifacts in the release directory to the 
PROJECT1 directory in artifactory.


What I would like to achieve is this:

release/=>PROJECT1/${BUILD.NUMBER}


The variable name is BUILD_NUMBER you can also use SVN_REVISION. Don't 
know about Artifactory, but you can just rename folders and/or files in 
the build process.


Regards,
Nux.

--
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: Test Result Trend : flipTrend works fine with Opera, not with FF or IE

2014-05-16 Thread Maciej Jaros

Mohamed Djadlou (2014-05-16 10:52):

Hi all,


My first post here after using Jenkins for 2 months now.  :-)

My manager is very interested in the charts representing the failures 
of all our jobs.  Unfortunately the '(just show failures)' link is 
broken i.e. flipTrend is called but diagram is still the same (test # 
and failure #).  This happens with Firefox (ESR 24.4.0) and Internet 
Explorer (8.0.760.1.17514), which are the main browsers used in my 
company.  However it does work when using Opera (12.17) ! I 
experienced exactly the same behaviour with some other colleagues' 
machines.




Seems like a bug. Happens for me too on Opera 12.12 on LTS.

You should report a bug:
https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking#IssueTracking-Reportinganissue


MOL sp. z o.o.  *Maciej Jaros*
e-mail: mac...@mol.com.pl <mailto:mac...@mol.com.pl>
WWW: www.mol.pl <http://www.mol.pl/>  
tel: 58 669 80 90
fax: 58 669 80 91

--
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: Windows batch command

2014-05-14 Thread Maciej Jaros

Adrian Rusu (2014-05-14 10:34):

Hello all.

I have a question regarding "Execute Windows batch command" field 
inside a job


So, i'm trying to open an api client and give specific api commands 
after that.


I can open the api client, it's an exe file, but after that the 
specific api commands that i give are still interpreted as batch commands
and of course the following message appears "is not recognized as an 
internal or external command,

operable program or batch file"
Anyone has an idea how can I avoid this, i want to open the api client 
and after that to give specific api commands. I know this is not 
actually a jenkins related problem, but maybe someone knows how to 
deal with it.

The api is python based.


python.exe yourPythonScript.py "some" "arguments" "passed to script"

You can of course create/alter that script with by e.g. using echo command.

Regards,
Nux.

--
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: Is it possible using some plugin to get Jenkins to email me when a node has low disk space instead of just quietly dying?

2014-05-13 Thread Maciej Jaros

Warren Postma (2014-05-12 16:53):
We have configured Jenkins to at least put nodes OFFLINE when their 
disk space is low, but manually checking these nodes seems a silly 
think when Jenkins should be emailing out.


I guess because disk space is a plugin I should ask the maintainers of 
the disk usage plugin about this, or is this a core Jenkins feature?


Assuming nodes are on lLinux you can use below:

##
# Check availble space in $1 directory and exit if $2 MiB is not availble
function checkAvailableSpace()
{
dirToCheck=$1
minMiB=$2

available=$(($(stat -f --format="%a*%S" $dirToCheck)))
available=$((available/1024/1024))
if [ "$available" -lt "$minMiB" ]; then
echo "[ERROR] Not enough space available in $dirToCheck (free: 
$available MiB)!"

exit 1
else
echo "There seem to be enough space available in '$dirToCheck' 
(free: $available MiB)."

fi
}


# usage - check for ~10 GiB free space
checkAvailableSpace /some/path/to/check 10240

--
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: URGENT: I am new for Jenkins and how to integrate soapui into jenkins.

2014-05-09 Thread Maciej Jaros

vidhya radha (2014-05-09 07:18):

Hi Amit,

I have tried this link but it is not trigger the build automatically 
when the person changes the code.


You can either use Poll SCM job configuration option or use post commit 
hook to trigger build directly after change.


Regards,
Nux.

--
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: Want to schedule a Jenkins job which will run after every 5 seconds

2014-05-08 Thread Maciej Jaros

amol likhite (2014-05-08 05:51):

Hi Mark,

Thanks for the quick reply.

I am currently executing the Jmeter scripts through Jenkins and 
showing the generated data on the web site for continuous monitoring.
As per requirement some of the scripts need to be execute after every 
5 seconds and some of them after every 5 minutes.


I have created 2 jobs under Jenkins one will start after every 5 
minutes and other will start after 2 minutes as currently I don't have 
solution to run every after 5 seconds.


Have a look at:
http://stackoverflow.com/questions/1034243/how-to-get-a-unix-script-to-run-every-15-seconds




Thanks in advance.

Regards,
Amol Likhite

On Wednesday, May 7, 2014 9:24:40 PM UTC+5:30, Mark Waite wrote:

Couldn't the job be defined to do its planned steps then add a
concluding step which launches the job again.  Make the job delay
be 5 seconds, and let the job delay time handle the 5 seconds
between jobs.

Mark Waite

On May 7, 2014 9:06 AM, "Scott Evans" > wrote:

Amol,

This seems rather unusual to need to have a job run every 5
seconds.  If you could let us know what you're trying to
accomplish, there is most likely another way that's better
than a continuously running job.

Scott


On Wed, May 7, 2014 at 10:03 AM, Daniel Beck > wrote:

This isn't straightforward in Jenkins.

Are you sure you're not using it as a golden hammer?

On 07.05.2014, at 16:48, amol likhite > wrote:

> Hi,
>
> Want to schedule a Jenkins job which will run after
every 5 seconds.
>
> Thanks in advance.
>
> Regards,
> Amol Likhite
>
> --
> 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
<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-use...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout
<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-use...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout
<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 
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.





MOL sp. z o.o.  *Maciej Jaros*
e-mail: mac...@mol.com.pl <mailto:mac...@mol.com.pl>
WWW: www.mol.pl <http://www.mol.pl/>  
tel: 58 669 80 90
fax: 58 669 80 91

--
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: Need help with a simple problem with MSBuild

2014-05-08 Thread Maciej Jaros
Seem like some include/library paths are missing or not accessible. Make 
sure the user that runs Jenkins service have access to all your files 
needed.


Also try running `SET` command (just SET) in your Windows shell and in 
Jenkins shell. Some environment variable might be missing.


Aaron Stokes (2014-05-05 16:51):
We are now in the process of updating our IDE to C++ builder XE5.  We 
needed to recreate all of our projects from scratch.  The project 
compiles in both MSBuild (on the actual machine) and the IDE but when 
we try to run MSBuild through jenkins, MSbuild does not know how to 
find certain resources.  I think I'm missing a step but I don't know 
what I'm missing.


Here is what I tried.
I tried calling rsvars from a command line and then tried to run msbuild.
Tried setting %PATH% using inject environment variables.
Tried calling a batch file located on the actual build machine same 
result.
Tried updating the MSBuild plugin to the latest version and checking 
Pass build variables as properties.  Unfortunately it did not include 
any thing defined in inject environment variables.


We are currently using the following
MSBuild plugin 1.2.1
Jenkins: 1.455

The components that are throwing errors are all third party components.
Madexcept 4.0.9
TMScomponents 7.1.6.1

Here are some examples of the errors I'm getting.
vat.cpp(16): error E2209: Unable to open include file 'madExcept.hpp'
vat.cpp(56): error E2293: ) expected
vatmain.cpp(85): error E2209: Unable to open include file 'AdvGrid.hpp'
..\CommonClasses\MPTIFontSelector.h(5): error E2209: Unable to open include 
file 'AdvOfficeComboBox.hpp'
..\CommonClasses\MPTIFontSelector.h(6): error E2209: Unable to open include 
file 'AsgCombo.hpp'
..\CommonClasses\MPTIFontSelector.h(7): error E2209: Unable to open include 
file 'ColorCombo.hpp'
..\CommonClasses\MPTIFontSelector.h(19): error E2303: Type name expected
..\CommonClasses\MPTIFontSelector.h(19): error E2139: Declaration missing ;
..\CommonClasses\MPTIFontSelector.h(21): error E2303: Type name expected
..\CommonClasses\MPTIFontSelector.h(21): error E2139: Declaration missing ;
..\CommonClasses\MPTIFontSelector.h(24): error E2303: Type name expected
..\CommonClasses\MPTIFontSelector.h(24): error E2139: Declaration missing ;
..\CommonClasses\MPTIFontSelector.h(19): error E2109: Not an allowed type
..\CommonClasses\MPTIFontSelector.h(21): error E2109: Not an allowed type
..\CommonClasses\MPTIFontSelector.h(24): error E2109: Not an allowed type
..\CommonClasses\MPTIFontSelector.cpp(36): error E2451: Undefined symbol 
'AdvOfficeFontSizeSelector1' in function TMPTIFont::updateFont()
..\CommonClasses\MPTIFontSelector.cpp(38): error E2451: Undefined symbol 
'AdvOfficeFontSelector1' in function TMPTIFont::updateFont()
..\CommonClasses\MPTIFontSelector.cpp(79): error E2451: Undefined symbol 
'AdvOfficeFontSelector1' in function _fastcall 
TMPTIFont::AdvOfficeFontSelector1Change(TObject *)
..\CommonClasses\MPTIFontSelector.cpp(97): error E2451: Undefined symbol 
'AdvOfficeFontSizeSelector1' in function _fastcall 
TMPTIFont::AdvOfficeFontSizeSelector1Change(TObject *)
..\CommonClasses\MPTIFontSelector.cpp(113): error E2451: Undefined symbol 
'AdvColorComboBox1' in function _fastcall 
TMPTIFont::AdvColorComboBox1Change(TObject *)
..\CommonClasses\MPTIFontSelector.cpp(189): error E2451: Undefined symbol 
'AdvColorComboBox1' in function TMPTIFont::setComboColor(TColor)

--
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 
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.





MOL sp. z o.o.  *Maciej Jaros*
e-mail: mac...@mol.com.pl <mailto:mac...@mol.com.pl>
WWW: www.mol.pl <http://www.mol.pl/>  
tel: 58 669 80 90
fax: 58 669 80 91

--
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-14 Thread Maciej Jaros

dev123 (2014-04-09 22:06):
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?


I think you should do it the other way around - release only if it 
passes QA ;-). Not sure about 'maven-release-plugin', but you could make 
3 jobs - build, QA, release. QA takes artifacts from build (or builds 
again with full testing), release takes artifacts from last succesfull QA.


In this scenario triggering release after QA should be a problem (either 
as dependency or build step of QA).


Regards,
Nux.

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


Filtering builds in a job (only show those started by current user)

2014-04-07 Thread Maciej Jaros

Hi.

Is it possible to filter builds to a specific user?

I want to rebuild some specific build (with specific parameters) and I 
want to find "my" last stable build. So filtering would be perfect. But 
maybe there is an option to show more columns in build history?


Regards,
Nux.

--
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: PermGen failures

2014-03-26 Thread Maciej Jaros

David Aldrich (2014-03-25 17:12):


Hi

In the last few weeks I have been getting a lot of PermGen errors:

FATAL: PermGen space

I am running Jenkins 1.556 on Centos 5.

How should I fix this problem please?



If this is a compilation issue:

In Build options -> Advance -> MAVEN_OPTS use something like: -Xmx1536m 
-XX:MaxPermSize=512m


If this is not a maven project then add build options to your command line.

Cheers,
Nux.

--
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: Recover disk space in Jenkins

2014-03-06 Thread Maciej Jaros

Les Mikesell (2014-03-06 00:39):

On Wed, Mar 5, 2014 at 5:30 PM, Kerry Cox  wrote:

One other question, rather than simply deleting each build individually (all
150+ builds), is there any way to globally delete all builds from a certain
day back?

Generally what you want to do is check the 'discard old builds' box in
the job configuration and fill in the details for how many days and
how many builds to keep.




Note that builds data doesn't contain too much data on it own. 
Discarding artifacts alone after e.g. 2 weeks will save A LOT of space 
;-). Trust me we had that problem.


Also note that it would not be wise to discard old build on a testing 
job (you might loose testing history/graph).


Regards,
Nux.

--
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: deploying a directory structure in tomcat using Jenkins

2014-02-27 Thread Maciej Jaros

Kamal Ahmed (2014-02-27 08:16):

Hi,
Has anyone resolved this issue:

The application frontend comprises of files , structure such as:

workspace/DATASC-UI-DEV-STAGING/datasc-ui/dist $ tree
.
├── DataSc.html
├── index.jsp
├── js
│   └── DataSc.min.js
├── lib
│   ├── ember.js
│   ├── handlebars.js
│   └── jquery.js
├── META-INF
│   ├── context.xml
│   └── MANIFEST.MF
├── resources
│   ├── base.css
│   └── images
│   └── bg.png
└── WEB-INF
└── web.xml

6 directories, 11 file

If this structure can be deployed directly to tomcat
Thanks,
-Kamal.


Zip it call it a war and copy to Tomcat. You will get best results if 
you stop Tomcat pre-build step and then copy war as a build step and in 
post build step start Tomcat.


Note that you can also rename war files and add revision number to them 
(before copying). Tomcat will automaticall deploy latest version. Example:

mv myapp.war mywar##${SVN_REVISION}.war

Where SVN_REVISION is a variable set by Jenkins for jobs that download 
sources from SVN.


Cheers,
Nux.

--
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: How to FInish Job Success even if it failed

2014-02-27 Thread Maciej Jaros

Gyanendra Mishra (2014-02-27 07:30):


Hello Kirk,

Before making job success, we need to check that post build task 
status is success.




You can check build status by analyzing log. You can use Text finder for 
that. To manually fail a build do a conditional step with Text finder 
and run shell with `exit 1`.


Please help to define how to mark main job as success only if post 
build task is success.


*Regards,
Gyanendra Pratap Mishra*

*From:*jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] *On Behalf Of *KT Kirk

*Sent:* Thursday, February 27, 2014 2:01 AM
*To:* jenkinsci-users@googlegroups.com
*Subject:* Re: How to FInish Job Success even if it failed

Add a /bin/true on failed statement.

Try:

false || true

or

make test || true

--

KTK

On Wednesday, February 26, 2014 10:28:49 AM UTC-5, Gyanendra Mishra wrote:

Hi There

i am stuck at a point and need help

i am executing webdriver scripts using jenkins

if any test fails, build is failed

and then i am using post build action to rerun the failed scripts

my problem is that if post build task is successful but i see the 
overall job status as failed


is there any way to mark job as success if post build task is successful

i tried to add other post build task and text-finder plugin but no luck

using ant target in batch script

--
You received this message because you are subscribed to a topic in the 
Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/jenkinsci-users/NKZBw64cy00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
jenkinsci-users+unsubscr...@googlegroups.com 
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.

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.





MOL sp. z o.o.  *Maciej Jaros*
e-mail: mac...@mol.com.pl <mailto:mac...@mol.com.pl>
WWW: www.mol.pl <http://www.mol.pl/>  
tel: 58 669 80 90
fax: 58 669 80 91

--
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: Parametrized build with dynamically populating values

2014-02-19 Thread Maciej Jaros

alok kumar (2014-02-19 17:43):

Hi All,
Is there a way in which I can submit a parametrized build in which the 
options available on one of the sections depend upon what value was 
chosen in the previous or any other parameter?


E.g. If the option chosen in the parameter form page is windows, it 
populates win7, win2008, win2003 dynamically in another parameter. On 
the other hand, if it is linux, it populates the same parameter with 
values such as SLES, RHEL, CENTOS, UBUNTU,etc.


Conditional step (multiple) should work. See example:
https://wiki.jenkins-ci.org/display/JENKINS/Run+Condition+Plugin#RunConditionPlugin-Example%3AControlexecutionbyastringparameter

--
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: Conditional build steps for maven projects

2014-02-17 Thread Maciej Jaros

varun srivastava (2014-02-17 08:13):

Hi,

How can I run conditional steps with Maven projects ? For free style 
projects I am able to set up conditional steps but this seems not 
available with Maven projects.


Conditional steps are available both after and before Maven is build is 
run (in Pre/Post steps). I'm not sure what is missing? I'm assuming you 
have Conditional BuildStep Plugin?


Note that you can also add "Conditional steps (multiple)" and inside 
that add e.g. call to a different job (with Parameterized Trigger Plugin).


Additionally I also want to publish findbugs/pmd reports conditionally 
in maven projects. Again this looks possible using flexible publish 
plugin only for free style projects.


You can run Findbugs and other tests within Sonar and you can have a 
step "Invoke Standalone Sonar Analysis" within "Conditional steps 
(multiple)". Haven't tried that myself (we have a separate job for full 
tests), but that seems possible.


Cheers,
Nux.

--
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: MD5/SHA1 of new release JARs?

2014-02-17 Thread Maciej Jaros

Yaniv Kaul (2014-02-16 08:31):
Is it possible to publish hash of the new JARs, so at least I can 
somehow try and verify their integrity? Since it's not packaged in any 
signed format (RPM, MSI, etc.), it's the least we can do to verify the 
package authenticity.


Execute hash creation in shell job step and just echo it to log. That's 
probably the simpliest solution. You could use plugins to push this 
information to e.g. build description.


Nux.

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


  1   2   >