Re: Jenkins build says successful but no output is seen

2017-02-24 Thread Sharan Basappa
David,

I will remove everything and start with just pwd. I will update how it goes.
Maybe it is not related but one thing I changed recently was the native 
shell. I changed from sh to csh

On Friday, 24 February 2017 17:39:07 UTC+5:30, Daniel Beck wrote:

>
> > On 21.02.2017, at 19:09, Sharan Basappa <sharan@gmail.com 
> > wrote: 
> > 
> > Snippet of Jenkins log: 
> > 
>
> Is that the minimal Pipeline script exhibiting the problem, i.e. is the 
> git checkout necessary? What happens when you remove everything but the 'sh 
> "pwd"' that doesn't work, does it work then? 
>
>

-- 
You received this message because you are subscribed to the Google 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/76e552ca-3b77-4931-99fc-73651164d6ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins build says successful but no output is seen

2017-02-23 Thread Sharan Basappa
Hi David,

Is there any other forum where I can get help? I haven't got much inputs on
this forum

On Fri, Feb 24, 2017 at 12:08 AM, David Karr <davidmichaelk...@gmail.com>
wrote:

> On Wed, Feb 22, 2017 at 9:36 AM, Sharan Basappa
> <sharan.basa...@gmail.com> wrote:
> > folks, need some guidance here ... thanks
> >
> > On Tuesday, 21 February 2017 23:39:43 UTC+5:30, Sharan Basappa wrote:
> >>
> >> My Jenkins build job indicates success but none of the scripts I am
> >> executing seem to do anything. I put a simple "pwd" command to echo
> current
> >> working directory but nothing happens. All Jenkins reports is "Running
> shell
> >> script" and then nothing is seen.
> >>
> >>
> >> Snippet of Jenkins log:
> >>
> >> First time build. Skipping changelog. [Pipeline] sh
> >> [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A]
> >> Running shell script [Pipeline] sh
> >> [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A]
> >> Running shell script [Pipeline] sh
> >> [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A]
> >> Running shell script [Pipeline] sh
> >> [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A]
> >> Running shell script [Pipeline] } [Pipeline] // node [Pipeline] End of
> >> Pipeline Finished: SUCCESS
> >>
> >>
> >> Jenkinsfile that is used to define the builds:
> >>
> >> node { stage 'build' sh "echo ${env.BRANCH_NAME}" git url:
> >> 'git@hd1:testing', branch: "${env.BRANCH_NAME}" sh "ls -rtl" sh "pwd"
> sh
> >> "csh ${workspace}/simple.csh" sh "csh ${workspace}/source.csh" }
>
> I'm not an expert, but I would change your syntax to "stage ('build')
> { ... }". The parens probably aren't necessary, but the closure syntax
> likely is.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/Dj6hRGzzJZs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAA5t8VoRVBPFv52GKzNLc7mYGxr_
> v4ooL20_r_JWeH5ORSALXQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CACfoTn7RLBQdd87Tnz-QaXED0oTri4Zx0a-v%2Bth11R31is0pdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


build successful but nothing happens

2017-02-23 Thread Sharan Basappa
** opening a new post as no one responded to my original post. I just need 
some direction. That's all **

My Jenkins build job indicates success but none of the scripts I am 
executing seem to do anything. I put a simple "pwd" command to echo current 
working directory but nothing happens. All Jenkins reports is "Running 
shell script" and then nothing is seen.

Snippet of Jenkins log:

