Re: How to identify exactly where exception occurred in Jenkins pipeline?

2020-08-02 Thread Ramanathan Muthaiah

>
> But with Jenkins build output console, it does not show the line number 
> where the exception has occurred.
>
> In this case, based on method name ie `trim()` from log, I check wherever 
> `trim()` method is used. But as I've used it at multiple places in same 
> method, it becomes difficult to identify exactly where error has occurred.
>
> Another way is to add echo statements and re-run build and see where it 
> gives this exception but this is time consuming.
>
> Is there any better way/plugin using which I can identify at which line of 
> pipeline code exception has occurred?
>

You can try some of these methods:

i. In the humongous stack trace, search for workflow script with the line 
number, like, for example, 'workflow script: 70'.

Pls excuse for the shameful drum beating.

ii. https://dzone.com/articles/10-tips-to-debug-jenkins-pipelines

iii. 
https://dzone.com/articles/tips-to-debug-jenkins-v2x-pipeline-scripts-part-2

/Ram

-- 
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/48ba7f7f-313e-475b-8f41-9daf67888e12o%40googlegroups.com.


Re: Create default admin user on Jenkins own user database

2020-07-15 Thread Ramanathan Muthaiah
On Monday, July 13, 2020 at 10:45:23 PM UTC+5:30, Siva Bagavathy wrote:
>
> Dear Team,
>
> As part of automation, I need to create and invoke Jobs using Jenkins API. 
> I have deployed jenkins container on Kubernetes cluster using helm chart. 
> Hence I need Jenkins to have at least one admin user in its own database 
> (Jenkins' 
> own user database) after install. By default, its Delegate to servlet 
> container . How to do it ? Could you help me.
>
> You did not mention the image used for starting the container.

If the image was built by you, then you can provision groovy (kind of 
startup) scripts that can be baked in to the Docker image (as part of 
Docker build process). 

Docs in this repo could give you some leads, 
https://github.com/jenkinsci/docker

/Ram

-- 
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/53732c9d-89bc-4af8-9053-f270db51f94do%40googlegroups.com.


Re: Is there a Jenkins plugin that can create and terminate Amazon EC2 instances as required by the build queue?

2020-07-15 Thread Ramanathan Muthaiah
On Tuesday, July 14, 2020 at 1:51:47 PM UTC+5:30, Amedee Van Gasse wrote:
>
> Is there a way in Jenkins, maybe by means of some plugin, that I can for 
> example put in my Jenkinsfile:
>
> agent { label 'tesseract' }
>
> and that when a job with label 'tesseracr' enters the queue, Jenkins 
> connects to AWS, starts an instance based off an already existing image, 
> runs the job on that image, and then terminates the instance?
>

Adding to what has been confirmed by Alok Kumar, with the plugin installed, 
you can set fixed uptime for the instances to be alive. Post that, they 
will be destroyed.

/Ram

-- 
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/4c7cd662-b7cb-4f5c-b426-eceb237b45d3o%40googlegroups.com.


checkmarx plugin installation

2020-07-13 Thread Ramanathan Muthaiah
>From the update center, it is possible to install checkmarx plugin, the 
plugin version available is 8.90.4.

