Re: pipeline global library no longer works on latest builds on Windows

2016-06-02 Thread tomwilson001 . us
Thanks Craig, that's seem to be the way I'm going to resolve this problem

On Wednesday, June 1, 2016 at 6:17:12 PM UTC-5, Craig Rodrigues wrote:
>
> Hi,
>
> My advice will differ from some of the advice on this list, but I would
> advise you to find a way to accomplish your goal
> without using the pipeline global library mechanism.
> It is really weird, and as you have found, hard to debug when it doesn't 
> work.
>
> My advice is for you to try to find a way to treat your Jenkinsfile as a 
> Groovy script,
> and somehow include your script library in your Jenkinsfile via Groovy 
> language mechanisms.
>
> When Jenkins runs your Jenkinsfile, it dynamically creates a class called 
> Workflowscript,
> and places your entire Jenkinsfile inside a Workflowscript.run() method.  
> I posted some hints
> as to what I figured out when I was debugging my scripts:
>
> https://groups.google.com/forum/#!msg/jenkinsci-users/P7VMQQuMdsY/bHfBDSn9GgAJ
>
> I don't have a solution for you, because I am not a Groovy expert.  But if 
> you figure something
> out, please post your solution to the list.
>
> --
> Craig
>
> On Wed, Jun 1, 2016 at 3:22 PM, > 
> wrote:
>
> Currently, I only call one variable/function under the vars directory.  If 
>> the pipeline global library mechanism is so unstable, is there anyway I can 
>> call the function but under a different location without changing the 
>> Jenkinsfile?  After I add the Jenkinsfile to the trunk of my project, it 
>> has been branched to so many other branches owned by many different 
>> developers.  If I start changing Jenkinsfile in their branches, their first 
>> reaction would be to raise the question why I mess with their territory.
>>
>

-- 
You received this message because you are subscribed to the Google 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/f79dd330-b0b3-45c8-b742-e762c8d2a851%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline global library no longer works on latest builds on Windows

2016-06-01 Thread tomwilson001 . us
Currently, I only call one variable/function under the vars directory.  If 
the pipeline global library mechanism is so unstable, is there anyway I can 
call the function but under a different location without changing the 
Jenkinsfile?  After I add the Jenkinsfile to the trunk of my project, it 
has been branched to so many other branches owned by many different 
developers.  If I start changing Jenkinsfile in their branches, their first 
reaction would be to raise the question why I mess with their territory.

Thanks