First time build. Skipping changelog. [Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS


Jenkinsfile that is used to define the builds:

node { stage 'build' sh "echo ${env.BRANCH_NAME}" git url: 'git@hd1:testing'
, branch: "${env.BRANCH_NAME}" sh "ls -rtl" sh "pwd" sh "csh 
${workspace}/simple.csh" sh "csh ${workspace}/source.csh" }

-- 
You received this message because you are subscribed to the Google 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/98362de9-9a67-48de-9673-e24348d201d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins build says successful but no output is seen

2017-02-22 Thread Sharan Basappa
folks, need some guidance here ... thanks

On Tuesday, 21 February 2017 23:39:43 UTC+5:30, Sharan Basappa wrote:
>
> My Jenkins build job indicates success but none of the scripts I am 
> executing seem to do anything. I put a simple "pwd" command to echo current 
> working directory but nothing happens. All Jenkins reports is "Running 
> shell script" and then nothing is seen.
>
> Snippet of Jenkins log:
>
> First time build. Skipping changelog. [Pipeline] sh [an_example_test3-
> 26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell 
> script [Pipeline] sh [an_example_test3-
> 26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell 
> script [Pipeline] sh [an_example_test3-
> 26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell 
> script [Pipeline] sh [an_example_test3-
> 26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell 
> script [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline 
> Finished: SUCCESS
>
>
> Jenkinsfile that is used to define the builds:
>
> node { stage 'build' sh "echo ${env.BRANCH_NAME}" git url: 
> 'git@hd1:testing', branch: "${env.BRANCH_NAME}" sh "ls -rtl" sh "pwd" sh "csh 
> ${workspace}/simple.csh" sh "csh ${workspace}/source.csh" }
>
>
>
>

-- 
You received this message because you are subscribed to the Google 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/97f1f8dd-dc68-452e-966e-abaed2d70cc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins build says successful but no output is seen

2017-02-21 Thread Sharan Basappa


My Jenkins build job indicates success but none of the scripts I am 
executing seem to do anything. I put a simple "pwd" command to echo current 
working directory but nothing happens. All Jenkins reports is "Running 
shell script" and then nothing is seen.

Snippet of Jenkins log:

First time build. Skipping changelog. [Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] sh [an_example_test3-
26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [
Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS


Jenkinsfile that is used to define the builds:

node { stage 'build' sh "echo ${env.BRANCH_NAME}" git url: 'git@hd1:testing'
, branch: "${env.BRANCH_NAME}" sh "ls -rtl" sh "pwd" sh "csh 
${workspace}/simple.csh" sh "csh ${workspace}/source.csh" }



-- 
You received this message because you are subscribed to the Google 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/264cf466-6de8-4afe-8d16-b5b40713955d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: environment variables not getting set

2017-02-15 Thread Sharan Basappa
Mark,

I think you are referring to point 9 of the article. But that's not I am 
looking for.
We already have environment variables in our .bashrc/.cshrc and there are a 
quite few of them.
So, ideally, we would like to re-use these instead of adding all these 
variables in Jenkins or in my pipeline code.
So, something to leverage existing set-up scripts would be an effective 
approach.

On Thursday, 16 February 2017 01:11:25 UTC+5:30, Mark Waite wrote:

> Refer to item 9 at 
> https://www.cloudbees.com/blog/top-10-best-practices-jenkins-pipeline-plugin
>  .
>
> Mark Waite
>
> On Wed, Feb 15, 2017 at 10:59 AM Sharan Basappa <sharan@gmail.com 
> > wrote:
>
>> In my pipeline script, I am running another script that compiles and runs 
>> tests.
>> The script runs some jobs on sungrid. When the build is run, I see that 
>> qrsh (which is the command to launch job on sungrid) was not found.
>> I went back and executed env to check the path and as expected the path 
>> to sungrid was not set.
>>
>> The first thing I did was to go back and add proper path to sungrid in 
>> .bashrc file of Jenkins user.
>> That did not solve the issue as expected, as Jenkins will not run under 
>> bash.
>> Then I created a new file to set proper path and then gave the path in 
>> Jenkins build (using prepare environment I guess ... I don't remember as I 
>> don't have access to Jenkins currently). But this did not help either.
>>
>> I need some help ...
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/3a032339-9981-41e0-ad07-5d3cd2285ea8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/3a032339-9981-41e0-ad07-5d3cd2285ea8%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

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


environment variables not getting set

2017-02-15 Thread Sharan Basappa
In my pipeline script, I am running another script that compiles and runs 
tests.
The script runs some jobs on sungrid. When the build is run, I see that 
qrsh (which is the command to launch job on sungrid) was not found.
I went back and executed env to check the path and as expected the path to 
sungrid was not set.

The first thing I did was to go back and add proper path to sungrid in 
.bashrc file of Jenkins user.
That did not solve the issue as expected, as Jenkins will not run under 
bash.
Then I created a new file to set proper path and then gave the path in 
Jenkins build (using prepare environment I guess ... I don't remember as I 
don't have access to Jenkins currently). But this did not help either.

I need some help ...

-- 
You received this message because you are subscribed to the Google 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/3a032339-9981-41e0-ad07-5d3cd2285ea8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline documentation jenkins-book vs realty?

2017-02-13 Thread Sharan Basappa
Tyler,

I have a few questions for which I could not find answers after going 
through the documentation.
Unfortunately, understanding of these are necessary for anyone to create a 
decent build jobs.

1) Jenkins seems to be executing from a directory named @tmp (and some 
other names). The files I am referring are not available in @tmp directory 
and hence
the pipeline stage is exiting
2) secondly, why Jenkins creates another  directory @tmp when I would like 
to execute a command from my workspace.
All the references made by the script are available here.
3) I have also seen that sometimes the files from git are available but 
.git itself is missing

Can you comment?

On Monday, 13 February 2017 19:31:37 UTC+5:30, R Tyler Croy wrote:

> (replies inline) 
>
> On Mon, 13 Feb 2017, christian polzer wrote: 
>
> > Hello, 
> > 
> > I am currently trying to spread pipeline usage for a jenkins environment 
> > within my fellow coworkers. 
> > Of course, th jenkins pipeline is greatly embrased :) 
> > 
> > But what is the documentation in the jenkins book about? Fellow CoCoders 
> > stumble over the jenkinsfile chapter as the examples are not working: 
> > https://jenkins.io/doc/book/pipeline/ 
> > 
> > What documentation do you guys use? 
>
>
> What examples are not working for you? I wrote almost all of them and I'm 
> pretty sure every single one works, perhaps I made a typo. 
>
> Could you share the error you're seeing and the corresponding Jenkinsfile 
> example? 
>
>
> Cheers 
> - R. Tyler Croy 
>
> -- 
>  Code:  
>   Chatter:  
>  xmpp: rty...@jabber.org  
>
>   % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F 
> -- 
>

-- 
You received this message because you are subscribed to the Google 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/db210f22-0ea7-4fc8-a680-ee91c6db22b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch pipeline - source code present but .git file missing

2017-02-12 Thread Sharan Basappa
Thank you, Daniel and Mark. Unfortunately, none of these things are 
documented. At least that I know of.
That's when I actually put sh "ls" in the pipeline script to list. When I 
found my files, I assumed everything is taken care by Jenkins.

Coming to checkout - how can I make out that I checkout the correct branch. 
As everything is happening automatically. I cannot predict what branch name
an user would check-in with. I see that Jenkins itself is checking out the 
branch that has changed.

Regards,
Sharan


On Sunday, 12 February 2017 09:17:10 UTC+5:30, Mark Waite wrote:

> Sharan,
>
> Daniel was trying to tell you that you're misunderstanding what is a 
> workspace and what isn't a workspace.
>
> The place where you're finding the Jenkinsfile is a temporary holding 
> location that exists for the purpose of reading the Jenkinsfile.  It is not 
> a workspace.  It is not a place where you should expect to find the rest of 
> your code.  At the moment, that temporary holding location happens to also 
> include other files, but that is more an accident of the nature of git than 
> it is a capability on which you can rely.
>
> In order to use your source code in a Jenkins pipeline, you need to 
> checkout that source code in one of the early stages of your pipeline.  The 
> examples you've shared don't seem to include a "checkout scm" step, so you 
> have no sources to use.
>
> For examples of the syntax of "checkout scm", you can use the "Pipeline 
> Syntax" hyperlink on the left of pipeline job pages.
>
> Mark Waite
>
> On Sat, Feb 11, 2017 at 7:08 AM Sharan Basappa <sharan@gmail.com 
> > wrote:
>
>> Daniel,
>>
>> Don't try to be clever here. `checkout scm`.
>>
>> You are giving me more credit than I deserve. 
>>
>> I really don't understand how source files from Git can appear in the 
>> workspace and .git dir is missing.
>> In fact, for all the source files corresponding to every branch, there is 
>> no .git dir.
>> I have seen this issue only when I started using multibranch pipeline and 
>> not with pipeline or other build job types.
>> Also, in this case alone, I am using Jenkinsfile driven build steps
>>
>>
>> On Saturday, 11 February 2017 15:16:23 UTC+5:30, Daniel Beck wrote:
>>
>>>
>>> > On 11.02.2017, at 05:02, Sharan Basappa <sharan@gmail.com> wrote: 
>>> > 
>>> > 3) I am not checking out any repository explicitly in my Jenkinsfile - 
>>> I still find source code in the workspace through 
>>>
>>> That's probably the reason, and the reason it's in a wrong directory. 
>>> Don't try to be clever here. `checkout scm`. 
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/eebf0cb3-d3ec-4298-bef9-8ed3baa87bb8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/eebf0cb3-d3ec-4298-bef9-8ed3baa87bb8%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

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


Re: Multibranch pipeline - source code present but .git file missing

2017-02-11 Thread Sharan Basappa
Daniel,

Don't try to be clever here. `checkout scm`.

You are giving me more credit than I deserve. 

I really don't understand how source files from Git can appear in the 
workspace and .git dir is missing.
In fact, for all the source files corresponding to every branch, there is 
no .git dir.
I have seen this issue only when I started using multibranch pipeline and 
not with pipeline or other build job types.
Also, in this case alone, I am using Jenkinsfile driven build steps


On Saturday, 11 February 2017 15:16:23 UTC+5:30, Daniel Beck wrote:

>
> > On 11.02.2017, at 05:02, Sharan Basappa <sharan@gmail.com 
> > wrote: 
> > 
> > 3) I am not checking out any repository explicitly in my Jenkinsfile - I 
> still find source code in the workspace through 
>
> That's probably the reason, and the reason it's in a wrong directory. 
> Don't try to be clever here. `checkout scm`. 
>
>

-- 
You received this message because you are subscribed to the Google 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/eebf0cb3-d3ec-4298-bef9-8ed3baa87bb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Multibranch pipeline - source code present but .git file missing

2017-02-10 Thread Sharan Basappa
I am using multi-branch pipeline and I find that source code is present 
under {workspace}@script directory but .git files are missing in any of the 
directories.
So, when I try to stash so that I can move to another branch, I get error 
saying that, "it does not appear to be a git repository"

Let me know what the issue is?

The following are some additional information:
1) I am using Jenkinsfile that is at the root of my git repository
2) I have created a Jenkins job using multi-branch pipeline and have only 
given path to git and only option to pool SCM every minute
3) I am not checking out any repository explicitly in my Jenkinsfile - I 
still find source code in the workspace through

-- 
You received this message because you are subscribed to the Google 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/18112354-49a6-4852-8b3f-7724ff0211a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with pipeline

2017-02-10 Thread Sharan Basappa
Folks,

At this point, I am so confused.

My Jenkins file is kept at the root of Git directory. I am doing this in 
branches where I want to do Jenkins build.
I am using multibranch pipeline plug-in to define the build on Jenkins 
server.

As I am doing only mock set-up for now, the pipeline job is very simple and 
looks as follows. Can someone explain where I am going wrong?
The log below clearly reports that it is checking out test3 branch. So, I 
expect repository to be checked out correctly.

node {

stage 'build'

sh "pwd"

sh "ls ${workspace}@script"

sh "echo $PATH"

sh "cat  ${workspace}@script/simple.csh"

sh "csh  ${workspace}@script/simple.csh"

 

stage 'merge'

sh 'git stash'

sh 'git checkout master'

sh 'git merge test3'

sh 'git commit -am "Merged test3 branch to master"'

sh "git push origin master"

}

The script executes all the way till "git stash" and at this point, it 
reports error.
I have attached the entire log. 

Branch indexing
> git rev-parse --is-inside-work-tree # timeout=10
Setting origin to git@hd1:testing
> git config remote.origin.url git@hd1:testing # timeout=10
Fetching origin...
Fetching upstream changes from origin
> git --version # timeout=10
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master
Seen branch in repository origin/test
Seen branch in repository origin/test1
Seen branch in repository origin/test2
Seen branch in repository origin/test3
Seen branch in repository origin/test4
Seen branch in repository origin/testx
Seen 7 remote branches
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@hd1:testing # timeout=10
Fetching upstream changes from git@hd1:testing
> git --version # timeout=10
> git fetch --tags --progress git@hd1:testing 
+refs/heads/*:refs/remotes/origin/*
Checking out Revision f5eabd27c25242cc35d0b597537c3a3bcec8f54f (test3)
> git config core.sparsecheckout # timeout=10
> git checkout -f f5eabd27c25242cc35d0b597537c3a3bcec8f54f
> git rev-list 18552ecf03f27679cb0d88f28c096d5c7ec33d99 # timeout=10
[Pipeline] node Running on master in 
/var/lib/jenkins/workspace/an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A
[Pipeline] { [Pipeline] stage (build) Using the ‘stage’ step without a 
block argument is deprecated
Entering stage build
Proceeding
[Pipeline] sh 
[an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] 
Running shell script
+ pwd
/var/lib/jenkins/workspace/an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A
[Pipeline] sh 
[an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] 
Running shell script
+ ls 
/var/lib/jenkins/workspace/an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A@script
avalon_asrts.sv
binding.sv
dir1
Jenkinsfile
Just_Checking
simple.csh
source.csh
tb_avalon_asrts.sv
[Pipeline] sh 
[an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] 
Running shell script
+ echo /sbin:/usr/sbin:/bin:/usr/bin
/sbin:/usr/sbin:/bin:/usr/bin
[Pipeline] sh 
[an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] 
Running shell script
+ cat 
/var/lib/jenkins/workspace/an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A@script/simple.csh
#!/bin/csh -f -e -x
echo "welcome to Jenkins from test2 branch"
\rm -f t
echo "junk" > t
exit 0
[Pipeline] sh 
[an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] 
Running shell script
+ csh 
/var/lib/jenkins/workspace/an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A@script/simple.csh
welcome to Jenkins from test2 branch
[Pipeline] stage (merge) Using the ‘stage’ step without a block argument is 
deprecated
Entering stage merge
Proceeding
[Pipeline] sh 
[an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] 
Running shell script
+ git stash
fatal: Not a git repository (or any of the parent directories): .git
[Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script 
returned exit code 128
*Finished* <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE


On Tuesday, 7 February 2017 23:45:06 UTC+5:30, Sharan Basappa wrote:

> Hi All,
>
> I am having some trouble executing basic shell commands (highlighted in 
> red). I cant figure out the issue. Need some help. This is what I get:
>
> Branch indexing
>
> > git rev-parse --is-inside-work-tree # timeout=10
>
> Setting origin to git@hd1:testing
>
> > git config remote.origin.url git@hd1:testing # timeout=10
>
> Fetching origin...
>
> Fetching upstream changes from origin
>
> > git --version # timeout=10
>
> > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
>

Re: Pipeline - merge and push

2017-02-08 Thread Sharan Basappa
The issues is, the files generated during testing cannot be predicted and
can keep changing. Also, even if I put them in Git ignore, how would
checkout still work as the files are still local to my repo branch?

On 9 Feb 2017 11:17 a.m., "Indra Gunawan (ingunawa)" <ingun...@cisco.com>
wrote:

> I would recommend that you include these files in a .gitignore so they are
> ignored by git.
>
>
>
> -Indra
>
>
>
> *From: *<jenkinsci-users@googlegroups.com> on behalf of Sharan Basappa <
> sharan.basa...@gmail.com>
> *Reply-To: *"jenkinsci-users@googlegroups.com" <
> jenkinsci-users@googlegroups.com>
> *Date: *Wednesday, February 8, 2017 at 6:27 PM
> *To: *Jenkins Users <jenkinsci-users@googlegroups.com>
> *Subject: *Pipeline - merge and push
>
>
>
>
>
> I have created a pipeline script. The pipeline script runs in a 'topic'
> branch (e.g. my_feature).
>
> Once test stage is successful, I would like to merge this into the master
> branch and then push the changes to remote.
>
>
>
> However, I have some doubts. My test stage creates many intermediate files
> that would not be checked-in but are necessary for debug and analysis.
>
> So, in order to merge, I need to first checkout the master branch. Doing
> this creates issue as I have untracked files.
>
> But if I do git clean, I lose important log files that I might need for
> the next few days.
>
> How can I handle this? Would git stash help in this case?
>
>
>
> 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/e5b657d1-44c8-4445-b1e5-377e596ba94d%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/e5b657d1-44c8-4445-b1e5-377e596ba94d%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/NVBBXLVevnM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/63429949-127D-424B-9EBE-88B6A2C9E5F3%40cisco.com
> <https://groups.google.com/d/msgid/jenkinsci-users/63429949-127D-424B-9EBE-88B6A2C9E5F3%40cisco.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Pipeline - merge and push

2017-02-08 Thread Sharan Basappa

I have created a pipeline script. The pipeline script runs in a 'topic' 
branch (e.g. my_feature).
Once test stage is successful, I would like to merge this into the master 
branch and then push the changes to remote.

However, I have some doubts. My test stage creates many intermediate files 
that would not be checked-in but are necessary for debug and analysis.
So, in order to merge, I need to first checkout the master branch. Doing 
this creates issue as I have untracked files.
But if I do git clean, I lose important log files that I might need for the 
next few days.
How can I handle this? Would git stash help in this case?

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/e5b657d1-44c8-4445-b1e5-377e596ba94d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pipeline steps

2017-02-08 Thread Sharan Basappa

I would like to know if I have multiple steps in my pipeline script and if 
any one of the steps fails then subsequent steps would not be executed and 
build would terminate.
Is my understanding correct?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/df62a28e-8230-4930-8a1c-71c32b4e8d53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with pipeline

2017-02-08 Thread Sharan Basappa
folks,

I was able to resolve this by using {workspace}@script to access the files 
in the workspace.
But I would like to understand the reason behind having files in 
{workspace}@script rather than {workspace} ...

On Wednesday, 8 February 2017 15:51:09 UTC+5:30, Sharan Basappa wrote:

> Some updates from the experiments I tried out. I directly logged into the 
> Linux machine where Jenkins is installed.
> I cd'ed into the workspace and listed the files. My scripts are not listed.
> I also found additional directories with @scripts suffix to the 
> directories.
> There the files are listed. Please see the transcript below. I am lost now 
> ...
>
> [root@hd1 workspace]# ls 
> an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>
> [root@hd1 workspace]#
>
> [root@hd1 workspace]# ls 
> an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA@script
>
> avalon_asrts.sv  binding.sv  dir1  Jenkinsfile  Just_Checking  
> simple.csh  source.csh  tb_avalon_asrts.sv
>
> [root@hd1 workspace]# ls 
> an_example_testx-PIODN73ROEXZPUFF2FZCSVYPXYDLWSUW4QWZH4CJIGKQA2HJSI3A\@script/
>
> avalon_asrts.sv  binding.sv  dir1  Jenkinsfile  Just_Checking  
> simple.csh  source.csh  tb_avalon_asrts.sv
>
> [root@hd1 workspace]# ls 
> an_example_test-JXUTXQYEXLBFTQ57MDSHQEWRX4WVYMTOO7GTJHX5PXY7SUM2PYKA\@script/
>
> Jenkinsfile  Just_Checking  simple.csh  temp
>
>
> On Wednesday, 8 February 2017 07:54:45 UTC+5:30, Sharan Basappa wrote:
>
>> If you see the sequence of commands, you will notice that I have used pwd.
>> Let me list files and see if I can find anything
>>
>> On Wednesday, 8 February 2017 02:09:54 UTC+5:30, David Karr wrote:
>>
>>> On Tuesday, February 7, 2017 at 10:15:06 AM UTC-8, Sharan Basappa wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I am having some trouble executing basic shell commands (highlighted in 
>>>> red). I cant figure out the issue. Need some help. This is what I get:
>>>>
>>>> Branch indexing
>>>>
>>>> > git rev-parse --is-inside-work-tree # timeout=10
>>>>
>>>> Setting origin to git@hd1:testing
>>>>
>>>> > git config remote.origin.url git@hd1:testing # timeout=10
>>>>
>>>> Fetching origin...
>>>>
>>>> Fetching upstream changes from origin
>>>>
>>>> > git --version # timeout=10
>>>>
>>>> > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
>>>>
>>>> Seen branch in repository origin/master
>>>>
>>>> Seen branch in repository origin/test
>>>>
>>>> Seen branch in repository origin/test1
>>>>
>>>> Seen branch in repository origin/testx
>>>>
>>>> Seen 4 remote branches
>>>>
>>>> > git rev-parse --is-inside-work-tree # timeout=10
>>>>
>>>> Fetching changes from the remote Git repository
>>>>
>>>> > git config remote.origin.url git@hd1:testing # timeout=10
>>>>
>>>> Fetching upstream changes from git@hd1:testing
>>>>
>>>> > git --version # timeout=10
>>>>
>>>> > git fetch --tags --progress git@hd1:testing 
>>>> +refs/heads/*:refs/remotes/origin/*
>>>>
>>>> Checking out Revision eb966a50720c888113925000ad9179c79b1c187b (test1)
>>>>
>>>> > git config core.sparsecheckout # timeout=10
>>>>
>>>> > git checkout -f eb966a50720c888113925000ad9179c79b1c187b
>>>>
>>>> > git rev-list eb966a50720c888113925000ad9179c79b1c187b # timeout=10
>>>>
>>>> [Pipeline] stage (build)
>>>>
>>>> Using the ‘stage’ step without a block argument is deprecated
>>>>
>>>> Entering stage build
>>>>
>>>> Proceeding
>>>>
>>>> [Pipeline] node
>>>>
>>>> Running on master in 
>>>> /var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>>>>
>>>> [Pipeline] {
>>>>
>>>> [Pipeline] sh
>>>>
>>>> [an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
>>>> Running shell script
>>>>
>>>> + pwd
>>>>
>>>>
>>>> /var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>>>>
>>>> [Pipeline] sh
>>>>
>>>> [an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
>>>> Running shell script
>>>>
>>>> + cat simple.csh
>>>>
>>>> *cat: simple.csh: No such file or directory*
>>>>
>>>
>>> When I run into issues like this, I often will run "sh('pwd')" and 
>>> "sh('ls')" in the script, to verify exactly where I think I am, and what 
>>> else is in the directory. The output from those should help.
>>>  
>>>
>>>> [Pipeline] }
>>>>
>>>> [Pipeline] // node
>>>>
>>>> [Pipeline] End of Pipeline
>>>>
>>>> ERROR: script returned exit code 1
>>>>
>>>> Finished: FAILURE
>>>>
>>>>  
>>>>
>>>

-- 
You received this message because you are subscribed to the Google 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/562428d9-83f9-42b2-bd80-4a49a9394dad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with pipeline

2017-02-08 Thread Sharan Basappa
Some updates from the experiments I tried out. I directly logged into the 
Linux machine where Jenkins is installed.
I cd'ed into the workspace and listed the files. My scripts are not listed.
I also found additional directories with @scripts suffix to the directories.
There the files are listed. Please see the transcript below. I am lost now 
...

[root@hd1 workspace]# ls 
an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA

[root@hd1 workspace]#

[root@hd1 workspace]# ls 
an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA@script

avalon_asrts.sv  binding.sv  dir1  Jenkinsfile  Just_Checking  simple.csh  
source.csh  tb_avalon_asrts.sv

[root@hd1 workspace]# ls 
an_example_testx-PIODN73ROEXZPUFF2FZCSVYPXYDLWSUW4QWZH4CJIGKQA2HJSI3A\@script/

avalon_asrts.sv  binding.sv  dir1  Jenkinsfile  Just_Checking  simple.csh  
source.csh  tb_avalon_asrts.sv

[root@hd1 workspace]# ls 
an_example_test-JXUTXQYEXLBFTQ57MDSHQEWRX4WVYMTOO7GTJHX5PXY7SUM2PYKA\@script/

Jenkinsfile  Just_Checking  simple.csh  temp


On Wednesday, 8 February 2017 07:54:45 UTC+5:30, Sharan Basappa wrote:

> If you see the sequence of commands, you will notice that I have used pwd.
> Let me list files and see if I can find anything
>
> On Wednesday, 8 February 2017 02:09:54 UTC+5:30, David Karr wrote:
>
>> On Tuesday, February 7, 2017 at 10:15:06 AM UTC-8, Sharan Basappa wrote:
>>>
>>> Hi All,
>>>
>>> I am having some trouble executing basic shell commands (highlighted in 
>>> red). I cant figure out the issue. Need some help. This is what I get:
>>>
>>> Branch indexing
>>>
>>> > git rev-parse --is-inside-work-tree # timeout=10
>>>
>>> Setting origin to git@hd1:testing
>>>
>>> > git config remote.origin.url git@hd1:testing # timeout=10
>>>
>>> Fetching origin...
>>>
>>> Fetching upstream changes from origin
>>>
>>> > git --version # timeout=10
>>>
>>> > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
>>>
>>> Seen branch in repository origin/master
>>>
>>> Seen branch in repository origin/test
>>>
>>> Seen branch in repository origin/test1
>>>
>>> Seen branch in repository origin/testx
>>>
>>> Seen 4 remote branches
>>>
>>> > git rev-parse --is-inside-work-tree # timeout=10
>>>
>>> Fetching changes from the remote Git repository
>>>
>>> > git config remote.origin.url git@hd1:testing # timeout=10
>>>
>>> Fetching upstream changes from git@hd1:testing
>>>
>>> > git --version # timeout=10
>>>
>>> > git fetch --tags --progress git@hd1:testing 
>>> +refs/heads/*:refs/remotes/origin/*
>>>
>>> Checking out Revision eb966a50720c888113925000ad9179c79b1c187b (test1)
>>>
>>> > git config core.sparsecheckout # timeout=10
>>>
>>> > git checkout -f eb966a50720c888113925000ad9179c79b1c187b
>>>
>>> > git rev-list eb966a50720c888113925000ad9179c79b1c187b # timeout=10
>>>
>>> [Pipeline] stage (build)
>>>
>>> Using the ‘stage’ step without a block argument is deprecated
>>>
>>> Entering stage build
>>>
>>> Proceeding
>>>
>>> [Pipeline] node
>>>
>>> Running on master in 
>>> /var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>>>
>>> [Pipeline] {
>>>
>>> [Pipeline] sh
>>>
>>> [an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
>>> Running shell script
>>>
>>> + pwd
>>>
>>>
>>> /var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>>>
>>> [Pipeline] sh
>>>
>>> [an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
>>> Running shell script
>>>
>>> + cat simple.csh
>>>
>>> *cat: simple.csh: No such file or directory*
>>>
>>
>> When I run into issues like this, I often will run "sh('pwd')" and 
>> "sh('ls')" in the script, to verify exactly where I think I am, and what 
>> else is in the directory. The output from those should help.
>>  
>>
>>> [Pipeline] }
>>>
>>> [Pipeline] // node
>>>
>>> [Pipeline] End of Pipeline
>>>
>>> ERROR: script returned exit code 1
>>>
>>> Finished: FAILURE
>>>
>>>  
>>>
>>

-- 
You received this message because you are subscribed to the Google 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/8871501e-c02c-4755-b5d8-2faf820a1202%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with pipeline

2017-02-07 Thread Sharan Basappa
If you see the sequence of commands, you will notice that I have used pwd.
Let me list files and see if I can find anything

On Wednesday, 8 February 2017 02:09:54 UTC+5:30, David Karr wrote:

> On Tuesday, February 7, 2017 at 10:15:06 AM UTC-8, Sharan Basappa wrote:
>>
>> Hi All,
>>
>> I am having some trouble executing basic shell commands (highlighted in 
>> red). I cant figure out the issue. Need some help. This is what I get:
>>
>> Branch indexing
>>
>> > git rev-parse --is-inside-work-tree # timeout=10
>>
>> Setting origin to git@hd1:testing
>>
>> > git config remote.origin.url git@hd1:testing # timeout=10
>>
>> Fetching origin...
>>
>> Fetching upstream changes from origin
>>
>> > git --version # timeout=10
>>
>> > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
>>
>> Seen branch in repository origin/master
>>
>> Seen branch in repository origin/test
>>
>> Seen branch in repository origin/test1
>>
>> Seen branch in repository origin/testx
>>
>> Seen 4 remote branches
>>
>> > git rev-parse --is-inside-work-tree # timeout=10
>>
>> Fetching changes from the remote Git repository
>>
>> > git config remote.origin.url git@hd1:testing # timeout=10
>>
>> Fetching upstream changes from git@hd1:testing
>>
>> > git --version # timeout=10
>>
>> > git fetch --tags --progress git@hd1:testing 
>> +refs/heads/*:refs/remotes/origin/*
>>
>> Checking out Revision eb966a50720c888113925000ad9179c79b1c187b (test1)
>>
>> > git config core.sparsecheckout # timeout=10
>>
>> > git checkout -f eb966a50720c888113925000ad9179c79b1c187b
>>
>> > git rev-list eb966a50720c888113925000ad9179c79b1c187b # timeout=10
>>
>> [Pipeline] stage (build)
>>
>> Using the ‘stage’ step without a block argument is deprecated
>>
>> Entering stage build
>>
>> Proceeding
>>
>> [Pipeline] node
>>
>> Running on master in 
>> /var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>>
>> [Pipeline] {
>>
>> [Pipeline] sh
>>
>> [an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
>> Running shell script
>>
>> + pwd
>>
>>
>> /var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA
>>
>> [Pipeline] sh
>>
>> [an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
>> Running shell script
>>
>> + cat simple.csh
>>
>> *cat: simple.csh: No such file or directory*
>>
>
> When I run into issues like this, I often will run "sh('pwd')" and 
> "sh('ls')" in the script, to verify exactly where I think I am, and what 
> else is in the directory. The output from those should help.
>  
>
>> [Pipeline] }
>>
>> [Pipeline] // node
>>
>> [Pipeline] End of Pipeline
>>
>> ERROR: script returned exit code 1
>>
>> Finished: FAILURE
>>
>>  
>>
>

-- 
You received this message because you are subscribed to the Google 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/88f5e782-db7f-4df1-8c3f-fb822bfcd904%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Issue with pipeline

2017-02-07 Thread Sharan Basappa
Hi All,

I am having some trouble executing basic shell commands (highlighted in 
red). I cant figure out the issue. Need some help. This is what I get:

Branch indexing

> git rev-parse --is-inside-work-tree # timeout=10

Setting origin to git@hd1:testing

> git config remote.origin.url git@hd1:testing # timeout=10

Fetching origin...

Fetching upstream changes from origin

> git --version # timeout=10

> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*

Seen branch in repository origin/master

Seen branch in repository origin/test

Seen branch in repository origin/test1

Seen branch in repository origin/testx

Seen 4 remote branches

> git rev-parse --is-inside-work-tree # timeout=10

Fetching changes from the remote Git repository

> git config remote.origin.url git@hd1:testing # timeout=10

Fetching upstream changes from git@hd1:testing

> git --version # timeout=10

> git fetch --tags --progress git@hd1:testing 
+refs/heads/*:refs/remotes/origin/*

Checking out Revision eb966a50720c888113925000ad9179c79b1c187b (test1)

> git config core.sparsecheckout # timeout=10

> git checkout -f eb966a50720c888113925000ad9179c79b1c187b

> git rev-list eb966a50720c888113925000ad9179c79b1c187b # timeout=10

[Pipeline] stage (build)

Using the ‘stage’ step without a block argument is deprecated

Entering stage build

Proceeding

[Pipeline] node

Running on master in 
/var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA

[Pipeline] {

[Pipeline] sh

[an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
Running shell script

+ pwd

/var/lib/jenkins/workspace/an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA

[Pipeline] sh

[an_example_test1-24PKZ6E7JM3ZFPAWUPX5ZXTQQLVB7HDDUSAFFRMP6IX3XZERQFTA] 
Running shell script

+ cat simple.csh

*cat: simple.csh: No such file or directory*

[Pipeline] }

[Pipeline] // node

[Pipeline] End of Pipeline

ERROR: script returned exit code 1

Finished: FAILURE

 

-- 
You received this message because you are subscribed to the Google 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/73d02186-75a9-4e8a-8787-5ca05cc38ba5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: wildcard for branch name

2017-01-28 Thread Sharan Basappa
Mark,

I cant use freestyle job for the simple reason that, what we are doing 
would become a sort of best practice for many projects.
Gui based approach is, in my view,  not a good way to share the best 
practice.

I will check out multi branch pipeline. Thanks a lot

On Saturday, 28 January 2017 19:27:56 UTC+5:30, Mark Waite wrote:

> The freestyle job is a single job which would build each branch that 
> matches as part of that single job.
>
> The multi-branch pipeline will automatically create a job per branch which 
> matches the wildcard and has a Jenkinsfile.  That's where you ultimately 
> want to go.
>
> Mark Waite
>
> On Sat, Jan 28, 2017 at 5:29 AM Sharan Basappa <sharan@gmail.com 
> > wrote:
>
>> Hi Mark, Indra,
>>
>> If I use wildcard as a branch specifier then what would happen if there 
>> are multiple matches?
>> I would like to know this because my requirement is take each branch and 
>> then build each of them separately.
>>
>>
>> On Thursday, 26 January 2017 20:21:13 UTC+5:30, Indra Gunawan (ingunawa) 
>> wrote:
>>
>>> HI Sharan,
>>>
>>>  
>>>
>>> I sent this already:
>>>
>>>  
>>>
>>>  
>>>
>>> You can’t use the simple git pipeline command if you want to be fancy
>>>
>>>  
>>>
>>> You should use the form where you can specify more options like 
>>> configuring Git SCM:
>>>
>>>  
>>>
>>> checkout scm: [$class: 'GitSCM', branches: [[name: '*/test*']], 
>>> userRemoteConfigs: [[url: 'git@hd1:testing']]]
>>>
>>>  
>>>
>>>  
>>>
>> *From: *<jenkins...@googlegroups.com> on behalf of Sharan Basappa <
>>> sharan@gmail.com>
>>> *Reply-To: *"jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
>>>
>>
>>> *Date: *Thursday, January 26, 2017 at 4:03 AM
>>>
>> *To: *Jenkins Users <jenkins...@googlegroups.com>
>>>
>>
>>> *Subject: *Re: Pipeline: wildcard for branch name
>>>
>>  
>>>
>>> Hi David,
>>>
>>>  
>>>
>>> I am new to continuous integration and Jenkins, so I need inputs to go 
>>> in the right direction.
>>>
>>> My requirement is that users push branches with name test_id1/test_id2 
>>> etc.
>>>
>>> I would like to build only when users have created branches with the 
>>> above name.
>>>
>>>  
>>>
>>> So, after seeing the responses, it looks like I have to:
>>>
>>> 1)  first checkout the repository
>>>
>>> 2)  list out the branches, 
>>>
>>> 3)  if branch name matches test* then I checkout the corresponding 
>>> branch and do rest of the build
>>>
>>>  
>>>
>>> I need inputs here ...
>>>
>>>
>>> On Wednesday, 25 January 2017 04:53:20 UTC+5:30, David Karr wrote:
>>>
>>> On Monday, January 23, 2017 at 9:37:01 AM UTC-8, Sharan Basappa wrote: 
>>>
>>> Hi,
>>>
>>>  
>>>
>>> I am trying to create pipeline script such that it only a certain 
>>> branches following a naming style are built.
>>>
>>> However, pipeline bails out when I use the wildcard.
>>>
>>>  
>>>
>>> The code snippet is below:
>>>
>>>  
>>>
>>> stage 'build'
>>>
>>> node {
>>>
>>> git url: 'git@hd1:testing', branch: test*
>>>
>>> sh "pwd"
>>>
>>> sh "cat simple.csh"
>>>
>>> sh "echo $PATH"
>>>
>>> sh "csh simple.csh"
>>>
>>> echo("end of pipeline")
>>>
>>> }
>>>
>>>  
>>>
>>> I see the following output from the above script:
>>>
>>>  
>>>
>>>  
>>>
>>> Started by user User
>>>
>>>  
>>>
>>> [Pipeline] stage (build)
>>>
>>>  
>>>
>>> Using the ‘stage’ step without a block argument is deprecated
>>>
>>>  
>>>
>>> Entering stage build
>>>
>>>  
>>>
>>> Proceeding
>>>
>>>  
>>>
>>> [Pipeline] node
>>>
>>>  
>>>
>>> Running on master in /var/lib/jenkins/workspace/test_build_3
>>>
>>>