However, checkmarx releases page 
(https://github.com/jenkinsci/checkmarx-plugin/releases) shows many 
versions later than 8.90.4; however, there is no hpi files to download.

Has anything changed with the integration of checkmarx in Jenkins?

/Ram

-- 
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/21b488c0-7de8-419d-bdd4-2cd692c16277o%40googlegroups.com.


Re: [JNLP][Agent][Docker] connect an Agent to a Jenkins instance using self-signed certs

2020-04-14 Thread Ramanathan Muthaiah
On Monday, April 13, 2020 at 11:02:12 PM UTC+5:30, Ivan Fernandez Calvo 
wrote:
>
> I make it with JCasC, basically is a Docker compose with Jenkins, 
> openSAML, and a SSH Build Agent, it is what I use to test issues see 
> https://github.com/kuisathaverat/jenkins-issues/tree/master/jobDSL
>
> You have a bunch of examples on the JCasC demo folder
>
>
> https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/demos/build_agents/README.md
>

Thanks very much for sharing the info, will take a look.

/Ram 

-- 
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/841c4d48-e3ff-4d92-8883-1e3567e45d56%40googlegroups.com.


Re: [JNLP][Agent][Docker] connect an Agent to a Jenkins instance using self-signed certs

2020-04-13 Thread Ramanathan Muthaiah
On Saturday, April 11, 2020 at 5:43:28 PM UTC+5:30, Ivan Fernandez Calvo 
wrote:
>
> Hi,
>
> I have a Jenkins instance running (2.230, also I have tested LTS) on a 
> Docker container using only HTTPS with self-signed certificates, in the 
> same network I start an SSH Build Agent and a JNLP Agent, the SSH Build 
> agent connects
> without issues,
>

Am interested to know how you managed this config i.e. SSH connectivity 
from the master to external build agent or node.

For a while, I have been searching thru' docs, this forum and SO but could 
not find proper solution.

Would appreciate if you can pls outline the functional config or procedure.

/Ram 

-- 
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/f8c451bd-f71f-4e31-8f5f-46b3f0b11a6e%40googlegroups.com.


Re: Jenkins pipeline git branch push trigger

2020-02-23 Thread Ramanathan Muthaiah
On Tuesday, November 12, 2019 at 3:58:41 AM UTC+5:30, Jerome Godbout wrote:
>
> Hi,
> I'm using my Jenkins file pipeline to checkout and build, I have a 
> pipeline project I would like to get triggered only when a push to a 
> specific branch occur. The Git repos is host on bitbucket cloud services. I 
> cannot make a webhook, since the Jenkins run on an intranet and cannot be 
> access from the web.
>
> Is there a way to trigger on a push on release/test and not on master or 
> any other branch for example? how can I do this?
>
> my pipeline checkout look like this so far:
> checkout([$class: 'GitSCM'
> , branches: [[name: repos['branch']]]
> , browser: [$class: 'BitbucketWeb', repoUrl: repos['url']]
> , doGenerateSubmoduleConfigurations: false
> , extensions: [[$class: 'CloneOption', noTags: false], 
> [$class: 'LocalBranch', localBranch: "**"], [$class: 'SubmoduleOption', 
> disableSubmodules: false, parentCredentials: true, recursiveSubmodules: 
> true, reference: '', trackingSubmodules: false], [$class: 'CleanCheckout'], 
> [$class: 'CleanBeforeCheckout']]
> , submoduleCfg: []
> , userRemoteConfigs: [[credentialsId: 'BitBucketAmotus', 
> url: repos['url']]]
> ]);
>
>
 Maybe, you could add a check (prior to the checkout stage) for the 
incoming branch, if it's per the requirements, then move on to build other 
stages.

/Ram

-- 
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/fb0fc089-4ecf-4dcf-8318-cdfb54079614%40googlegroups.com.


Re: Jenkins pipeline jobs being triggered by github webhooks from wrong repository

2020-02-23 Thread Ramanathan Muthaiah
On Wednesday, February 12, 2020 at 10:22:30 PM UTC+5:30, James Robson wrote:
>
> I have 1 code repo that should be triggering jobs, and a separate repo for 
> a jenkins pipeline library. There are 2 jenkins jobs that use the ‘GitHub 
> hook trigger for GITScm polling’ build trigger, both are pipeline jobs 
> using the ‘Pipeline script from SCM’ with the repository configured to 
> point to the code repo and the ‘Branches to build’ set to ‘origin/develop’. 
> The pipeline library is used inside the pipelines for these jobs.
>
> I would expect these jobs to have their polling triggered by pushes to the 
> code repo, however they are only being triggered by pushes to the jenkins 
> pipeline library repo. 
>
>
> Using a log recorder set to get FINEST logs I can see:
>
> Received PushEvent for https://github.com/ 
> Considering to poke 
> Skipped  because it doesn't have a matching repository.
> ...
> Received PushEvent for https://github.com/
> Considering to poke 
> Poked 
>
>
>
> So something in jenkins seems to think these jobs do not use the code 
> repository, but when a scan is triggered I see the following in the 
> ‘Polling Log’:
>
> Started by event from 192.30.252.97
> ...
>  > git ls-remote -h https://github.com/ # timeout=10
>
>
> So the repo poll is using the code repo, and the list of commits that show 
> up in the ‘Changes’ list are from the code repo.
>
> It seems to be only these 2 jobs that are affected, no other job is being 
> triggered by pushes to the pipeline library repo. 
>
>
>
This sounds like some missing or incorrect config settings.

Also, if you are using declarative pipeline model in the code repo, this 
thread may be of some help to you.

https://stackoverflow.com/questions/42062481/how-to-trigger-a-jenkins-multibranch-pipeline-when-code-change-is-pushed-to-gith

/Ram

-- 
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/9572e01e-9104-4aa9-a26d-4a44a70ccc89%40googlegroups.com.


Re: i am trying a pipeline job where my first stage job returns a list of values which i should use to make list of parallel jobs in the second stage for each of the value

2020-02-23 Thread Ramanathan Muthaiah
On Saturday, February 22, 2020 at 1:16:00 AM UTC+5:30, amu ch wrote:
>
> Hi , 
>
> I used this following ; my first part itself is not working where i want 
> to save the return values from my first stage and use them in second stage. 
> i tried several methods none worked.   my first stage job just echo " 123 
> 234 345"  ; i tried setting environment variable also setenv versions="123 
> 234 345" echo $versions 
>
>
>
Why not save the return values to a file in the build workspace and use 
that file in the subsequent stages?

/Ram 

-- 
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/ce89935e-94c4-4bc7-b5e7-c4241bbd7c74%40googlegroups.com.


Re: shared library - hashmap error

2020-02-17 Thread Ramanathan Muthaiah

On Monday, February 17, 2020 at 8:06:57 PM UTC+5:30, judaondo wrote:
>
> Hello I have the following Shared Library:
>
> #!/usr/bin/env groovy
>
> import com.mycom.Logger
>
> /**
>  * Clone the selected git repository.
>  *
>  * Example usage within a declarative pipeline:
>  *
>  *steps {
>
>  *gitCheckout (["htpp://myrepo1.git": "branch1", 
> "htpp://myrepo2.git": "branch2"])
>  *}
>  *
>
>  * @param repositories (HashMap) git url and branch of the git project to be 
> downloaded.
>  */
> def call(repositories = ["htpp://myrepo1.git": "branch1", 
> "htpp://myrepo2.git": "branch2"]) {
> def logger = new Logger()
> for (repo in repositories) {
> def repository = repo.key
> def branch = repo.value
> def foldername = repository.tokenize('/')[-1].toLowerCase()
> logger.info("Clonning '${repository} - (${branch}
>  branch)' repository.")
> println("Foldername: " + foldername)
> println("Repository: " + repository)
> println("Branch: " + branch)
> checkout([$class: 'GitSCM', branches: [[name: branch]], 
> doGenerateSubmoduleConfigurations: false, 
> extensions: [
> [$class: 'CloneOption', depth: 1, noTags: false
> , reference: '', shallow: true], 
> [$class: 'RelativeTargetDirectory'
> , relativeTargetDir: foldername]
> ], 
> submoduleCfg: [], 
> userRemoteConfigs: [[credentialsId: 
> 'gittfscredentials', 
> url: repository]]])
> } // endfor
>
> }
>
>
> When using it in Jenkins pipeline 
>
> #!/usr/bin/env groovy
>
> @Library('mylib')
>
> import com.mycom.*
>
> pipeline {
> agent { label 'master' }
>
> options { 
> timestamps ()
> disableConcurrentBuilds()
> }
>
> stages {
> stage('Checkout') {
> steps {
> gitCheckoutMultipleRepositories()
> }   
> }
> }
> 
> }
>
>
>
> I get the following error:
>
>
> **
>
> *00:00:00.963*  INFO: Clonning 'htpp://myrepo1.git - (branch1 branch)' 
> repository.[Pipeline] echo 
> *00:00:00.972*
>   Foldername: myrepo1.git[Pipeline] echo 
> *00:00:00.980*
>   Repository: htpp://myrepo1.git[Pipeline] echo 
> *00:00:00.987*
>   Branch: branch1[Pipeline] checkout 
> *00:00:00.998*
>   using credential gittfscredentials*00:00:01.002*   > git rev-parse 
> --is-inside-work-tree # timeout=10*00:00:01.010*  Fetching changes from the 
> remote Git repository*00:00:01.010*   > git config remote.origin.url 
> htpp://myrepo1.git # timeout=10
> *00:00:01.018*  Using shallow fetch with depth 1*00:00:01.018*  Fetching 
> upstream changes from htpp://myrepo1.git*00:00:01.018*   > git --version # 
> timeout=10[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // 
> ansiColor[Pipeline] }[Pipeline] // timestamps[Pipeline] }[Pipeline] // 
> node[Pipeline] End of Pipelinean exception which occurred:
>   in field com.cloudbees.groovy.cps.impl.BlockScopeEnv.locals
>   in object com.cloudbees.groovy.cps.impl.LoopBlockScopeEnv@469abe44
>   in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
>   in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@71325a45
>   in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
>   in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@4955b455
>   in field com.cloudbees.groovy.cps.impl.CallEnv.caller
>   in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@451fb812
>   in field com.cloudbees.groovy.cps.Continuable.e
>   in object org.jenkinsci.plugins.workflow.cps.SandboxContinuable@747dbee2
>   in field org.jenkinsci.plugins.workflow.cps.CpsThread.program
>   in object org.jenkinsci.plugins.workflow.cps.CpsThread@4b1cbc4d
>   in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.threads
>   in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@4312dc7f
>   in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@4312dc7f
> Caused: java.io.NotSerializableException: java.util.LinkedHashMap$Entry
>   at 
> org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:926)
>   at 
> org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
>   at 
> org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
>   at 
> org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
>   at 
> org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(Ri

Git(hub) plugin and triggering freestyle build based on comment string in PR

2020-02-17 Thread Ramanathan Muthaiah

In our enterprise setup, we have bunch of 'freestyle' jobs that use Github 
pullrequest builder plugin (GHPRB)   -- 
in the config of these jobs, it it setup to look for certain words in the 
incoming pull requests (PRs). This setup is working without any problems.

We want to consolidate the use of such external plugins. Specifically, to 
move away from GHPRB plugin and start using the suite of plugins related to 
Git, and Github.

However, it seems migrating the freestyle jobs to re-use (already installed 
and used for pipeline build jobs) the suite of Git and GitHub plugins, it 
is not possible(?) to trigger fresh builds for the incoming PR by scanning 
the comments. Is this true (that this functionality cannot be achieved with 
this combination of freestyle + git* plugins)? 

Would be interested to know if anyone has explored this and got it working?

/Ram

P.S: 

Eclipse' CI infra hosts several builds jobs for JGit. One among them is 
pipeline style build setup -- 
https://ci.eclipse.org/jgit/job/stable/job/jgit.gerrit-pipeline/. In the 
landing page, it is claimed that ". . . can also be triggered by a comment 
containing "trigger build" "

-- 
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/c0670f72-871a-4fc8-9720-7acd41809fb5%40googlegroups.com.


Access build duration in 'freestyle' jobs, for use in mail notifications

2020-01-12 Thread Ramanathan Muthaiah
Hi Folks,

New Year wishes to all of you.

Few weeks back, I migrated a production instance of Jenkins from v2.32 
(legacy infra inherited few years back) to v2.190. 

Post successful upgrade, some of the jobs, hosted in this instance, are 
unable to compute(?) BUILD_DURATION -- this is manifested in the mail 
notification that's sent out as part of mail triggered via the "post-build 
actions" section.

Does anyone know if "BUILD_DURATION" parameter is available by any other 
name or this could be caused due to missing plugin?

As a workaround, I can record start and end times and do some math. But 
this step may have to repeated across 10+ jobs and, personally, I want to 
avoid such repetitive tasks.

Another option could be using email templates written in Groovy -- any 
pointers to this would be welcome too.

--
Warm Regards,
Ram

-- 
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/3d1dede0-d4e4-4046-8300-d83e85538930%40googlegroups.com.


Re: Why does my pipeline have 2 workspaces?

2019-09-01 Thread Ramanathan Muthaiah
On Wednesday, August 28, 2019 at 4:18:13 PM UTC+5:30, Toby Hersey wrote:
>
> Thanks Ram , is that the same for the @2 folders as well?
>
> Or is that because a build has run 2 in parallel?
>

Could be a possibility.

/Ram 

-- 
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/2ac28b0e-832e-4af5-a908-f24bb0dacbfe%40googlegroups.com.


Re: how to ignore jenkisnfile from polling for pipeline jobs

2019-09-01 Thread Ramanathan Muthaiah
On Saturday, August 31, 2019 at 12:24:00 AM UTC+5:30, SADHAN wrote:
>
> the problem i am seeing is if i add polling for the source code repo using 
> checkout function of jenkinsfile, the job is getting triggered for the 
> source code changes and also for the jenkisnfiles changes though both are 
> in different Repos.
> How do we avoid the polling for jenkisnfiles.
>
> I tried to add "ignore from user" but it dint work, i tried to add "ignore 
> from paths" it also dint work.
>

Sharing a tidbit of what I did earlier to avoid triggering fresh builds 
jobs for changes in Jenkinsfile -- you may need additional logic to process 
the changeset, i.e. checkout the repo, gather the list of changed files ( 
this will help to determine if the changeset includes only Jenkinsfile), 
and then take the necessary action.

/Ram

-- 
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/47c364c8-4ef5-430f-8945-46a35efa3f90%40googlegroups.com.


Re: Why does my pipeline have 2 workspaces?

2019-08-27 Thread Ramanathan Muthaiah
On Wednesday, August 28, 2019 at 12:42:44 AM UTC+5:30, Toby Hersey wrote:
>
> i'll third the question , i want to know cause.
>

In short:

The second (temporary) workspace is the area that's used by the pipeline to 
handle all of the code within the 'sh' step.

Based on what I analyzed, the pipeline creates a .sh file in that temporary 
workspace, the script's contents are what's there inside the 'sh' step. 
Apart from the shell script, in that temp workspace, there are few more 
files (in the tmp folder) for the purpose of pipeline durability.

HTH.

/Ram
 

-- 
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/288661f4-887a-4ba4-b178-671bd2bf52d6%40googlegroups.com.


Re: How to override "Shell executable" in declarative JenkinsFile

2019-08-22 Thread Ramanathan Muthaiah
On Tuesday, August 6, 2019 at 8:31:45 PM UTC+5:30, Jérémie Faucher-Goulet 
wrote:
>
> Hi, I find myself in a bit of a bind and would like suggestions on how to 
> move forward with our Jenkins cluster.
>
> We've recently updated from a 3 year old version to start using all the 
> beautiful pipeline plugins stuff, but would like to slowly transition our 
> hundreds of job over time. The first part worked without too many issues 
> and our old jobs are running fine on the updated cluster (1 master + 7 
> slaves). However I seem to be stuck in regards to the shell executable.
>
> Currently, it is defined as an environment variable in our Jenkins global 
> configuration. In this manner:
> Shell executable: ${SHELL_EXEC}
>
> Not far above, we have a default value which is defined globally, pointing 
> to a location where we have MSYS available on most windows slaves.
>
> Each Linux slaves override this environment variable in this manner in 
> their node configuration:
> SHELL_EXEC=/bin/sh
>
>
> When I put a "sh" step in my new declarative file, I get a on a Linux 
> node/agent:
>
> *sh: 1: ${SHELL_EXEC}: not found*
>
>
> I read somewhere that environment variables defined in the slave node 
> configuration are not taken into account when using Jenkins pipeline. A pity. 
> So I did the following tests
>
> I tried using a environment block:
>
> stage {
> environment {
> SHELL_EXEC = '/bin/sh'
> }
> steps {
> sh 'echo "Something"'
> }
> }
>
>
>
> But it doesn't work and I get the same error. I also tried using 'withEnv' 
> this way:
>
>
> stage {
> steps {
> withEnv(["SHELL_EXEC='/bin/sh'"]) {
> sh 'echo "This is a print test"'
> }
> }
> }
>
>
> And I also get the same error.
>
>
>
> Does anyone have any suggestion on how to override the 'Shell executable' 
> currently set in the global jenkins configuration? I would like to make the 
> transition to Jenkins Pipeline as easy as possible and not having to 
> reconfigure 100+ jobs manually just so I can blank this global setting.
>
>
Not sure how this can solve your problem, but check this note here, 
https://support.cloudbees.com/hc/en-us/articles/215171038-How-do-I-run-a-different-Shell-interpreter-in-a-Pipeline-Script
 

/Ram

-- 
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/4339ab15-52bc-45a9-966b-d5d94ed2c821%40googlegroups.com.


Re: Why does my pipeline have 2 workspaces?

2019-08-22 Thread Ramanathan Muthaiah

>
> I've noticed that my single pipeline ends up with 2 separate workspaces 
> each time it runs.
> What is the one ending in @script for?
>

With no intent of grandstanding, this response will direct you to one of my 
article in dzone.com.

Hope your questions are answered here, 
https://dzone.com/articles/tips-to-debug-jenkins-v2x-pipeline-scripts-part-2
 

/Ram

-- 
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/a03cfc18-5433-4b32-9251-e0c95a5c83eb%40googlegroups.com.


Re: Error in Manage Jenkin page

2019-06-09 Thread Ramanathan Muthaiah

>
>
> I'm very new to Jenkins and i am seeing below error message when i trying 
> to configure Plugin.  Any help really appreciated. 
>
> There were errors checking the update sites: SSLHandshakeException: 
> sun.security.validator.ValidatorException: PKIX path building failed: 
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certific
>
>
These links might be of some use to you.

https://blogs.oracle.com/blogbypuneeth/steps-to-create-a-jks-keystore-using-key-and-crt-files

http://sam.gleske.net/blog/engineering/2016/05/04/jenkins-with-ssl.html

/Ram

-- 
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/244f2220-57d4-448c-ab9b-e209c6623406%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins GitLab Config for Posting Status of Build to GitLab - 404 Bad Request

2019-05-22 Thread Ramanathan Muthaiah
Hi,
>
>   I've got our Jenkins setup with the GitLab plugin v 1.5.11 and I'm 
> trying to get it to communicate with private GitLab EE v 11.9.0.
>
>   Jenkins can do all the basic stuff with git here.. Clone, Webhooks to 
> initiate build, etc., but I'm trying to set it up such that it tells gitlab 
> the status of the branch's build.  I thought that the Jenkins GitLab plugin 
> could help with this.  
>
>When I setup the Connection in Jenkins Configuration, and click Test 
> Connection - I just get a 404 Bad Request... 
>
>When I check the logs, the most notable thing I see is "Warning: no 
> suitable certificate found - continuing without client authentication".
>

Not familiar with GitLab config options, so, pls ignore if this note is 
irrelevant.

Will it help if the user (that does the build, can clone the repo, etc.) as 
one of the members in the specific repo within GitLab?

/Ram

-- 
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/8cb5fab2-5324-402a-be4f-e477d788b4f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ERROR : Unable to find build script

2019-05-08 Thread Ramanathan Muthaiah
On Wednesday, May 8, 2019 at 1:59:02 AM UTC+5:30, Praveen kumar wrote:
>
> Hi 
>
> When I am trying to build the code in Jenkins with SVN by invoking ANT, I 
> am facing the below error
>
> ERROR : Unable to find build script at C:\Program 
> Files\Jenkins\workspace\sampleproject\trunk\build.xml
>
> Finished: FAILURE
>
>
> Please do the needful.
>
>
To me, the intent and the tone of your mail does not indicate one that's 
seeking assistance. 

What have you done to debug the problem before reaching out to this forum?

/Ram

-- 
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/534ae19b-b326-4991-815c-5e5efc7107c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Scripted Multi-branch Pipeline: Is it possible to have different build numbering schemes?

2019-05-06 Thread Ramanathan Muthaiah
Hi,

Am looking at having different build numbering schemes - one for timer 
triggered and another for builds triggered via git events.

As of now, I cannot install any new plugin as that might force us to 
upgrade Jenkins -- ours is quite older version and the upgrade is long 
overdue.
However, am exploring the possibility of having this customization handle 
via Groovy code.

So, what's the need for different build numbering scheme?

a) Codebase (repo hosted in github enterprise) receives commits on 'master' 
-- this should generate artefacts. However, timer triggered build should 
not for this codebase.

b) We are running Jenkins v2.x Pipeline with multi-branch setup and shared 
library. So, essentially, 'master' branch shares the Groovy library with 
another 'dev' branch in the same code repo. This Groovy library (in 
scripted pipeline) triggers the build for both the branches at the 
specified time, does a branch check; if the branch is 'dev' proceed 
further, but will stop if the branch is 'master'. However, in the latter 
case, build number gets incremented and that's not the desired behavior 
(per project requirements).

c) Jenkinsfile in the codebase sets a bunch of params with default values 
using Groovy closure. This is picked by the Groovy library (i.e. 
vars/buildCodeArtefacts.groovy)

buildCodeArtefacts{
param1 = "value1"
VERSION = "0.2"
}



Are there better ways to handle this than the idea of different build 
numbering scheme?

/Ram

-- 
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/d123bb07-cc1b-4ab7-91ee-e8e23ad818e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pass the data thru variable using curl command

2019-01-21 Thread Ramanathan Muthaiah

>
> My request is here below:-
>
> def status = "curl -s --max-time 30 POST 'https:url'" -H "Content-type: 
> application/json" -d {"DeAppRulesList": 
> [{"Applion":"02.01.02","Applime":"REFW"},{"Applion":"01.01.01","Applime":"ATP_Branch"},{"Applion":"01.06.07","Applime":"Temp_FW"}]}'
>
> No error and no response received.
>

Start simple, then expand. Also, I presume you should adjust the cmd, to be 
like, "curl . . . -X POST".

Avoid using "-s" option during the initial trials. man curl is your best 
help.

Remember, getting curl working from CLI and in an automated env like 
Jenkins involves several iterations, depending on the complexity (speaking 
from my personal experience).

/Ram 