On Wednesday, June 1, 2016 at 1:53:38 AM UTC-5, Baptiste Mathus wrote:
>
> Hi,
> Are you sure it's not just the Git URL? Does really your Jenkins instance 
> run on *your* machine? (127.0.0.1)
> Cheers
> Le 1 juin 2016 5:36 AM, > a écrit :
>
>> Hi,
>>Jenkins pipeline global library no longer works for me on Windows 
>> which unfortunately my employer choose to use.  I simply can't access the 
>> workflowLibs.git through the http URL (
>> http://127.0.0.1:8080/workflowLibs.git/ in my case).  It give me the Not 
>> Found error message even after I already disable the security feature in 
>> order to create the empty git repository first.
>>I had successfully setup pipeline global library before using Jenkins 
>> 1.x but then I was busy with something else until now when suddenly nothing 
>> works.  I forgot which version of Jenkins 1.x I used before so I tried the 
>> LTS version and Jenkins 2.6 and 2.7.
>>Please let me know which option I should follow.  I already tried to 
>> manually create the git repository under workflow-libs but it doesn't 
>> work.  SSH mechanism doesn't work on Windows for the initial repository 
>> either.
>>
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/084c46b1-f3d5-4caa-a335-a46ad290de5e%40googlegroups.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/f1632028-8c17-48ca-863b-5386f1858487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline global library no longer works on latest builds on Windows

2016-06-01 Thread tomwilson001 . us
Hi Baptiste,
   I'm sure it run on my machine because I'm able to do any other tasks 
with Jenkins.  I just prefer to use the loop back address for now so that I 
do not accidentally let anyone log into my machine and run arbitrary code.

Thanks

On Wednesday, June 1, 2016 at 1:53:38 AM UTC-5, Baptiste Mathus wrote:
>
> Hi,
> Are you sure it's not just the Git URL? Does really your Jenkins instance 
> run on *your* machine? (127.0.0.1)
> Cheers
> Le 1 juin 2016 5:36 AM, > a écrit :
>
>> Hi,
>>Jenkins pipeline global library no longer works for me on Windows 
>> which unfortunately my employer choose to use.  I simply can't access the 
>> workflowLibs.git through the http URL (
>> http://127.0.0.1:8080/workflowLibs.git/ in my case).  It give me the Not 
>> Found error message even after I already disable the security feature in 
>> order to create the empty git repository first.
>>I had successfully setup pipeline global library before using Jenkins 
>> 1.x but then I was busy with something else until now when suddenly nothing 
>> works.  I forgot which version of Jenkins 1.x I used before so I tried the 
>> LTS version and Jenkins 2.6 and 2.7.
>>Please let me know which option I should follow.  I already tried to 
>> manually create the git repository under workflow-libs but it doesn't 
>> work.  SSH mechanism doesn't work on Windows for the initial repository 
>> either.
>>
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/084c46b1-f3d5-4caa-a335-a46ad290de5e%40googlegroups.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/27358818-e402-4b3d-a5cb-d8d42062aea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pipeline global library no longer works on latest builds on Windows

2016-05-31 Thread tomwilson001 . us
Hi,
   Jenkins pipeline global library no longer works for me on Windows which 
unfortunately my employer choose to use.  I simply can't access the 
workflowLibs.git through the http URL 
(http://127.0.0.1:8080/workflowLibs.git/ in my case).  It give me the Not 
Found error message even after I already disable the security feature in 
order to create the empty git repository first.
   I had successfully setup pipeline global library before using Jenkins 
1.x but then I was busy with something else until now when suddenly nothing 
works.  I forgot which version of Jenkins 1.x I used before so I tried the 
LTS version and Jenkins 2.6 and 2.7.
   Please let me know which option I should follow.  I already tried to 
manually create the git repository under workflow-libs but it doesn't work. 
 SSH mechanism doesn't work on Windows for the initial repository either.

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/084c46b1-f3d5-4caa-a335-a46ad290de5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question regarding Jenkins pipeline setup

2016-04-01 Thread tomwilson001 . us
 Thank you Brian, you're right regarding the @tmp directory.  However 
the @script directory seems to be different.
 I'm searching in the source code of the workflow cps plugin.  The file 
CpsScmFlowDefinition.java seems to be the place where the workspace@script 
behavior is implemented.  It seems that it use this mechanism to checkout 
and search the entire repository for the Jenkinsfile.  I didn't look very 
careful at this code yet but it make me concern a little bit about the 
efficiency of this operation.  If in order to search for the Jenkinsfile, 
it has to check out the entire repository then it would be quite slow for 
big repository.  I wonder whether some repository has option to simply 
search the file inside or not and whether Jenkins actually implements this 
functionality this way.

Tom

On Friday, April 1, 2016 at 11:07:41 AM UTC-5, Brian Ray wrote:
>
> https://issues.jenkins-ci.org/browse/JENKINS-27152
>
> I'm not sure about @script but suspect it's a similar necessity.
>
> On Friday, April 1, 2016 at 12:00:18 AM UTC-7, tomwils...@gmail.com wrote:
>>
>> Hello,
>>I'm trying to setup Jenkins to run a multibranch pipeline project. 
>>  Just to test, I use a very simple Jenkinsfile like this:
>>
>> node {
>> checkout scm
>> bat 'echo > tst1.txt'
>> }
>>
>> When I run the build, for each branch, for example the 'master' branch, 
>> Jenkins creates 3 directories:
>> - workspace@script: contains source code.  This is created first even 
>> before the node statement is executed.
>> - workspace: contains source code.  This is created with the node 
>> statement
>> - workspace@tmp: empty.  This is created when running 'bat' command.
>>
>>
>> - Certainly I do not need 2 copies of the source code so I don't need the 
>> workspace@script directories but this is created automatically and I do not 
>> know how to turn it off.  The default directory when inside the node 
>> command block is 'workspace', not 'workspace@script' so I can't do anything 
>> with the source unless I change directory to workspace@script.  Is there 
>> anyway so that Jenkins does not check out the workspace@script directory?
>>
>> - What is the purpose of workspace@tmp? and is there a way not to create 
>> it as well?
>>
>> 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/d39129cc-7ffd-40f4-a393-a8a46404e0ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Question regarding Jenkins pipeline setup

2016-04-01 Thread tomwilson001 . us
Hello,
   I'm trying to setup Jenkins to run a multibranch pipeline project.  Just 
to test, I use a very simple Jenkinsfile like this:

node {
checkout scm
bat 'echo > tst1.txt'
}

When I run the build, for each branch, for example the 'master' branch, 
Jenkins creates 3 directories:
- workspace@script: contains source code.  This is created first even 
before the node statement is executed.
- workspace: contains source code.  This is created with the node statement
- workspace@tmp: empty.  This is created when running 'bat' command.


- Certainly I do not need 2 copies of the source code so I don't need the 
workspace@script directories but this is created automatically and I do not 
know how to turn it off.  The default directory when inside the node 
command block is 'workspace', not 'workspace@script' so I can't do anything 
with the source unless I change directory to workspace@script.  Is there 
anyway so that Jenkins does not check out the workspace@script directory?

- What is the purpose of workspace@tmp? and is there a way not to create it 
as well?

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/4165d2f4-c108-42e8-b44a-38223005ccdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.