Re: Pipeline: wildcard for branch name

2017-01-28 Thread Sharan Basappa
Hi Mark, Indra,

If I use wildcard as a branch specifier then what would happen if there are 
multiple matches?
I would like to know this because my requirement is take each branch and 
then build each of them separately.


On Thursday, 26 January 2017 20:21:13 UTC+5:30, Indra Gunawan (ingunawa) 
wrote:

> HI Sharan,
>
>  
>
> I sent this already:
>
>  
>
>  
>
> You can’t use the simple git pipeline command if you want to be fancy
>
>  
>
> You should use the form where you can specify more options like 
> configuring Git SCM:
>
>  
>
> checkout scm: [$class: 'GitSCM', branches: [[name: '*/test*']], 
> userRemoteConfigs: [[url: 'git@hd1:testing']]]
>
>  
>
>  
>
> *From: *<jenkins...@googlegroups.com > on behalf of Sharan 
> Basappa <sharan@gmail.com >
> *Reply-To: *"jenkins...@googlegroups.com " <
> jenkins...@googlegroups.com >
> *Date: *Thursday, January 26, 2017 at 4:03 AM
> *To: *Jenkins Users <jenkins...@googlegroups.com >
> *Subject: *Re: Pipeline: wildcard for branch name
>
>  
>
> Hi David,
>
>  
>
> I am new to continuous integration and Jenkins, so I need inputs to go in 
> the right direction.
>
> My requirement is that users push branches with name test_id1/test_id2 etc.
>
> I would like to build only when users have created branches with the above 
> name.
>
>  
>
> So, after seeing the responses, it looks like I have to:
>
> 1)  first checkout the repository
>
> 2)  list out the branches, 
>
> 3)  if branch name matches test* then I checkout the corresponding branch 
> and do rest of the build
>
>  
>
> I need inputs here ...
>
>
> On Wednesday, 25 January 2017 04:53:20 UTC+5:30, David Karr wrote:
>
> On Monday, January 23, 2017 at 9:37:01 AM UTC-8, Sharan Basappa wrote: 
>
> Hi,
>
>  
>
> I am trying to create pipeline script such that it only a certain branches 
> following a naming style are built.
>
> However, pipeline bails out when I use the wildcard.
>
>  
>
> The code snippet is below:
>
>  
>
> stage 'build'
>
> node {
>
> git url: 'git@hd1:testing', branch: test*
>
> sh "pwd"
>
> sh "cat simple.csh"
>
> sh "echo $PATH"
>
> sh "csh simple.csh"
>
> echo("end of pipeline")
>
> }
>
>  
>
> I see the following output from the above script:
>
>  
>
>  
>
> Started by user User
>
>  
>
> [Pipeline] stage (build)
>
>  
>
> Using the ‘stage’ step without a block argument is deprecated
>
>  
>
> Entering stage build
>
>  
>
> Proceeding
>
>  
>
> [Pipeline] node
>
>  
>
> Running on master in /var/lib/jenkins/workspace/test_build_3
>
>  
>
> [Pipeline] {
>
>  
>
> [Pipeline] }
>
>  
>
> [Pipeline] // node
>
>  
>
> [Pipeline] End of Pipeline
>
>  
>
> groovy.lang.MissingPropertyException: No such property: test for class: 
> WorkflowScript
>
>  
>
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
>
>  
>
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)
>
>  
>
> at 
> com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:33)
>
>  
>
> at 
> com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
>
>  
>
> at WorkflowScript.run(WorkflowScript:6)
>
>  
>
> at ___cps.transform___(Native Method)
>
>  
>
> at 
> com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
>
>  
>
> at 
> com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
>
>  
>
> at 
> com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
>
>  
>
> at sun.reflect.GeneratedMethodAccessor725.invoke(Unknown Source)
>
>  
>
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>  
>
> at java.lang.reflect.Method.invoke(Method.java:606)
>
>  
>
> at 
> com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
>
>  
>
> at 
> com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
>
>  
>
> at com.cloudbees.groovy.cps.Next.step(Next.java:58)
>
>  
>
> at com.cloudbee