-- 
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/40965178-7ef0-4f58-b8d1-9f1ea828108a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Logging using fluentd, with Jenkins (stdout, stderr) running in a container

2019-01-13 Thread Ramanathan Muthaiah
Hey,

On a CentOS vm, am running fluentbit (as td-agent) configured with basic 
options.

1. Running a simple ubuntu container with a) /bin/bash or b) /bin/echo 
"Hello World" echoes the output (from the container) in the td-agent log 
at, /var/log/td-agent/td-agent.log

docker run -d -ti  --name  echome  ubuntu:latest  --log-driver=fluentd   --
log-opt  tag=docker.{{ID}}  /bin/bash

docker run -d -ti  --name  echome  ubuntu:latest  --log-driver=fluentd   --
log-opt  tag=docker.{{ID}}  /bin/echo "Hello World"


2. However, in my attempt to run Jenkins in a container, logs (from the 
running container) do not show up in the td-agent logs in '/var' folder.
docker run -d -ti  --name  cijenkins  jenkins/jenkins:lts  --log-driver=fluentd 
  --log-opt  tag=docker.{{ID}}  /bin/bash


Would appreciate any inputs or comments.

--
regards
Ram

-- 
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/24b6ed81-8d25-4140-9bc4-58ab03403232%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Variables and parallel stages

2018-12-26 Thread Ramanathan Muthaiah

>
> Assuming I have a Jenkinsfile similar to the following (high-level),
> Can I use the variables in the parallel stages, when each of the parallel 
> stages is running a different agent?
>

AFAIK, this is possible as long as the variables are declared globally.

/Ram 

-- 
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/11adedb0-09d6-43fb-a899-1fab85ef0417%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


???,??,

2018-10-18 Thread Ramanathan Muthaiah


-- 
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/CAGBd0eqYH4RC-JQ%2BpD70urJVMwMtqmER0M6oA7L1rUHY-kWS7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: to get the code from the git

2018-10-16 Thread Ramanathan Muthaiah
On Tuesday, October 16, 2018 at 2:46:48 PM UTC+5:30, robert@ithands.biz 
wrote:
>
> hi team 
> i need to get the code from git this is what i have done so far 
>
> node {
>   stage('preperation')
>  git branch: 'master',
>  git 'https://github.com/robert-rajendra/test.git'
>
>
> }
>
> this is a public and what if i want to get the code from a private repo 
> with the help of ssh keys
>

Google search returned this, 
https://stackoverflow.com/questions/52776964/proper-way-for-handling-ssh-keys-to-clone-private-repos

BTW,  check out this for examples on various steps, including using git,
https://github.com/jenkinsci/pipeline-examples/tree/master/pipeline-examples


/Ram 

-- 
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/f77f35b2-e727-4502-8346-43e757d155a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to change jenkins server time zone?

2018-10-15 Thread Ramanathan Muthaiah

>
> But i want to change jenkins time zone to US-EST time zone?
> *How to change jenkins server time zone?*
>

https://wiki.jenkins.io/display/JENKINS/Change+time+zone

did you try this ?

/Ram

-- 
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/e615eb2f-61aa-4be6-8fbb-5ce621515645%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git checkout failed on slave

2018-10-15 Thread Ramanathan Muthaiah

>
> I have one master node and a slave node I run my Jenkins jobs unto and I 
> encountered a problem recently. I am unable to checkout a repository from 
> Git on my slave through a Jenkins pipeline. Locally, checking out a branch 
> on my repository works fine, cloning, pushing, pulling, everything works. 
> But if I try to do the same operations through a Jenkins pipeline, the 
> stage at which I clone my repo fails with "Could not checkout branch: 
> [branch] with start point [start point]". This is the command I clone my 
> repo with: git branch: '**', credentialsId: '[credential]', url: 
> 'repo_link' . I use a global credential, which makes me think this is not a 
> credential problem, but something else that I am not aware of right now. 
>

1) If you can 'ssh to the node', using the same credentials, can you 
checkout the repo ?

2) In the Git repo, if accessible via Github UI or some form of UI, does 
the user have necessary privileges to clone ?

3) Remember, when the build happens in the agent node, it runs as a user 
different from your user id.

/Ram

-- 
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/03b28186-08d0-41f5-9be7-71c304e242b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline build not stopping when stage marked as failed

2018-10-15 Thread Ramanathan Muthaiah
Most likely, you need this 'error 

'.

/Ram

On Thursday, October 4, 2018 at 1:36:03 PM UTC+5:30, Paul D'Ambra wrote:
>
> I have a declarative Jenkins pipeline that in a parallel stage runs the 
> dependency check plugin. With their support 
> 
>  I 
> have the plugin configured so that if a certain number of new 
> vulnerabilities are detected it fails the build.
>
> However, even though the build is marked as failed in Jenkins the pipeline 
> is running on past that stage.
>
> So, the build is marked as failed *and* the artefact has been deployed 
> into an environment!
>
> The plugin authors believe this is either the analysis plugin or Jenkins 
> at fault. But I don't know how to investigate further. Can anyone here 
> provide advice?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b91a6b50-360f-4bc3-9d7f-db78e86d92cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting cause for branch indexing in multibranch pipeline

2018-08-23 Thread Ramanathan Muthaiah
Thanks Sverre Moe, you made my day !

Here is the final version of the code snippet. 
 

> import jenkins.branch.BranchIndexingCause
>
> final def jenkinsInstance = jenkins.model.Jenkins.getInstance()
> final def jenkinsProject = jenkinsInstance.getItemByFullName(
> jenkinsProjectName)
> if (jenkinsProject != null) {
> final def job = jenkinsProject.getAllJobs().first()
> final def lastBuild = job.getLastBuild()
> final def causes = lastBuild.getCauses()
> final def buildCause = causes.first()
> if (buildCause instanceof BranchIndexingCause) {
>
> }
> }
>

/Ram

-- 
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/de24c1bf-16b2-49fa-a566-9e37fd7936fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Getting cause for branch indexing in multibranch pipeline

2018-08-21 Thread Ramanathan Muthaiah
Am referring to this API doc to find out which method should be used to 
identify the reason for a build job to be triggered.

http://javadoc.jenkins-ci.org/hudson/model/class-use/Cause.html

Would appreciate if anyone on this list could point me to the relevant 
method ?

For some strange reason, GHE org folder config (in prod Jenkins) does not 
have periodic triggering / scanning (that initiates branch indexing) but 
the detected repos have that option enabled !!!

--
regards
Ram

-- 
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/fd4d933a-7240-4ebe-a3b9-78c793e54626%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to know if the pull requests are trusted ?

2018-08-06 Thread Ramanathan Muthaiah
Hello,

We're running Jenkins v2.32.2 (agreed, it's very very old, but this is in 
the enterprise) and am trying to setup multibranch for one of Git repos 
(hosted in github enterprise - GHE).

For every build job, triggered by Jenkins multibranch, pipeline kicks in 
but Jenkinsfile changes in PR branch isn't picked but from 'master' !

I have searched thru' cloudbees knowledge base, and various other forums. 
GHE user, who created the PR, has 'write' access in that GHE repo.

Inspite of this config and setup, PR builds are falling back to Jenkinsfile 
from the 'master'. Is there a way to know what trust is lacking and how to 
fix this issue ?

/Ram

-- 
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/03a7b327-f8ca-4eb2-ad32-e023bdace027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I trigger jenkins job if a pull request is merged in github

2018-08-04 Thread Ramanathan Muthaiah
On Saturday, August 4, 2018 at 1:36:39 AM UTC+5:30, jsake...@gmail.com 
wrote:
>
> I want to use only pullrequestevent, so when a pull request is merged, it 
> should run a script or hook, which would do all the checks like
> if a pull request is merged or not / if teh branch is release or not etc.
> if teh condition satisfies, it shoud run the jenkins job
>

Pick and choose the events to be sent over from GH to Jenkins. For the rest 
of the checks, you can write Groovy scripts.

If you need help, refer to doc on shared libraries -- with that, your 
Groovy code can scale and serve multiple projects, if they all follow the 
same workflow as you outlined.

-- 
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/0885bb3e-df21-4ffc-b23d-9dd483d30cd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I trigger jenkins job if a pull request is merged in github

2018-08-03 Thread Ramanathan Muthaiah

>
> We don't use multi branch pipeline. But , we use pipeline Jenkins job 
> written in jenkisnfile.
> I want to know the steps to do on github and jenkinsfile side to trigger 
> the Jenkins job if a pull request is merged to a particular branch.
>

Multibranch (or GHE organization, if you prefer) is the way to go for this, 
saves you from setting up that many projects for each branch. In GH, select 
all the events to be sent to your Jenkins.

If you choose multibranch, there will be additional steps in the branch 
selection, what to do with origin and fork PRs.

/Ram 

-- 
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/648c60ab-4e2c-4060-9d50-e5c1c5798407%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins failure at continuous integration

2018-05-23 Thread Ramanathan Muthaiah

>
> "C:\Program Files (x86)\Jenkins\workspace\Trivium 2015\Trivium 2015.sln" 
> (default target) (1) ->
> "C:\Program Files (x86)\Jenkins\workspace\Trivium 
> 2015\Trivium.Common\Trivium.Common.csproj" (default target) (2) ->
> (CoreCompile target) -> 
>   Utils\Mail\Sender.cs(15,30): error CS1056: Unexpected character '$' 
> [C:\Program Files (x86)\Jenkins\workspace\Trivium 
> 2015\Trivium.Common\Trivium.Common.csproj]
>   Utils\Configuration\SzamlazoConfiguration.cs(103,56): error CS1056: 
> Unexpected character '$' [C:\Program Files (x86)\Jenkins\workspace\Trivium 
> 2015\Trivium.Common\Trivium.Common.csproj]
>
> 3 Warning(s)
> 2 Error(s)
>
> Time Elapsed 00:00:00.62
> Build step 'Build a Visual Studio project or solution using MSBuild' marked 
> build as failure
> Finished: FAILURE
>
>
Please be considerate of the size of the error logs that you post ; trim 
them as you see fit, after initial troubleshooting at your end.

On a quick scan, there is no signature related to Jenkins, error is from 
some csproj.

/Ram

-- 
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/503d153f-85e8-46ef-8563-e611c5ac2abb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trying to pass a value from a shell variable to the next shell command (failed)

2018-05-23 Thread Ramanathan Muthaiah

>
> stage('Build image') { 
> steps {
> sh 'TAG=$(git describe --candidate=1 --tags)'
> sh 'TAG=$(echo $TAG | cut -d\'-\' -f 1)'
> sh 'WEB_IMAGE_NAME=' + env['ACR_LOGINSERVER'] + 
> '/my-project-1499882073260/test:' + env['TAG']
> 
> sh 'sudo docker build -t ${WEB_IMAGE_NAME} -f 
> WebApplication/WebApplication1/Dockerfile WebApplication/.'
> }
> }
>

How about like this ?