Re: Pipeline & Git branch

2017-01-28 Thread Sharan Basappa
Thanks. I do have conceptual questions. I will continue that thread ...

On Saturday, 28 January 2017 10:35:09 UTC+5:30, Mark Waite wrote:

> Did you try the steps I described earlier?  
> https://groups.google.com/d/msg/jenkinsci-users/jiwtA088sXc/BjL-X6DjCwAJ 
>
> On Friday, January 27, 2017 at 9:12:38 PM UTC-7, Sharan Basappa wrote:
>>
>>
>> I would like to list out all branches in Git with a specific naming 
>> convention (feature_*) and then start a build process (compile, test and 
>> publish) for each of those branches.
>> Can someone, please, give me some directions on this?
>>
>> 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/7626d8e7-808a-461a-869a-109cd9905abd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline & Git branch

2017-01-27 Thread Sharan Basappa

I would like to list out all branches in Git with a specific naming 
convention (feature_*) and then start a build process (compile, test and 
publish) for each of those branches.
Can someone, please, give me some directions on this?

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/d4110644-ce95-4137-bbe0-6c6fb6d64131%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline - stage, node

2017-01-26 Thread Sharan Basappa
I would just like to point out a note from pipeline paper I am reading. It 
is as follows,

Stages are usually the top most element of Pipeline syntax. Stages allow 
you to group your build step into its component parts. By default, multiple 
builds of the same pipeline can run concurrently. The stage element also 
allows you to control this concurrency: 



The above seem to suggest that stage is necessary to control concurrency.

Also, one more follow-up question. If I were to build on multiple nodes 
then how would results from one node be available to the other node.
I assume node can be an independent machine with its own workspace.

On Thursday, 26 January 2017 20:34:58 UTC+5:30, jer...@bodycad.com wrote:

> I may not have all answer here, but here a start.
>
> stage serve no purpose except giving visual queue and split console data 
> into the view as far as I know. It also split the time used to complete.
>
> For the node, they are sequential unless you use the parallel instruction. 
> So you probably need to build on a possible node first then parallel the 
> unit test execution:
>
> node('buildrequirement')
> {
>// build instruction here
> }
> parallel
> (
>  platform1: 
>  {
>  node('platform1requirements')
>  {
>  // run unit test on platform 1
>  }
>  },
>  platform2: 
>  {
>  node('platform2requirements')
>  {
>  // run unit test on platform 2
>  }
>  }
> )
>
> For better parallel example:
>
> https://github.com/jenkinsci/pipeline-examples/blob/master/pipeline-examples/jobs-in-parallel/jobs_in_parallel.groovy
>

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


Re: Pipeline - stage, node

2017-01-26 Thread Sharan Basappa
can anyone be kind enough to respond to the query below of mine?
It would help me a lot