def tag = sh (returnStdout: true, script: "git describe --candidate=1 
--tags").trim() 
env.TAG = sh (returnStdout: true, script: "echo ${tag} | cut -d\'-\' -f 1").
trim()

I haven't tested this code though, so, cannot guarantee it's success or 
failure, you may want to tweak and customize according to your needs. But, 
it's worth looking at / using the 'sh' step's return status and output.

Remember to use them inside 'script' block if you're using Declarative 
syntax.

/Ram

-- 
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/44d030af-6af6-4f5a-815b-030e89fc5e3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while fetching all of the branches of Jenkins

2018-05-21 Thread Ramanathan Muthaiah

>
> hudson.plugins.git.GitException: Command "git.exe ls-remote --symref " 
> returned status code 128:
> stdout: 
> stderr: Load key "C:\\WINDOWS\\TEMP\\ssh1754654608932235849.key": invalid 
> format
> Permission denied, please try again.
> Permission denied, please try again.
> Received disconnect from 192.168.10.8 port 22:2: Too many authentication 
> failures
> Disconnected from 192.168.10.8 port 22
> fatal: Could not read from remote repository.
>
>
So, you know what's causing the failures ?

/Ram 

-- 
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/794d7cad-a68b-4b1b-b9ed-b44c6645e410%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to run Jenkins inside docker container through ansible

2018-05-21 Thread Ramanathan Muthaiah

>
> This is starting the container but not able to run jenkins due to which i 
> am not able to login to jenkins host.
>
> Can anyone guide me what do to ?
>

Have you looked at the Docker container logs? 

/Ram

-- 
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/8d2fb2ec-0bb7-435d-a361-24856b0f0603%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline script : Run job once the first job finishes.

2018-05-21 Thread Ramanathan Muthaiah

>
>  node {
>
> stage('Build Virtual Machine') {
>
>
>
> build job: 'Misc_Jobs/VM_Request_And_Validation', parameters: [
>
> string(name: 'Hostname', value:'satclient8'),
>
> string(name:'DSType', value: "NAS")], wait: true
>
>
>
> }
>
> stage('Post Installation Stage') {
>
>
>
> build job: 'Misc_Jobs/SS_Install_Jboss', parameters: [
>
> string(name: 'Hostname', value:'satclient8'),
>
> string(name:'DSType', value: "NAS")]
>
>
>
> }
>
> }
>
>  
>
>  
> However I observed that the second job start running immediately after the 
> first one.
>

Have you looked at flow 
control, https://jenkins.io/doc/book/pipeline/syntax/#flow-control ?

Another option is to use 'when' 
directive, https://jenkins.io/doc/book/pipeline/syntax/#when

/Ram 

-- 
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/4ea1006a-63c8-4359-9742-039c00f947fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Environment Variable from ITCDM to pass Jenkins Job as parameter

2018-04-29 Thread Ramanathan Muthaiah
I suppose, many in the list may not know what is ITCDM ?

/Ram

-- 
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/7acea609-3426-42e4-a99e-8af62f3ebb15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to use Folder-level Shared Libraries in Declarative Jenkinsfile

2018-04-27 Thread Ramanathan Muthaiah
If you are looking to load Groovy files from your project repo, try the 
load step.

This SO 

 
thread may have more answers for you.

/Ram

-- 
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/caeafb90-c0d5-40b5-bd5a-5f5b0e171555%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of withCredential on Slave Node

2018-04-27 Thread Ramanathan Muthaiah

>
> The premable to my Jenkinsfile looks like
>
> try {
>
> node("linux") {
>
>   withCredentials([[$class: 'UsernamePasswordMultiBinding', 
> credentialsId: 'REDACTED',
> usernameVariable: 'REDACTED_USER', passwordVariable: 
> 'REDACTED_PASSWORD']]) {
>
>
>
> When I run the job without the node label, everything works fine, as it 
> runs on Master.With the node specification I get a failure related to 
> failed auth.
>
> My general question is do I need to do anything to make the credentials 
> plugin work with slave nodes?
>
> I don't think any special handling is needed in the build agent.

Can you try this in your pipeline script ?

withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 
'jiracreds', usernameVariable: 'JIRAUser', passwordVariable: 'JIRAPwd']]) {
 withEnv(["JIRA_USERNAME=${JIRAUser}",
 "JIRA_PASSWORD=${JIRAPwd}",
 "JIRA_TICKET=${item}"]) {

   }
 }

/Ram 

-- 
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/0314c061-7331-4737-830e-923cb70ce9cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to pass Jenkins env variables in SaltStack Jenkins plugin

2018-03-24 Thread Ramanathan Muthaiah
If you need to access environment variables in saltstack, aren't there any 
methods to access them.

I have not used saltstack but you should the tool's documentation to 
understand how to access env vars. Using such provision, you should access 
env var rather than passing to saltstack.

/Ram

On Thursday, March 22, 2018 at 6:22:16 PM UTC+5:30, varun bhatnagar wrote:
>
> Hi,
>
> I am trying to use SaltStack with Jenkins and I have installed and 
> configured SaltStack plugin for the same. I want to pass BUILD_ID 
> environment variable as a pillar during the build and in-order to achieve 
> that I have passed this in the *Arguments - "pillar={"build_id": '{{ 
> BUILD_ID }}' }"* but in the output the whole  string (i.e. *BUILD_ID*) 
> gets printed.
>
> This is how my SLS file looks like:
>
> Info message:
>   module.run:
> - name: test.echo
> - text: "{{ pillar['build_id'] }}"
>
> Any idea how can this be achieved?
>
> BR,
> Varun
>

-- 
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/552c77bd-a334-4ec4-bd77-2c2a9d5c8c95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ECS slave to agent connection fails due to JNLP's SSL engine errors

2018-03-24 Thread Ramanathan Muthaiah
Hello,

In my AWS setup, we have two separate clusters – one for master, another 
for agent. But both are in same vpc, subnet, and have security group 
assigned. Other than this, there is no other fancy stuff going on here, 
like, ELB, SSL certs (all communication happens over http, its a private 
setup).


1) I have configured ecs plugin – jenkins agent cluster is used here with 
url pointing to private ip of master, added simple cloudbees template with 
task ARN and given the template a label that can be used in the pipeline.


2) When the pipeline is triggered, master, using the plugin config, spins 
up a new task dynamically and starts a container in one of the instances 
attached to agent cluster. But, the agent to master connection is broken 
with the error -- snippet of docker logs from the slave agent where the ecs 
task spins up a new container. 


>>> Logs from the Docker container running in ECS 
agent 

INFO: Agent discovery successful

  Agent address: 172.31.44.131

  Agent port:5

  Identity:  a6:ed:4e:67:6d:e8:0e:53:32:51:8a:b5:80:06:4a:83

Mar 24, 2018 7:08:50 AM hudson.remoting.jnlp.Main$CuiListener status

INFO: Handshaking

Mar 24, 2018 7:08:50 AM hudson.remoting.jnlp.Main$CuiListener status

INFO: Connecting to 172.31.44.131:5

07:08:50.931 INFO - Using the passthrough mode handler

Mar 24, 2018 7:08:50 AM hudson.remoting.jnlp.Main$CuiListener status

INFO: Trying protocol: JNLP4-connect

2018-03-24 07:08:50.974:INFO:osjs.Server:main: jetty-9.4.5.v20170502

2018-03-24 07:08:51.028:WARN:osjs.SecurityHandler:main: 
ServletContext@o.s.j.s.ServletContextHandler@5a8e6209{/,null,STARTING} has 
uncovered http methods for path: /

2018-03-24 07:08:51.038:INFO:osjsh.ContextHandler:main: Started 
o.s.j.s.ServletContextHandler@5a8e6209{/,null,AVAILABLE}

2018-03-24 07:08:51.076:INFO:osjs.AbstractConnector:main: Started 
ServerConnector@e4423f5{HTTP/1.1,[http/1.1]}{0.0.0.0:}

2018-03-24 07:08:51.077:INFO:osjs.Server:main: Started @857ms

07:08:51.077 INFO - Selenium Server is up and running

*Mar 24, 2018 7:08:51 AM 
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer onRecv*

*SEVERE: [JNLP4-connect connection to 
ip-172-31-44-131.us-west-2.compute.internal/172.31.44.131:5]*

*javax.net.ssl.SSLHandshakeException: General SSLEngine problem*

*at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1478)*

*at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)*

*at sun.security.ssl.SSLEngineImpl.writeAppRecord(SSLEngineImpl.java:1214)*

at sun.security.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:1186)

at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:469)

at 
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processRead(SSLEngineFilterLayer.java:392)

at 
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecv(SSLEngineFilterLayer.java:117)

at 
org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecv(ProtocolStack.java:669)

at 
org.jenkinsci.remoting.protocol.impl.AckFilterLayer.onRecv(AckFilterLayer.java:255)

at 
org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecv(ProtocolStack.java:669)

at 
org.jenkinsci.remoting.protocol.NetworkLayer.onRead(NetworkLayer.java:136)

at 
org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$2200(BIONetworkLayer.java:48)

at 
org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:283)

at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at hudson.remoting.Engine$1$1.run(Engine.java:98)

at java.lang.Thread.run(Thread.java:748)

>>>



= Logs from the master ==

Mar 24, 2018 7:07:40 AM hudson.slaves.NodeProvisioner$StandardStrategyImpl 
apply

INFO: Started provisioning ECS Slave ecs-build from ecs-agent-cluster with 
1 executors. Remaining excess workload: 0

Mar 24, 2018 7:07:40 AM com.cloudbees.jenkins.plugins.amazonecs.ECSService 
waitForSufficientClusterResources

INFO: Found 2 instances

Mar 24, 2018 7:07:40 AM com.cloudbees.jenkins.plugins.amazonecs.ECSService 
waitForSufficientClusterResources

INFO: Resources found in instance 
arn:aws:ecs:us-west-2:316675405544:container-instance/036e70cb-9c10-4c65-a2f4-2561aa77ac7b:
 
[{Name: CPU,Type: INTEGER,DoubleValue: 0.0,LongValue: 0,IntegerValue: 
2048,StringSetValue: []}, {Name: MEMORY,Type: INTEGER,DoubleValue: 
0.0,LongValue: 0,IntegerValue: 3952,StringSetValue: []}, {Name: PORTS,Type: 
STRINGSET,DoubleValue: 0.0,LongValue: 0,IntegerValue: 0,StringSetValue: 
[22, 2376, 2375, 51678, 51679]}, {Name: PORTS_UDP,Type: 
STRINGSET,DoubleValue: 0.0,LongValue: 0,IntegerValue: 0,StringSetValue: []}]

Mar 24, 2018 7:07:40 AM com.cloudbees.jenkins.plugins.amazonecs.ECSService 
waitForSufficientClusterResources

INFO: Instance 
arn:aws:ecs:us-west-2:316675405544:container-instance/036e70cb

Re: Git Plugin Issues

2018-03-03 Thread Ramanathan Muthaiah