On Saturday, 21 January 2017 23:54:15 UTC+5:30, Sharan Basappa wrote:

> Hello,
>
> I am trying to adapt pipeline as a part of my project. I am starting with 
> a simple example, though, to get my understanding correct.
> However, after reading several white papers and even after being able to 
> write simple examples, I am stuck with conceptual understanding of pipeline.
>
> My first question is, what exactly is the use of stage. Looking at example 
> it is clear that it is used to segregate distinct build phases but the 
> question
> is, whether it is inserted just to get stage based view in the build 
> dashboard or there is more to it than this.
> I have also seen stage being used to segregate like build, test and 
> publish.
> Does it mean that these are executed in sequential?
>
> My second question is related to node. If I have 2 nodes, do they execute 
> in parallel invariably?
> Also, do different nodes create their own workspace?
>
> Continuing with nodes, assume I have to do compile, run tests. Also, I can 
> run two test suites in parallel (suite_1 and suite_2).
> Now, I need to build first and only then I can run the 2 test suites.
> How can I create nodes in this case?
> Also, if each node creates its own workspace then how can node that run 
> suite_1 and suite_2 access the compiled libraries
> that is created by first node that compiles?
>
> Thanks in advance ...
>
>

-- 
You received this message because you are subscribed to the Google 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/b7211a2e-97f2-4912-bdf0-11b046ce91b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: wildcard for branch name

2017-01-26 Thread Sharan Basappa
Hi David,

I am new to continuous integration and Jenkins, so I need inputs to go in 
the right direction.
My requirement is that users push branches with name test_id1/test_id2 etc.
I would like to build only when users have created branches with the above 
name.

So, after seeing the responses, it looks like I have to:
1)  first checkout the repository
2)  list out the branches, 
3)  if branch name matches test* then I checkout the corresponding branch 
and do rest of the build

I need inputs here ...

On Wednesday, 25 January 2017 04:53:20 UTC+5:30, David Karr wrote:

> On Monday, January 23, 2017 at 9:37:01 AM UTC-8, Sharan Basappa wrote:
>>
>> Hi,
>>
>> I am trying to create pipeline script such that it only a certain 
>> branches following a naming style are built.
>> However, pipeline bails out when I use the wildcard.
>>
>> The code snippet is below:
>>
>> stage 'build'
>>
>> node {
>>
>> git url: 'git@hd1:testing', branch: test*
>>
>> sh "pwd"
>>
>> sh "cat simple.csh"
>>
>> sh "echo $PATH"
>>
>> sh "csh simple.csh"
>>
>> echo("end of pipeline")
>>
>> }
>>
>>
>> I see the following output from the above script:
>>
>>
>>
>> Started by user User
>>
>>
>> [Pipeline] stage (build)
>>
>>
>> Using the ‘stage’ step without a block argument is deprecated
>>
>>
>> Entering stage build
>>
>>
>> Proceeding
>>
>>
>> [Pipeline] node
>>
>>
>> Running on master in /var/lib/jenkins/workspace/test_build_3
>>
>>
>> [Pipeline] {
>>
>>
>> [Pipeline] }
>>
>>
>> [Pipeline] // node
>>
>>
>> [Pipeline] End of Pipeline
>>
>>
>> groovy.lang.MissingPropertyException: No such property: test for class: 
>> WorkflowScript
>>
>>
>> at 
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
>>
>>
>> at 
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:33)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
>>
>>
>> at WorkflowScript.run(WorkflowScript:6)
>>
>>
>> at ___cps.transform___(Native Method)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
>>
>>
>> at sun.reflect.GeneratedMethodAccessor725.invoke(Unknown Source)
>>
>>
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>>
>> at java.lang.reflect.Method.invoke(Method.java:606)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
>>
>>
>> at com.cloudbees.groovy.cps.Next.step(Next.java:58)
>>
>>
>> at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
>>
>>
>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>
>>
>> at 
>> hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
>>
>>

Re: Pipeline: wildcard for branch name

2017-01-24 Thread Sharan Basappa
Victor,

I tried all options as follows:

git url: 'git@hd1:testing', branch: "test*"

git url: 'git@hd1:testing', branch: test*

git url: 'git@hd1:testing', branch: 'test*'


In all the 3 cases, Jenkins exits with error. I looked into the log again 
and this is what I see:


Caused by: hudson.plugins.git.GitException: Command "git checkout -b test* 
264dc398372cba41c026568bd764d2656ebfc511" returned status code 128:


stdout: 


stderr: fatal: git checkout: we do not like 'test*' as a branch name.


Somehow, Git is trying to checkout a branch with a wildcard which is anyway 
not my intent.
All I wan't is to checkout from a branch which follows naming convention 
such as test* (e.g. testa, testb etc.)