>
>  Here are the errors we are running into (Credentials *Unix BitBucket 
> Groovy* are the name of the credentials commonly used across all 
> platforms):
>
>  
>
> Building remotely on *XXXJENKINSNODEXXX* in workspace 
> d:\scm\checkout\John-Test
>
>  > D:\SCM\Apps\Git\2.8.2\bin\git.exe rev-parse --is-inside-work-tree # 
> timeout=10
>
> Fetching changes from the remote Git repository
>
>  > D:\SCM\Apps\Git\2.8.2\bin\git.exe config remote.origin.url 
> ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git # timeout=10
>
> Fetching upstream changes from 
> ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git
>
>  > D:\SCM\Apps\Git\2.8.2\bin\git.exe --version # timeout=10
>
> using GIT_ASKPASS to set credentials *Unix Bitbucket Groovy*
>
>  > D:\SCM\Apps\Git\2.8.2\bin\git.exe fetch --tags --progress 
> ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git 
> +refs/heads/*:refs/remotes/origin/*
>
> *ERROR: Error fetching remote repo 'origin'*
>
> *hudson.plugins.git.GitException: Failed to fetch from 
> ssh://g...@bitbucket..com:7999/projectname/reponame.git 
> *
>
> at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
>
> at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
>
> at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
>
> at hudson.scm.SCM.checkout(SCM.java:495)
>
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)
>
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
>
> at 
> jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
>
> at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
>
> at hudson.model.Run.execute(Run.java:1724)
>
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>
> at hudson.model.ResourceController.execute(ResourceController.java:97)
>
> at hudson.model.Executor.run(Executor.java:429)
>
> *Caused by: hudson.plugins.git.GitException: Command 
> "D:\SCM\Apps\Git\2.8.2\bin\git.exe fetch --tags --progress 
> ssh://g...@bitbucket.xxx.com:7999/projectname/reponame.git 
>  
> +refs/heads/*:refs/remotes/origin/*" returned status code 128:*
>
> *stdout: *
>
> *stderr: Permission denied (publickey).*
>
> *fatal: Could not read from remote repository.*
>
>  
>
> Please make sure you have the correct access rights
>
> and the repository exists.
>
>  
>
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
>
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
>
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
>
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
>
> at 
> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
>
> at 
> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
>
> at hudson.remoting.UserRequest.perform(UserRequest.java:207)
>
> at hudson.remoting.UserRequest.perform(UserRequest.java:53)
>
> at hudson.remoting.Request$2.run(Request.java:358)
>
> at 
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
>
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>
> at hudson.remoting.Engine$1$1.run(Engine.java:98)
>
> at java.lang.Thread.run(Thread.java:748)
>
>  
>
> Have you tried running, manually from command line, 'git clone' using the 
> creds in the problematic nodes ? 
>

/Ram 

-- 
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/101e0650-f540-40a3-b404-48a4abf83adb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins: user is missing the Overall/Read permission - Issue

2018-03-03 Thread Ramanathan Muthaiah

>
> I have created  *manual* user in Manger User and I have configured in  
> Matrix-based 
> security. It is showing Manual user is missing the Overall/Read 
> permission'while login into jenkins.
>
> Pleaes find thebelow screenshot and config.xml file. Please help me to fix 
> this issue.
>
>
>
Take some time to look at the notes that shows up when you click on the 
question mark inside the blue colored circle (next to each and every option 
available in only UI). Side note, the matrix level can be set global 
security and at job or folder level too (if the project matrix plugin is 
installed for the latter).

/Ram

-- 
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/49b39f38-feed-40b5-b668-5d7ef43ccd12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Node troubles

2018-03-03 Thread Ramanathan Muthaiah
Hello Sam,

Looks like something gone wrong here (in the pipeline script), extracted 
from the stacktrace in your post.

>>>

at 
com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.run(WorkflowScript:343)
at ___cps.transform___(Native Method)


/Ram

On Friday, March 2, 2018 at 11:26:46 PM UTC+5:30, Sam K wrote:
>
> Hello
>
>I have about 20 nodes of various RHEL versions and one team's nodes 
> always pose certain problems and cause their pipelines to fail.  For a 
> while, I was able to get them to pass by 'bringing nodes online on-demand' 
> because it would refresh the connection.  But lately that strategy has also 
> failed.  The slaves had a higher version of Java than the master and after 
> updating the master the problem seemed to go away only to come back again 
> like this.  If I disconnect, offline the node and bring it back, the logs 
> are clean. But once the pipeline starts running again, it fails.  Any help 
> would be much appreciated.  Thanks. 
>
>
>I'm running Jenkins master version: 2.91.  
>
> JDK version on master RHEL-7
> [sup...@10.0.156.53  ~]$ java -version
> openjdk version "1.8.0_141"
> OpenJDK Runtime Environment (build 1.8.0_141-b16)
> OpenJDK 64-Bit Server VM (build 25.141-b16, mixed mode)
>
> Slave - 
> RHEL 7.3
> openjdk version "1.8.0_131"
> OpenJDK Runtime Environment (build 1.8.0_131-b11)
> OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
>
> Pipeline fails with such errors:
>
> [Pipeline] End of Pipelinejava.io.EOFException
>   at 
> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
>   at 
> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
>   at 
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
>   at java.io.ObjectInputStream.(ObjectInputStream.java:349)
>   at 
> hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)
>   at 
> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
> Caused: java.io.IOException: Unexpected termination of the channel
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
> Caused: hudson.remoting.ChannelClosedException: Remote call on 10.0.135.15 
> failed. The channel is closing down or has closed down
>   at hudson.remoting.Channel.call(Channel.java:901)
>   at hudson.FilePath.act(FilePath.java:986)
>   at hudson.FilePath.act(FilePath.java:975)
>   at hudson.FilePath.mkdirs(FilePath.java:1158)
>   at 
> org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.(FileMonitoringTask.java:113)
>   at 
> org.jenkinsci.plugins.durabletask.BourneShellScript$ShellController.(BourneShellScript.java:198)
>   at 
> org.jenkinsci.plugins.durabletask.BourneShellScript$ShellController.(BourneShellScript.java:190)
>   at 
> org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:111)
>   at 
> org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:64)
>   at 
> org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:177)
>   at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:224)
>   at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:150)
>   at 
> org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
>   at sun.reflect.GeneratedMethodAccessor5286.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
>   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
>   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
>   at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
>   at 
> org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
>   at 
> org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
>   at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:153)
>   at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(

Re: Groovy code in Pipeline and CPS trouble

2018-01-08 Thread Ramanathan Muthaiah

>
> > Reading (novice at it) the stacktrace suggests it's to do with 
> serialization 
> > of variables but the annotation should take care of that, isn't it ? 
> > 
> > an exception which occurred: 
> > in field groovy.lang.Closure.delegate 
> > in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@72ae419a 
> > in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures 
> > in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@401a5d46 
> > in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@401a5d46 
> > Caused: java.io.NotSerializableException: 
> > org.jenkinsci.plugins.workflow.job.WorkflowJob 
> > at 
> > 
> org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
>  
>
> > at 
> > 
> org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
>  
>
> > at 
> > 
> org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
>  
>
> > at 
> > 
> org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
>  
>
> > at 
> > 
> org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
>  
>
> > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) 
> > at java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:333) 
> > . . . . . 
> > . . . . . 
>
> No, the annotation wouldn't help with this, I believe. 
>
> The problem is, when "job steps" execute, objects are deserialized 
> before and after.  If Jenkins has to try to serialize something in 
> scope that is not serializable, you will get that exception. What is 
> often very frustrating is that the stacktrace won't tell you which 
> variable contains something that is not serializable. What it will 
> usually tell you is what type was not serializable. If you're lucky, 
> it will be obvious what variable has a value of that type. In your 
> case, I believe is it obvious. 
>
> The other thing that is not obvious is that "println" is a job step. 
>
> If you really need to do a println, then right before you call it, you 
> have to assign "null" to variables containing values of 
> non-serializable types. 
>
> In your "getjobName" method, it's odd that your formal parameter is 
> called "job", when it's really "jobName", and then you appear to 
> assign to "jobname", which isn't defined anywhere, but the value 
> actually represents a "Job", not a "jobname". 
>

Thanks for the notes on deserialization. 

Immediately after posting my query to this forum, I  did few changes to the 
code, like, assigning null values to some of the variables.

This did solve the problem for me!

/Ram

-- 
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/bdc42815-bdce-4a5a-a050-a81d53a4e927%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Groovy code in Pipeline and CPS trouble

2017-12-28 Thread Ramanathan Muthaiah
Hello All,

I have tested the below snippet of code in myjenkinsurl/script and it works 
fine.

However, same code (embedded or loaded via external Groovy code) in 
Pipeline workflow script fails, inspite of CPS annotation (with the 
stacktrace that's given after this code snippet) ?

NOTE:
First print statement in 'getjobName' function successfully matches the job 
(using regex).

#!/usr/bin/env groovy

import org.jenkinsci.plugins.workflow.job.*

@NonCPS
def getjobName(String job) {
for (item in Jenkins.instance.items) {
if (item =~ /metamon-alert-configs/ ) {
println item.getName()
jobname = item
}
}

for (build in jobname.Builds()) {
println build
}
}


node('master') {
stage('getlog') {
def jobname = getjobName("mon-alert-configs")
}
}


Reading (novice at it) the stacktrace suggests it's to do with 
serialization of variables but the annotation should take care of that, 
isn't it ?

an exception which occurred:
in field groovy.lang.Closure.delegate
in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@72ae419a
in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures
in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@401a5d46
in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@401a5d46
Caused: java.io.NotSerializableException: 
org.jenkinsci.plugins.workflow.job.WorkflowJob
at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
at 
org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
at 
org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
at 
org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
at 
org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:333)
. . . . . 
. . . . .


/Ram

-- 
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/68199c67-9ccf-42e2-8bf3-f38fe4708350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to set "configure release build" in Jenkins organization?

2017-12-06 Thread Ramanathan Muthaiah

>
> I am using Jenkins organization for my pipeline jobs. and I want to add 
> release plug into one of the jobs. as you know we can't change the 
> configuration in organization job. the only way can do this is using groovy 
> method. but I can't find any useful method for this. 
>
> any suggestion will be appreciate. 
>

There are tons of Groovy scripts 
here, https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console

You could probably pick up hints from here. Please use them with caution 
and due diligence.

/Ram 

-- 
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/f44262f9-29ac-4ebc-bc7d-28ab0bc65796%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: java.lang.UnsupportedOperationException: Refusing to marshal org.codehaus.groovy.runtime.GStringImpl for security reasons

2017-12-06 Thread Ramanathan Muthaiah

>
> what on earth does that message mean? 
>
> Here is the code this seems to be happening to:
>
> class Notifications implements Serializable {
> def context
> def dataBlocks
> def mailLists
> def workspace
> 
> // emailext body: 'my email body', subject: 'email subject', to: 
> 't...@test.dev', replyTo: 't...@test.dev', mimeType: 'text/html';  
> Notifications(ctx,workspace){
> context=ctx;
> dataBlocks = new Data(context,workspace)
> mailLists = this.loadJSON('data/email-lists.json')
> 
> }
> def loadJSON(fname){
> def retval
> context.dir(workspace){
> retval = jsonParse(context.readFile(fname)) 
> }
> return retval
> }
> 8< snip 8<-
>
> in particular in the loading of the JSON file.  
>
> It is laid out as 
> {
> "list1" :: [
> "member1" ...etc.
>  ]
> } 
>
>
> thoughts?
>

I guess this kind of operation is not whitelisted to run in the Groovy 
sandbox.

Did you try using this step to read JSON accessible in your workspace ?

https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#readjson-read-json-from-files-in-the-workspace
 

/Ram

-- 
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/8d61f2f0-0b5f-4b34-9957-54bf9786dd09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need Help Getting host name

2017-12-06 Thread Ramanathan Muthaiah

>
> I have a custom plugin which during the post-build phase needs the 
> hostname/IP address of the node where the build is executing,
>
> build.getExecutor().getOwner().getNode().toComputer().getHostName()
>
> I have been using the above method, but it does not give me the right host 
> name
>

You have not mentioned if your build job is freestyle or pipeline. 

Could you not get node name from environment variable set by the build job?

/Ram 

-- 
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/2e2d1bd0-73f7-4619-9e6f-f50a260dab23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Translation between declaritive pipleline and groovy pipeline

2017-12-03 Thread Ramanathan Muthaiah

>
> What would be the equivalent of this:
>
> post {
> always {
> echo 'One way or another, I have finished'
> deleteDir() /* clean up our workspace */
> }
> success {
> echo 'I succeeeded!'
> }
> unstable {
> echo 'I am unstable :/'
> }
> failure {
> echo 'I failed :('
> }
> changed {
> echo 'Things were different before...'
> }
> }
> }
>
> in a Groovy pipleline? 
>
> I'm looking at using "something" to notify by email if a build fails
>
>
Groovy code presented in this Cloudbees' article is about mail 
notifications (also, slack and hipchat) -- but you may want to extend it to 
suit your needs.

https://www.cloudbees.com/blog/sending-notifications-pipeline

/Ram

-- 
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/da5927cf-2fc5-4c46-9734-8db06b87be7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Ramanathan Muthaiah
Hi Jeeva,
 

> I would like to build Docker images from a Dockerized Jenkins. There are 
> multiple solution out there but what is the recommended solution...
>
> I have been using ssh node as a work around, but I was told to use 
> https://wiki.jenkins.io/display/JENKINS/Docker+Slaves+Plugin . In order 
> for this plugin to work, I have to install docker inside the Jenkins (my 
> docker host is RHEL) and also mount the /var/run/docker.sock or enable 
> TLS. Isn't installing docker blow up the size of the Jenkins image? 
>
> Any way to install just the docker client in side the Jenkins image? 
>

I have not tried this, so, cannot vouch for this. Please be cautious about 
the approach presented in this blog.

http://niels.nu/blog/2017/continuous-blog-delivery-p2.html : you might be 
interested in Docker-in-Docker.

/Ram 

-- 
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/e973fe60-490e-476c-9efb-de2aa5a2e09c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipelines and @tmp directories

2017-11-30 Thread Ramanathan Muthaiah

>
> Simple question:  is there a way to make a pipeline not create those? Or 
> at the very least clean up after them?
>

Have a look at the examples posted here for workspace cleanup, choose 
solution what suits you.

https://jenkins.io/doc/pipeline/tour/post/ (titled, Cleaning up and 
notifications)

/Ram




-- 
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/1528bc4b-e200-4eb8-8353-231995d74baf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Return value from step (pipeline)

2017-11-30 Thread Ramanathan Muthaiah

>
> Is it possible to capture the return value from pipeline step?
>
> ex:
> def result = findbugs(pattern: '**/target/**/findbugsXml.xml')
> echo result
>

To store cmd status or output, you should use sh(). You will find code 
snippets in this link, https://jenkins.io/doc/pipeline/examples/

BTW, Jenkins Pipeline doc has step called, "findFiles" but there is nothing 
like, findbugs. Is that your custom function?

/Ram
 

-- 
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/fc1b0b4e-bb5b-4f23-b408-ab9965d8692b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Triggering Jenkins Multibranch Pipeline by raising a Pull Request in GitHub

2017-11-29 Thread Ramanathan Muthaiah

>
> So I need to trigger this Multibranch pipeline whenever there is a Pull 
> Request raised on GitHub. I want this pipeline to trigger automatically 
> when there is a PR on GitHub.
> What do I need to do to achieve this approach?
> Is it possible to trigger Multibranch pipeline automatically whenever a PR 
> is raised on GitHub?
>

Yes, configure webhook in GH repository to send event related to Pull 
Request, if that's sufficient for your requirement. Select all the events 
(don't remember the exact name) if you have need for all the events to be 
passed to jenkins master.

NOTE:
Jenkinsfile may or may not need the property (related to github push) to be 
set. There were few threads in this group on this setting.

/Ram

-- 
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/b99e6c4e-da0b-4582-a1b3-7534d6f84f93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


GitHub Branch Source plugin and pull requests from forked repos

2017-08-01 Thread Ramanathan Muthaiah
https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#_controlling_what_is_built

Documentation mentions that "By default, Jenkins will build any branches it 
finds in the “origin” repository (the actual repository found in your 
organization). Also, any pull requests that have been filed from “forks” 
(clones in user accounts) will also be built . . ."

In our setup, running Jenkins v.2.60.1 with this plugin v2.2.0, the latter 
usecase i.e. pull requests filed from forks is not triggering automatic 
builds -- user A forks a repo, commits his/her changes to 'master' in 
forked repo and then creates a pull request from the actual repo.

I hope this is valid use case. So, does anyone know why this fails ?

/Ram

-- 
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/8043350c-1377-45cd-a04b-277cc2b9e7b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pull requests from github fork not building with jenkins multi-branch githooks?

2017-08-01 Thread Ramanathan Muthaiah
On Tuesday, February 14, 2017 at 12:54:13 AM UTC+5:30, anton kropp wrote:
>
> Whenever someone submits a pull request from a forked repo to a job that 
> is built with multi-branch github integration, jenkins never picks up the 
> commits.  PR's from branches work just fine though.
>
> Am I missing a setting? I can't for the life of me figure out how to get 
> this to trigger
>

Am in a similar situation now. Did you manage to find a solution for this?

/Ram 

-- 
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/136cc564-6f7d-405c-b325-5af84888b5fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to set Multibranch Pipeline Trigger interval via Jenkinsfile?

2017-07-26 Thread Ramanathan Muthaiah
On Thursday, July 27, 2017 at 5:12:55 AM UTC+5:30, Yuri Govorushchenko 
wrote:
>
> Hello,
>
> I have a *Multibranch Pipeline* job and would like to programatically set 
> its property found in UI at *Scan Multibranch Pipeline Triggers -> 
> Periodically if not otherwise run -> Interval*. Ideally I'd like to do it 
> in a scripted *Jenkinsfile* used to define the job. Maybe it can be 
> somehow achieved via properties step? It seems to be a property of 
> CloudBees Folders Plugin 
>  but I 
> couldn't figure out how it can be modified without a UI.
>

We are on the same boat . . . would be interested to know how this can be 
done; if you hit upon the solution, pls do share here.

/Ram 

-- 
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/ace70cd8-afa6-4966-a82c-e449cad3eeef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline property for GitHub PullRequest

2017-07-26 Thread Ramanathan Muthaiah
While regular GitHub PUSH event can be handled via this property setting in 
Jenkinsfile pipeline script, am interested to know if there is similar 
property for GitHub Pull Requests?

>>> pipelineTriggers([githubPush()])

Setup: 

Jenkins ver is @ 2.60.1, have webhook setup between GitHub Enterprise and 
Jenkins master.

Project is setup to trigger automatic build upon GitHub events (Push, PR), 
it is a regular pipeline job -- with regular Push event from GitHub, 
automatically fresh build job is triggered in the above setup, want to know 
if there is a similar way to handle PRs too via properties?

NOTE:
Am aware of other options that can be chosen while setting up project, 
like, GitHub organizational folder, MultiBranch Pipeline ; but, wanted to 
explore this PR topic with simple pipeline project setup in Jenkins.

/Ram

-- 
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/11e5398d-ece5-457e-8960-3a97337891db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Resolved] : Github push event fails to trigger pipeline job in jenkins

2017-07-01 Thread Ramanathan Muthaiah
For the benefit of those who may come across similar issue, let me share 
some details of how this was fixed.

Internal Setup:

Jenkins instance is in cloud, from the cloud we have no direct connectivity 
to enterprise github server which is in a data center.
And, requests from Jenkins to github was routed via proxy in cloud.

Given this setup, we opted to go for AWS SNS + AWS Lambda solution.

Event Flow:
==
In Github repo, SNS topic is added and the payload of Github event is sent 
to Lambda which subscribes to SNS topic.
Lambda processes the payload and relays it to appropriate Jenkins master 
(multiple masters in cloud).

Problem:
===
However, PUSH event that reaches the master (correctly) was not triggering 
the job (both freestyle and pipeline).
It turned out be that github URL that reaches the master was not matching 
with URL set in the job config.

Recall from the setup section, Jenkins' communicates with the github server 
via the proxy.
It was this URL (pointing to the proxy) that was in the job but the event 
payload sent from github had different URL.

So, in the Lambda, we changed the URL to match with that of the proxy 
before relaying to Jenkins master.
Eventually, this did the trick and PUSH event was followed by poking of the 
job that resulted in triggering a fresh build of that job.

Overall, it was good learning experience.

/Ram


On Sunday, June 25, 2017 at 2:32:48 PM UTC+5:30, Ramanathan Muthaiah wrote:
>
> Hi Lee,
>  
>
>> Is it a plain pipeline job? If so, you need to click the option to 
>> trigger a build on a GitHub change.
>>
>
> Yes, the job is setup as pipeline style and that option (to trigger build 
> on Github change) is enabled.
>
> Are there any extra commands needed in the pipeline job to indicate that 
> it should be triggered when github event occurs, like, commit or pull 
> request?
>
> /Ram 
>

-- 
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/21aad390-d12b-44fe-b0ee-f162fa7ab17b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins job builder -- Cannot create pipeline style jobs

2017-06-30 Thread Ramanathan Muthaiah
On Fri, Jun 30, 2017 at 10:05 AM Matthew Wilmott 
wrote:

> Okay so it looks like it relies on the 2.x codebase which is beta. Pip had
> installed version 1.6 by default, upgraded using pip and rerun the test
> script which worked. Now its obviously a beta build but I'm only currently
> building out my env so I don't mind at this rate, it should mature y the
> time I need to use it in anger.
>
> Note - I had to remove the " scm:" line beneath the pipeline-scm it
> appears to be superfluous
>

Great news and thank you very much for sharing your findings.

In a fresh instance of Jenkins, with JJB 2.0.0.0b2 beta version, I reran
the script and it worked.

Why JJB project did not mention this issue in their project website [
https://docs.openstack.org/infra/jenkins-job-builde ] is surprising?

/Ram

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


Jenkins behaviour with github webhook and github service

2017-06-27 Thread Ramanathan Muthaiah
Hi All,

Am working to setup webhook trigger between github enterprise and Jenkins. 

As part of this, enabled AWS SNS in Github repo and have Lambda subscribed 
to the AWS SNS topic. 
With this setup in place, on Jenkins side, in the job (where build should 
be triggered automatically) these two options were enabled.

"Github Project" 
"GitHub hook trigger for GITScm polling"

Is it correct to assume that with the service option enabled (with SNS in 
this case) and turning on these features in the specific job, will enable 
Jenkins to trigger the job when the event from Github is passed to the 
Jenkins server?

Or the two features will work only if webhook is enabled in github repo by 
setting the webhook URL, like, http://my-jenkins-server.com/github-webhook/?

/Ram

-- 
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/41b35bca-5e68-4ba8-8434-7c292b86da35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Github push event fails to trigger pipeline job in jenkins

2017-06-25 Thread Ramanathan Muthaiah
Hi Lee,
 

> Is it a plain pipeline job? If so, you need to click the option to trigger 
> a build on a GitHub change.
>

Yes, the job is setup as pipeline style and that option (to trigger build 
on Github change) is enabled.

Are there any extra commands needed in the pipeline job to indicate that it 
should be triggered when github event occurs, like, commit or pull request?

/Ram 

-- 
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/b0976726-ea5b-4df4-8e0c-35521e9e0281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins job builder -- Cannot create pipeline style jobs

2017-06-25 Thread Ramanathan Muthaiah

>
> Hi Ramanath, Hope you have resolved this issue. Actually I am facing same 
> issue with the pipeline module .. I am using JJB 1.4 version on Jenkins2.0 
> which got a pipeline plugin version 2.5 . 
>
> Please let me know if have managed to resolved.
>
>
After my initial post, have not been able to spend any time on this issue 
nor any leads from this forum on possible solutions.

So, the issue is very much open!!!

/Ram

-- 
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/bdd0d46e-0c52-4b41-bdcf-0393e2f2d857%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using local directory path for build instead of git url?

2017-06-12 Thread Ramanathan Muthaiah

>
> Will it be possible to use a local project directory path instead of git 
> url in build configuration, and then click 'Build Now' button which will 
> run a given command in that directory?
> I am basically aiming logging all the runs of a project here, for e.g. to 
> log the environment variables used in each run. Need to do this for my 
> build tool project (in git), so will be useful to log which combination of 
> env versions used to create a particular version of a plugin from source 
> (for e.g. the company-wide env versions used in compiling and building 
> alembic code using my project). All in my team can clone our project into a 
> common local path in our machines, say /disk1/projects/, and use that path 
> in Jenkins instead of git url. Will it be possible?
>
> If this is possible, can we externally trigger the 'Build Now' button 
> click in Jenkins?
>
>
Pls check if this plugin will suit your needs.

https://wiki.jenkins-ci.org/display/JENKINS/File+System+SCM

/Ram
 

-- 
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/a1f6deaf-8c30-4700-82a2-ffa19b54cb10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Could not find or load main class –Xmx512m

2017-06-12 Thread Ramanathan Muthaiah

>
>i am new to Jenkins.. 
>
>   When i give build now i am getting  Could not find or load main class 
> –Xmx512m .. Can anyone help me to resolve this?
>

I think it may be helpful to share details of the jenkins build job that's 
failing, info about usage of any special plugins.

/Ram

-- 
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/762db699-65e0-47bb-8627-a76f58373f7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins job builder -- Cannot create pipeline style jobs

2017-06-11 Thread Ramanathan Muthaiah
Hi All,

Pls bear with me for the lengthy post. I did go through the documentation 
(JJB) on how to create jobs of freestyle and pipeline style. 


With JJB installed in an Ubuntu box (running in Vagrant), I could create 
simple freestyle jobs. 

However, the same is not the case with simple pipeline jobs.


a) YAML code used to create pipeline job was based on the example in the 
section, “Pipeline as code” example", given here, 
https://docs.openstack.org/infra/jenkins-job-builder/project_pipeline.html


- job:






-job:

   name: JJB_OSFY

   project-type: pipeline

   sandbox: true

   pipeline-scm:

 scm:

  - git:

  url: https://github.com/mramanathan/OSFY.git

  clean: true

 script-path: Jenkinsfile



b) And the command tried to create pipeline job. Example code was stored in 
pipdemo.yaml

jenkins-jobs --conf server.ini update pipdemo.yaml


c) Output from the command:


++

INFO:root:Updating jobs in ['pipdemo.yaml'] ([]) 
INFO:jenkins_jobs.builder:Number of jobs generated: 1 Traceback (most 
recent call last): File "/home/ubuntu/.local/bin/jenkins-jobs", line 11, in 
sys.exit(main()) File 
"/home/ubuntu/.local/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 
191, in main execute(options, config) File 
"/home/ubuntu/.local/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 
372, in execute n_workers=options.n_workers) File 
"/home/ubuntu/.local/lib/python2.7/site-packages/jenkins_jobs/builder.py", 
line 356, in update_jobs 
self.parser.xml_jobs.sort(key=operator.attrgetter('name')) AttributeError: 
'NoneType' object has no attribute 'name'

+


d) FWIW, freestyle jobs were created using the same server.ini.


Any help would be appreciated.


NOTE:

Pls excuse me for posting this issue to this group. I did post it to JJB 
forum but haven't got any response until now, so, trying my luck here!

-- 
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/47408acc-f2f6-4cd0-8d4e-4752a1d24cc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Job Scheduling per 10 secs

2017-06-07 Thread Ramanathan Muthaiah
Hi ,

Freestyle or pipeline job configuration has few items that should satisfy 
what you're looking for.

1) Build Periodically

2) Do not allow concurrent builds.

Have you looked at them and tried to customize for your wants?

/Ram

On Wednesday, June 7, 2017 at 9:37:35 PM UTC+5:30, Ashish Kaushik wrote:
>
> Hi, 
> I am looking for a solution which allow me schedule a job which can run 
> every 10 secs and also the job should not run if the previous instance has 
> not yet finished. 
>
> I have checked the plugin store but can't find anything that supports this 
> requirements. Any pointers would be greatly appreciated. 
>
> Thanks
>
> --
> * Ashish *Kaushik
>  SourceFuse Technologies
>
> --
>

-- 
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/e996d324-e550-416b-8741-f93f13e4aaf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to make Jenkins build something on pushing to GitHub?

2017-06-02 Thread Ramanathan Muthaiah
Hello Yuri,

Am in an identical situation. Were you able to nail this issue? 

/Ram

On Thursday, March 23, 2017 at 12:01:39 PM UTC+5:30, Yuri Kanivetsky wrote:
>
> Your job need to have a scm configuration for it to be triggered on 
>> commits.  Either configure it as Multibranch Pipeline job or add a "git" or 
>> checkout step in your normal pipeline.
>>
>  
> Can you elaborate on 'add a "git" or checkout step in your normal 
> pipeline' part? I tried it with this pipeline:
>
> node {
> git credentialsId: 'b22c8273-0293-8364-2463-233ab3898fe', url: 
> 'g...@github.com:USER/REPO.git'
> echo 'Hello World'
> }
>
> I can see notification from GitHub coming in Jenkins' System Log, but 
> build doesn't get triggered.
>
> In the pipeline I created I checked "GitHub project", filled in the 
> "Project url" text field (e.g., https://github.com/rails/rails), and 
> checked "GitHub hook trigger for GITScm polling".
>
> Just in case, relevant Stack Overflow question: 
> http://stackoverflow.com/questions/42897125/how-do-i-make-jenkins-do-anything-on-git-commit/42968421
>

-- 
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/13a9aa6a-de93-4ce5-944c-4a0f428ccb55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to connect to to the git repository, can any one please suggest what is wrong with the configuration

2017-05-17 Thread Ramanathan Muthaiah
Adding to Victor's response, you may want to explore additional options 
available for checkout and cloning.

C:\Program Files\Git\bin\git.exe fetch --tags --progress https:
> //git.etb.tieto.com/x/x.git +refs/heads/*:refs/remotes/origin/*
> ERROR: Timeout after 10 minutes
> ERROR : Error 
> fetching remote repo 'origin' 
>
>
You should also evaluate if the git operations have to pass thru' proxy to 
complete repo checkout or cloning.

/Ram 

-- 
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/edc2887c-466e-4384-8b56-d1e702f978b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Not able to push to GIT repo using 'withcredentials'

2017-05-05 Thread Ramanathan Muthaiah
On Friday, May 5, 2017 at 3:32:36 PM UTC+5:30, ishan jain wrote:
>
> I am trying to push some tags back to repository and for obvious reasons, 
> i would like to keep my usernam/pass hidden. I use withcredentials for this 
> and the code looks like this:
>
> checkout([$class: 'GitSCM', branches: [[name: '*/master']], 
> doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
> 'RelativeTargetDirectory', relativeTargetDir: 'git']], submoduleCfg: [], 
> userRemoteConfigs: [[url: 'http://my-GITBUCKET-gitURL.git']]])
>
> 
> dir ('git') {
>
> withCredentials([usernamePassword(credentialsId: 
> '--1-1-1112', usernameVariable: 'GIT_USERNAME', 
> passwordVariable: 'GIT_PASSWORD')]) {
> sh "git credential approve"
> sh 'git tag -a ' + env.BUILD_ID + ' -m "Creating tag"'
> sh "git push origin " + env.BUILD_ID
> }
> }
>
> This always gives me the following error:
>
> 09:45:12 [git] Running shell script
> 09:45:13 + git push origin 124
> 09:45:13 fatal: could not read Username for '
> http://my-GITBUCKET-gitURL.git': No such device or address
>
> I tried learning more about this error and seems like it should have been 
> working after using GIT approve, but apparently it is not.
>
> I tried something like below and *it works fine, only that it is an ugly 
> workaround* and i do not with to use as a final solution.
>
> checkout([$class: 'GitSCM', branches: [[name: '*/master']], 
> doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
> 'RelativeTargetDirectory', relativeTargetDir: 'git']], submoduleCfg: [], 
> userRemoteConfigs: [[url: 'http://my-GITBUCKET-gitURL.git']]])
>
> 
> dir ('git') {
>
> withCredentials([usernamePassword(credentialsId: 
> '--1-1-1112', usernameVariable: 'GIT_USERNAME', 
> passwordVariable: 'GIT_PASSWORD')]) {
> sh "git credential approve"
> sh 'git tag -a ' + env.BUILD_ID + ' -m "Creating tag"'
> sh "git push 
> http://${GIT_USERNAME}:${GIT_PASSWORD}@${repoURL.substring(7)} --tags"
> }
> }
>
 