Can someone help?



On Monday, 23 January 2017 23:28:12 UTC+5:30, Victor Martinez wrote:

> Test property doesn't exist so, according to the doc:
> - https://jenkins.io/doc/pipeline/steps/git/#git-git
> -- branch is a string therefore you need to quote it otherwise it seems 
> it's recognised as a property 
>
> You can also try with the* generic scm step*, explained also in the same 
> page
>
> Cheers
>
> On Monday, 23 January 2017 17:37:01 UTC, Sharan Basappa wrote:
>>
>> Hi,
>>
>> I am trying to create pipeline script such that it only a certain 
>> branches following a naming style are built.
>> However, pipeline bails out when I use the wildcard.
>>
>> The code snippet is below:
>>
>> stage 'build'
>>
>> node {
>>
>> git url: 'git@hd1:testing', branch: test*
>>
>> sh "pwd"
>>
>> sh "cat simple.csh"
>>
>> sh "echo $PATH"
>>
>> sh "csh simple.csh"
>>
>> echo("end of pipeline")
>>
>> }
>>
>>
>> I see the following output from the above script:
>>
>>
>>
>> Started by user User
>>
>>
>> [Pipeline] stage (build)
>>
>>
>> Using the ‘stage’ step without a block argument is deprecated
>>
>>
>> Entering stage build
>>
>>
>> Proceeding
>>
>>
>> [Pipeline] node
>>
>>
>> Running on master in /var/lib/jenkins/workspace/test_build_3
>>
>>
>> [Pipeline] {
>>
>>
>> [Pipeline] }
>>
>>
>> [Pipeline] // node
>>
>>
>> [Pipeline] End of Pipeline
>>
>>
>> groovy.lang.MissingPropertyException: No such property: test for class: 
>> WorkflowScript
>>
>>
>> at 
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
>>
>>
>> at 
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:33)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
>>
>>
>> at WorkflowScript.run(WorkflowScript:6)
>>
>>
>> at ___cps.transform___(Native Method)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
>>
>>
>> at sun.reflect.GeneratedMethodAccessor725.invoke(Unknown Source)
>>
>>
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>>
>> at java.lang.reflect.Method.invoke(Method.java:606)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
>>
>>
>> at 
>> com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
>>
>>
>> at com.cloudbees.groovy.cps.Next.step(Next.java:58)
>>
>>
>> at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
>>
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
>>
>>
>> at 
>> org.jenk

Jenkins: master/slave & distributed builds

2017-01-23 Thread Sharan Basappa
Hi All,

I understand that Jenkins has a way to distribute build process. I would 
like to know how is it different from having one master node in Jenkins and 
then using that to launch the regular unix based jobs using a grid engine 
(like Sungrid etc.). I assume I can achieve the same thing. In fact, out 
organization has Sungrid engine and we have only one master node. I am 
trying to understand the difference between the two ...

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/d1a6dab2-e04b-41e8-b184-99269f912405%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pipeline: wildcard for branch name

2017-01-23 Thread Sharan Basappa
Hi,

I am trying to create pipeline script such that it only a certain branches 
following a naming style are built.
However, pipeline bails out when I use the wildcard.

The code snippet is below:

stage 'build'

node {

git url: 'git@hd1:testing', branch: test*

sh "pwd"

sh "cat simple.csh"

sh "echo $PATH"

sh "csh simple.csh"

echo("end of pipeline")

}


I see the following output from the above script:



Started by user User


[Pipeline] stage (build)


Using the ‘stage’ step without a block argument is deprecated


Entering stage build


Proceeding


[Pipeline] node


Running on master in /var/lib/jenkins/workspace/test_build_3


[Pipeline] {


[Pipeline] }


[Pipeline] // node


[Pipeline] End of Pipeline


groovy.lang.MissingPropertyException: No such property: test for class: 
WorkflowScript


at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)


at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)


at 
com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:33)


at 
com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)


at WorkflowScript.run(WorkflowScript:6)


at ___cps.transform___(Native Method)


at 
com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)


at 
com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)


at 
com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)


at sun.reflect.GeneratedMethodAccessor725.invoke(Unknown Source)


at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


at java.lang.reflect.Method.invoke(Method.java:606)


at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)


at 
com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)


at com.cloudbees.groovy.cps.Next.step(Next.java:58)


at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)


at 
org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)


at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)


at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)


at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)


at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)


at 
org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)


at java.util.concurrent.FutureTask.run(FutureTask.java:262)


at 
hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)


at 
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)


at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)


at java.util.concurrent.FutureTask.run(FutureTask.java:262)


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


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


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


Finished: FAILURE


However, when I modify the script as follows:


stage 'build'


node {

git url: 'git@hd1:testing', branch: test*

sh "pwd"

sh "cat simple.csh"

sh "echo $PATH"

sh "csh simple.csh"

echo("end of pipeline")

}


the code executes properly and I get the following output:

Started by user User

[Pipeline] stage (build)

Using the ‘stage’ step without a block argument is deprecated

Entering stage build

Proceeding

[Pipeline] node

Running on master in /var/lib/jenkins/workspace/test_build_3

[Pipeline] {

[Pipeline] git

 > git rev-parse --is-inside-work-tree # timeout=10

Fetching changes from the remote Git repository

 > git config remote.origin.url git@hd1:testing # timeout=10

Fetching upstream changes from git@hd1:testing

 > git --version # timeout=10

 > git fetch --tags --progress git@hd1:testing 
 > +refs/heads/*:refs/remotes/origin/*

 > git rev-parse refs/remotes/origin/test^{commit} # timeout=10

 > git rev-parse refs/remotes/origin/origin/test^{commit} # timeout=10

Checking out Revision 264dc398372cba41c026568bd764d2656ebfc511 
(refs/remotes/origin/test)

 > git config core.sparsecheckout # timeout=10

 > git checkout -f 264dc398372cba41c026568bd764d2656ebfc511

 > git branch -a -v --no-abbrev # timeout=10

 > git branch -D test # timeout=10

 > git checkout -b test 264dc398372cba41c026568bd764d2656ebfc511

 > git rev-list 264dc398372cba41c026568bd764d2656ebfc511 # timeout=10

[Pipeline] sh

[test_build_3] Running shell script

+ pwd

/var/lib/jenkins/workspace/test_build_3


Pipeline - stage, node

2017-01-21 Thread Sharan Basappa
Hello,

I am trying to adapt pipeline as a part of my project. I am starting with a 
simple example, though, to get my understanding correct.
However, after reading several white papers and even after being able to 
write simple examples, I am stuck with conceptual understanding of pipeline.

My first question is, what exactly is the use of stage. Looking at example 
it is clear that it is used to segregate distinct build phases but the 
question
is, whether it is inserted just to get stage based view in the build 
dashboard or there is more to it than this.
I have also seen stage being used to segregate like build, test and publish.
Does it mean that these are executed in sequential?

My second question is related to node. If I have 2 nodes, do they execute 
in parallel invariably?
Also, do different nodes create their own workspace?

Continuing with nodes, assume I have to do compile, run tests. Also, I can 
run two test suites in parallel (suite_1 and suite_2).
Now, I need to build first and only then I can run the 2 test suites.
How can I create nodes in this case?
Also, if each node creates its own workspace then how can node that run 
suite_1 and suite_2 access the compiled libraries
that is created by first node that compiles?

Thanks in advance ...

-- 
You received this message because you are subscribed to the Google 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/cf0f5ddd-31b5-4284-b35d-6e540e3f4eff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.