So, the URL with username and password is working (as expected).  If you 
are using withCredentials (meta-step ?) with credentials id, username and 
password are variables that help to store authentication info that can be 
used for git operations.

Have you looked at the console log, these values will be masked and 
displayed as asterisks ?

BTW, you should avoid having generic names, like, 'git' within dir() as 
seen in the code snippet shared by you.
It should reflect the purpose for which is meant for, like, it could be 
same as the repo name that you are trying to update with new commits.

/Ram

-- 
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/8be1cb73-c572-4d12-8295-c4462a6ae73d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[SOLVED] : Pipeline build expects multiple values for a parameter

2017-04-29 Thread Ramanathan Muthaiah
On Friday, April 28, 2017 at 7:54:42 PM UTC+5:30, Ramanathan Muthaiah wrote:
>
> Hello,
>
> Am using parameters( [ . . . ] ) inside the pipeline script to define the 
> values for the various parameters. These params are used while invoking 
> packer tool.
>
> properties([
>   parameters([
> string(name: 'region',  defaultValue: 'us-west-2',   
> description: ''),
> text(defaultValue: '"us-west-2, us-west-1"', description: '', name: 
> 'ami_regions')
>   ])
> ])
>
>
> For the packer tool, among other variables, I need to pass multiple region 
> names, like this,
>
> packer -var ami_regions="us-west-2, us-west-1" . . . 
>
> Am able to access them like, ${params.ami_regions} but then the double 
> quote is missing and the input to packer cmd is partial i.e. us-west-1 is 
> missed out.
>
> Does anybody know why is this ? And, is there a better way to handle this, 
> via some groovy script embedded within the pipeline ?
>
 
Solution:

Retaining the same config values in the "properties" (step ?), I was able 
to get over this problem with only minor change to this:

text(defaultValue: 'us-west-2,us-west-1', description: 'AWS regions to copy 
AMI', name: 'ami_regions')

Removed the single blank space between the two values and double quotes at 
the start and end.

/Ram

-- 
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/723f2c5d-4738-481f-89db-32333198522f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline build expects multiple values for a parameter

2017-04-28 Thread Ramanathan Muthaiah
Hello,

Am using parameters( [ . . . ] ) inside the pipeline script to define the 
values for the various parameters. These params are used while invoking 
packer tool.

properties([
  parameters([
string(name: 'region',  defaultValue: 'us-west-2',   description
: ''),
text(defaultValue: '"us-west-2, us-west-1"', description: '', name: 
'ami_regions')
  ])
])


For the packer tool, among other variables, I need to pass multiple region 
names, like this,

packer -var ami_regions="us-west-2, us-west-1" . . . 

Am able to access them like, ${params.ami_regions} but then the double 
quote is missing and the input to packer cmd is partial i.e. us-west-1 is 
missed out.

Does anybody know why is this ? And, is there a better way to handle this, 
via some groovy script embedded within the pipeline ?

--
regards
Ram

-- 
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/e411af13-2e2f-445d-a110-65ebc8bab975%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline jobs: How are return codes handled?

2017-04-21 Thread Ramanathan Muthaiah
On Friday, April 21, 2017 at 3:22:49 PM UTC+5:30, David Aldrich wrote:
>
> Hi
>
>  
>
> In a conventional Jenkins job, my understanding is that the job will fail 
> if the last command of a shell build step indicates an error.
>
>  
>
> I am now experimenting with pipeline jobs and have something like:
>
>  
>
> node {
>
> stage('Checkout') {}
>
>  
>
> sh returnStatus: true, script: '''cd software
>
>   make cleanall
>
>   make '''
>
> }
>
>  
>
> I am not sure what is happening here.
>
>  
>
> 1)  Will the same rule apply that the job will fail if the last 
> command of the sh step fails?
>
> 2)  What is ‘returnStatus: true, script’ doing?
>

Regd item 2), returnStatus will return the execution completion status of 
commands enclosed within "script: " 

It can be either 127 (if the command is not found) or 1 for failed valid 
command or 0 for valid command that has been executed successfully.

Refer to these links for more info:

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

https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#code-sh-code-shell-script

http://stackoverflow.com/questions/36956977/how-to-execute-a-command-in-a-jenkins-2-0-pipeline-job-and-then-return-the-stdou

http://stackoverflow.com/questions/36547680/how-to-do-i-get-the-output-of-a-shell-command-executed-using-into-a-variable-fro

https://support.cloudbees.com/hc/en-us/articles/218554077-How-to-set-current-build-result-in-Pipeline

-- 
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/befed8e7-cc85-4fb7-a585-bb7e31d41cb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BlueOcean: missing visual pipeline editor

2017-04-21 Thread Ramanathan Muthaiah
Hello,

In the BlueOcean UI, I chose Git and provided the repo name hosted within 
organization umbrella. However, with this choice, visual pipeline editor is 
not visible.

Does anyone why is this and what am missing ?

/Ram

-- 
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/054bdf78-ad12-4825-860a-a5dc84c9e642%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline build fails using "withAWS"

2017-04-14 Thread Ramanathan Muthaiah
Hello,

Pls excuse for the lengthy post.

Am looking to make use of IAM roles in the given AWS account (jenkins 
master runs in the same account) and run packer build to generate AMI. 
This is to avoid storing / using AWS keys in Jenkins master.

For this purpose, I wanted to make use of this plugin, 
https://github.com/jenkinsci/pipeline-aws-plugin

Jenkins master is at v2.32.3

This is the primitive pipeline code which am attempting but it fails with 
error pointing to secure token being non-available.

Has anyone got this plugin working with pipeline script ?

node {
stage('aws') {
withAWS(role:'jenkins-ec2-master') {
  // awsIdentity()
}
}
}


For your ref, attached snippet of errors from build console log.

>> 

com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: 
The security token included in the request is expired (Service: 
AWSSecurityTokenService; Status Code: 403; Error Code: ExpiredToken; 
Request ID: 1c2975ed-210d-11e7-a78a-896df2d6846b)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1545)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1183)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:964)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:676)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:650)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:633)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$300(AmazonHttpClient.java:601)
at 
com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:583)
at 
com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:447)
at 
com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.doInvoke(AWSSecurityTokenServiceClient.java:1188)
at 
com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.invoke(AWSSecurityTokenServiceClient.java:1164)
at 
com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.getCallerIdentity(AWSSecurityTokenServiceClient.java:874)

-- 
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/9cc32a7d-204e-4f96-a7a9-9ed6e649de50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Difference between "ClearCase UCM", "ClearCase UCM Baseline" and "UCM ClearCase" options

2017-04-05 Thread Ramanathan Muthaiah
Hi Umang,

You stand better chance of getting responses to your query if you post in 
ClearCase group, not here.

/Ram

On Tuesday, April 4, 2017 at 12:20:08 PM UTC+5:30, Umang Gujrati wrote:
>
> Hi,
> Can someone please help me understand the difference between "ClearCase 
> UCM", "ClearCase UCM Baseline" and "UCM ClearCase" options in Source 
> Control Management?
>
> Thanks,
> Umang
>

-- 
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/f3e4872c-cf9f-4105-988f-f02c6fc77f4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins pipeline build fails to run script inside Docker container

2017-04-04 Thread Ramanathan Muthaiah
Hello All,

Using standard + Pipeline + Docker plugins in Jenkins v2.53, am trying to 
run flake8 within a Docker container environment.

1. Jenkins master is running in a Vagrant VM and there is no dedicated 
agent as this is meant for experimentation and learning purposes.

2. Docker toolbox is installed on the Jenkins master and pipeline build is 
set to run in the master.

3. In the Jenkins master:

ubuntu@ubuntu-xenial:~$ grep 112 /etc/passwd
uuidd:x:108:112::/run/uuidd:/bin/false
jenkins:x:112:117:Jenkins,,,:/var/lib/jenkins:/bin/bash


4. via pipeline, with Dockerfile as input, pipeline build is able to create 
image.

jenkins@ubuntu-xenial:~$ docker images flake8-node 
REPOSITORY  TAG IMAGE ID
CREATED SIZE
flake8-node latest  7c6e568293f322 hours 
ago277 MB


5. Manually launched the docker container using the built image to check 
"jenkins" user:

jenkins@ubuntu-xenial:~$ docker run -ti flake8-node:latest
. . . . 
. . . .
jenkins@513b3c3988ca:/data$ id
uid=1000(jenkins) gid=1001(jenkins) groups=1001(jenkins),1000(docker)

However, during pipeline build, while attempting to execute flake8 shell 
script using "docker.inside", build fails with this error:

*docker run -t -d -u 112:117 args . . . . . . . *
. . . . . . . . . . . 
. . . . . . . . . . .

*"fatal: unable to lookup current user in the passwd file: no such user"*
Mining through the archives, I found this thread related to this issue but 
there isn't any conclusion.

https://groups.google.com/forum/#!searchin/jenkinsci-users/docker$20containers%7Csort:relevance/jenkinsci-users/dMxdQrJJAOg/ueBtrl1LCQAJ

Any ideas welcome !!!

/Ram

-- 
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/abe80421-cda4-475b-85a9-a560e3bbe339%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jira/Jenkins integration Plugins

2017-03-31 Thread Ramanathan Muthaiah
Hi Marlene,

I have not used JIRA plugin in Jenkins but aware of Python library that 
allows CLI interaction to JIRA.

My experience with jira-python module is pretty limited but it looks 
interesting.

/Ram

On Tuesday, March 28, 2017 at 1:11:48 AM UTC+5:30, Marlene Cote wrote:
>
> I have installed jira plugin for jenkins.  I am not able to connect to 
> jira though. Jira connects to this jenkins master.
> Jenkins 2.52, 
> JIRA v6.4.12
>
>
>
>
>
>

-- 
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/9bc2f904-50b9-4d2f-bbed-f91a75b3f48b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to get all the enabled jobs on a jenkins CI System

2017-03-31 Thread Ramanathan Muthaiah
Raj,

I would like to know if there is a way to use jenkins cli jar file and find 
> out if a given job is enabled or currently disabled. 
> i have about 700 jobs on the server and would like to know the list of 
> enabled and disabled jobs
>

Another way to get this done (if you have done prior Python programming) is 
to use REST APIs available in Jenkins.

It's quite fun to deep dive and learn.

/Ram

-- 
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/2344d0e8-b137-4c0c-a41c-f544d2ac80b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: missing group in pipelines run leads to docker failure

2017-03-31 Thread Ramanathan Muthaiah
Nathan,
>
>
> so I get: `Got permission denied while trying to connect to the Docker 
> daemon socket at unix:///var/run/docker.sock` via the jenkins pipeline run, 
> but docker is fine when run as the jenkins user locally on the box...
>


http://nknu.net/how-to-configure-docker-on-ubuntu-15-04/

This came in handy for me. Pls have it a try.

/Ram 

-- 
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/eadd9f7d-fca3-44df-b777-164ae3a0a3f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Howto integrate OWASP dependency check plugin in Jenkins Pipeline ?

2017-01-30 Thread Ramanathan Muthaiah
Hi ,

After reading thru' OWASP dependency check plugin wiki and JIRA issues, I 
could not find examples of simple usage of this plugin in Jenkins Pipeline 
with the exception of this code snippet (sourced from one of the PR 
conversations in this plugin's GH page):

step([$class: 'DependencyCheckPublisher'])

I would like to collect data from OWASP dependency check by scanning mostly 
Python-ish codebase.

Has anyone tried this combination i.e Jenkins Pipeline + OWASP dependency 
check ?

NOTE:
There is not much documentation available here too, 
https://github.com/jenkinsci/dependency-check-plugin

Appreciate any pointers on this topic.

/Ram

-- 
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/37bff32e-8128-4d14-ba26-b827bd99e7cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[SOLVED] : Jenkins Pipeline build error: Failed to prepare configFileProvider step

2017-01-23 Thread Ramanathan Muthaiah
On Monday, January 9, 2017 at 9:38:24 AM UTC+5:30, Ramanathan Muthaiah 
wrote:
>
> Hello All,
>
> Need help with pipeline build error in this setup:
>
> Jenkins v2.36 with standard pipeline plugins + configFileProvider plugin 
>
> Here is the content of Jenkinsfile, pipeline script:
>
> node('master') {
>  stage(' == Capitals == ') {   
>configFileProvider([configFile(field: 
> 'capital_jsoncfg', variable: 'capitals_info')]) {
> echo " == content of json cfg == "
> sh "cat $capitals_info"
>  }
>}
>  }
>
> And, the pipeline build fails with this error (followed by verbose output):
>
> java.lang.IllegalArgumentException: Failed to prepare configFileProvider step
>   at 
> org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:315)
>   at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:129)
>   at 
> org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
>   at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
>
>
This issue is solved. Usage of incorrect syntax (marked in italics) was 
causing Pipeline build errors.

node('master') {
  stage(' == Capitals == ') { 
 configFileProvider([configFile(*fileId*: 
'', variable: 'capitals_info')]) {
 echo " == content of json cfg == "
 sh "cat $capitals_info"
 }
  }
}

Dominik suggested he will make improvements to display a better error 
message.
https://issues.jenkins-ci.org/browse/JENKINS-40973

Thanks Dominik for your help. 

/Ram

-- 
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/6f117e77-0143-44a4-9aa3-f4850aac7cc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Having problem in importing the code from Github to Jenkins.

2017-01-11 Thread Ramanathan Muthaiah
On Wednesday, January 11, 2017 at 2:45:26 PM UTC+5:30, Sathish M wrote:
>
> I am new to Jenkins. I've been learning it by myself, as of now I know to 
> create a job & build it when my source code is in my local system. Now I am 
> trying to work the same from Jenkins. I've been trying it but I can't get 
> that. Can you help me to work here with Github.
>

Ram : There are plenty of resources on the Internet regd Jenkins 
integration with GitHub.

It will help if you can list what did you try and what did not work 
including tool or plugin versions.

/Ram

-- 
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/5ec04edd-c253-4cc2-b6e9-fc3985a52d00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Loading scripts from Workflow resources

2017-01-10 Thread Ramanathan Muthaiah


On Tuesday, January 10, 2017 at 7:08:01 PM UTC+5:30, Mark Bidewell wrote:
>
> I am looking at the external libraries capabilities of Jenkins Workflow. 
>  Our workflow uses python scripts for portions of the build process.  Can 
> this scripts be stored as resources and a path to them retrieved via 
> workflow?  Right now the scripts are in a directory on the server not under 
> Jenkins control.
>

Two (actually three) possible options:

1) Explore "Managed Scripts" plugin (I suppose this supports only shell 
scripts) alongwith Config File Provider plugin.

2) If you have Pipeline plugin installed, then these Python scripts can be 
invoked using step, "sh" but this will demand your scripts in version 
control.

3) If the Jenkins job is a freestyle project, then the entire script can be 
added as a 'build step' ; but then, every change to the build script (for 
bug fixes or new improvements), job needs to be modified and the script 
content should be replaced.

/Ram 

-- 
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/420abdf2-d096-40c0-a639-19b49d1bc9fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Pipeline build error: Failed to prepare configFileProvider step

2017-01-08 Thread Ramanathan Muthaiah
Hello All,

Need help with pipeline build error in this setup:

Jenkins v2.36 with standard pipeline plugins + configFileProvider plugin 

Here is the content of Jenkinsfile, pipeline script:

node('master') {
 stage(' == Capitals == ') {   
   configFileProvider([configFile(field: 
'capital_jsoncfg', variable: 'capitals_info')]) {
echo " == content of json cfg == "
sh "cat $capitals_info"
 }
   }
 }

And, the pipeline build fails with this error (followed by verbose output):

java.lang.IllegalArgumentException: Failed to prepare configFileProvider step
at 
org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:315)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:129)
at 
org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)


Read thru' the example given here:
https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin

Searched this forum and stack overflow for possible clues but no successful 
hits until now.

Does anyone know what's wrong with the pipeline script ?

P.S :

In the same setup of Jenkins master, I have a freestyle job configured to 
use the same json cfg, in that job there are no such issues. 
Simple shell command, like, cat-ing the contents of JSON cfg works in the 
freestyle job.


TIA,
/Ram

-- 
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/e8d00f3d-41bb-46eb-9bde-1530b989b8fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: variable field in jelly files in jenkins-office 365 conecter plugins

2017-01-02 Thread Ramanathan Muthaiah
I have no experience with this plugin but can't you pass parameter via the 
job configuration ?

In office 365 connecter plugin,the url only get the given value.I want to 
> set the field is variable field.How Can i set that?
>

/Ram 

-- 
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/825608c6-163f-4b99-b44e-610ff778164c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What build variable will contain text like "commit notification ", "started by timer", or "started by user "?

2016-12-31 Thread Ramanathan Muthaiah
Am interested too in gathering such details. Pls do share details when you 
crack this nut :-)

On Saturday, December 31, 2016 at 5:53:19 AM UTC+5:30, David Karr wrote:
>
> In the detail for a pipeline job, there are lines like "commit 
> notification ",  "started by timer", or "started by user ".  
> I'd like to 
>
get access to that text in the pipeline job, especially if it was the first 
> one.  I've looked through the list of variables provided in the context of 
> the pipeline script, but I don't see anything that would obviously contain 
> this.  How can I get this information? 
>

/Ram 

-- 
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/72a59372-6c1e-4a62-8bc8-59c27a17a9f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins installed as a service on Windows running processes on Linux

2016-12-31 Thread Ramanathan Muthaiah
This does not look like Jenkins issue per se.

I installed SSH remote hosts in Jenkins and I was able to connect to the 
> Linux server by building the Job. However, when I execute the PeopleSoft 
> command (pssqr...) I am getting a 'sudo...' error.
>
> I am missing something for my setup?
>

If I were you, would be doing these to check this error:

Build job is executed as 'what user', determine from the build logs.

On the Linux box, if I can connect via ssh (independent of Jenkins), as 
what user PeopleSoft commands can be run ?
 

> Would my existing setup work or I need to install Jenkins master 
> Server/Client with the Client on Jenkins?
>

Not sure if this is needed.

It would help if you could share details on any scripts you use while the 
job is tirggered ? like, using  any shell or pipeline scripts or ansible 
playbooks ?

/Ram

-- 
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/734c686d-74d8-4514-96f1-666ee3599108%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trouble using shared pipeline libraries

2016-12-30 Thread Ramanathan Muthaiah
Hi Torsten,
 

> try to separate your Jenkinsfile from the code of your shared library. 
> Usually the shared library provides some global functions that you may 
> re-use in some Jenkinsfile(s)
> => the library is shared code, the Jenkinsfile belongs to your project(s) 
> using that library.
>

[Ram] : I did start writing the library with this separation ; after 
re-reading the documentation, moved this library has been moved to it's own 
repo. 

Than, make sure you know what version of the library you are using:
> - configure it in Jenkins/manage Jenkins -> global shared library. Here 
> you´ll have to setup repo, branch, credentials to your shared library.
> You can also configure it on a per folder base and you may reference it 
> using the annotation@Library('somelib')
>

[Ram] : Updated this configuration too.

With these changes, global shared libs are now usable from the Jenkinsfile.

/Ram
 

-- 
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/16b19116-dc06-46a4-a475-2d2c7344b566%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to see groovy script editor in pipeline job

2016-12-29 Thread Ramanathan Muthaiah
Minor correction in my previous post:

On Thursday, December 29, 2016 at 3:09:47 PM UTC+5:30, pa7751 wrote:
>>
>> I have created a Jenkins Pipeline Job. However, I am unable to see the 
>> option to enter the pipeline script. Attached is the screenshot. Pls 
>> suggest how I can get the editor. I am using jenkins v2.32.1
>>
>
1. Sourcing from SCM:
 

> Create Jenkinsfile and store it in the root of your repo. Setting, 
> "Pipeline Script from Jenkinsfile" will pull it from your version control.
>

2. Using in-line editor

Choose the "Pipeline Script" option, editor should show up on the same UI 
page.

3. Pipeline Script from SCM

And, then there is the third option to be more specific with SCM (git / 
subversion and provide details of repo, credentials, etc.) if you choose, 
"Pipeline Script from SCM"

However, all this depends on the version of Jenkins and the plugins 
installed.

/Ram

-- 
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/201a9b07-5a14-4623-af98-0bae8531b395%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to see groovy script editor in pipeline job

2016-12-29 Thread Ramanathan Muthaiah
Hello,

On Thursday, December 29, 2016 at 3:09:47 PM UTC+5:30, pa7751 wrote:
>
> I have created a Jenkins Pipeline Job. However, I am unable to see the 
> option to enter the pipeline script. Attached is the screenshot. Pls 
> suggest how I can get the editor. I am using jenkins v2.32.1
>

Create Jenkinsfile and store it in the root of your repo. Setting, 
"Pipeline from SCM" will pull it from your version control tool.

/Ram 

-- 
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/c6a402a7-6a8f-4c7c-b592-f85c88653141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Remote trigger configuration

2016-12-25 Thread Ramanathan Muthaiah


> I am not able to configure the jenkins for remote trigger. Few years back 
> I had done this, with older version using "Manage Credentials" option. But 
> the latest versions don't have Manage Credentials option to configure 
> hostname, hostname and port, etc options. And the docs in internet/google 
> point to older documents which tell to configure with "Manage Credentials" 
> only. Please help me on this.
>

Are you looking to do remote trigger the build for a particular project / 
job setup in Jenkins ?
If so, then look for "Trigger build remotely (e.g. scripts)" in the job 
configuration.
Remember this will expect you to pass the token of the user.

/Ram 

-- 
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/a4012caf-28e1-4451-b534-67c7420f5df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trouble using shared pipeline libraries

2016-12-25 Thread Ramanathan Muthaiah
Here are some details but am not confident about my setup based on what 
you're asking.
Maybe, you can help me to clarify what am doing incorrectly. 

* how does your Jenkisfile look like
>
[Ram] : Jenkinsfile content is:

buildUtils("git")
 

> * do you have global shared library configured or per folder? 
>
[Ram] : Looks like am missing some configuration here but fail to 
understand what is it from the plugin docs ?
 

> * which version of the shared library do you adress? Is your script 
> available in that version?
>
[Ram] : Am not sure if understood your question. Shared Groovy library 
plugin installed is v2.5
 

> * do you have same script in the internal repo? 
>
[Ram] : Jenkinsfile and vars/buildUtils.groovy are in the same repo 

TIA,
/Ram

-- 
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/74031c7b-1bb2-4ee7-8f8b-e69a331e23ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Trouble using shared pipeline libraries

2016-12-22 Thread Ramanathan Muthaiah
Am running Jenkins v2.3x with Pipeline plugin running at v2.x

In the repo root, I have a Jenkinsfile from which shared library is meant 
to be used.

repo_root / 
 |_ Jenkinsfile
 |
 |_ vars /
 |
 | buildUtils.groovy

Within the buildUtils.groovy, this is the code snippet:

#!groovy

def call(body) {

def config = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()

node('linux') {
checkout scm
def url = "https://github.com/jenkinsci/${config.name}-plugin.git";
echo " == URL with repo name == "
echo "${url}"
}
}


With this setup in place, running Jenkins build job for this repo, fails 
with this error:

[Pipeline] End of Pipelinejava.lang.NoSuchMethodError: No such DSL method 
'buildUtils' found among steps 

I have been scourging forums here, in SO, in Google but no real solutions seem 
to 
be available (atleast, it seems to escape my eyes).

What's going wrong here ?

TIA,
/Ram


-- 
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/ebb3f082-7fea-4e72-b5b6-c1752c19d5db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using Rundeck as a step in Pipeline script ?

2016-12-21 Thread Ramanathan Muthaiah
Am experimenting with Jenkins v2.36 and Rundeck v2.x ; have installed 
Rundeck plugin in Jenkins master.

For few days, I have been Googling to find / know how to use Rundeck within 
Pipeline scripts ?

So far, have not found any source on the Net on this topic. Does anyone in 
this group have experience ?

P.S:
As a fallback option, installed Rundeck CLI and wrote a short shell script 
invoked from Pipeline script.

TIA,
Ram

-- 
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/57aa6279-f97f-416e-a1d5-1d00f6456b2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.