Re: Issue in pipeline step of jenkinsfile

2021-05-12 Thread 'Björn Pedersen' via Jenkins Users
You need to add an intermediate var in your first loop and use this in the 
sh step

sprat...@gmail.com schrieb am Dienstag, 11. Mai 2021 um 14:59:56 UTC+2:

> Hey Devin,
> Sorry for the late reply , I was down with covid for some time.
> the code that you have given i tried and it works , but how to handle the 
> string parameters ?
> some string parameters which I am assigning they are also interfering with 
> each other
>
>
> On Fri, Apr 16, 2021 at 9:07 PM Devin Nusbaum  
> wrote:
>
>> This is a classic issue that a lot of people run into in various 
>> programming languages. 
>> https://groovyconsole.appspot.com/script/5078409050849280 shows the same 
>> problem and one way to fix it (click "edit in console" and then you can 
>> execute the script). This kind of issue is why in Java, anonymous classes 
>> and lambda expressions can only reference variables that are final or 
>> effectively final.
>>
>> On Apr 16, 2021, at 11:16, spratap singh  wrote:
>>
>> registeries = [1,2,3,4] 
>>  Map tasks = [:]
>>  for (j=0;j<=registeries.size();j++) 
>> { 
>>  tasks["Code ${j}"] = { -> sh "touch ${j}" }
>>  } 
>>  parallel(tasks) 
>>  sh "ls -lrt"
>>
>> Above code should create files 0,1,2,3,4,5
>>
>> but the last line ls -lrt only prints 5 which means it is only taking the 
>> last iteration value in all values of map tasks
>>
>> Can anyone tell what I am doing wrong 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-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/bfde4364-d93d-4b7a-9ff6-7b2e7bd3c7a2n%40googlegroups.com
>>  
>> 
>> .
>>
>>
>> -- 
>>
> 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/ao0SUF9L0H4/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> jenkinsci-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/FABC5220-69E1-449A-AA08-5C0BA770D025%40cloudbees.com
>>  
>> 
>> .
>>
>
>
> -- 
> Shashipratap Singh
>

-- 
You received this message because you are 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/6b615e22-89c6-4cf5-929f-d536e22fbb6an%40googlegroups.com.


Re: Issue in pipeline step of jenkinsfile

2021-05-11 Thread spratap singh
Hey Devin,
Sorry for the late reply , I was down with covid for some time.
the code that you have given i tried and it works , but how to handle the
string parameters ?
some string parameters which I am assigning they are also interfering with
each other


On Fri, Apr 16, 2021 at 9:07 PM Devin Nusbaum 
wrote:

> This is a classic issue that a lot of people run into in various
> programming languages.
> https://groovyconsole.appspot.com/script/5078409050849280 shows the same
> problem and one way to fix it (click "edit in console" and then you can
> execute the script). This kind of issue is why in Java, anonymous classes
> and lambda expressions can only reference variables that are final or
> effectively final.
>
> On Apr 16, 2021, at 11:16, spratap singh  wrote:
>
> registeries = [1,2,3,4]
>  Map tasks = [:]
>  for (j=0;j<=registeries.size();j++)
> {
>  tasks["Code ${j}"] = { -> sh "touch ${j}" }
>  }
>  parallel(tasks)
>  sh "ls -lrt"
>
> Above code should create files 0,1,2,3,4,5
>
> but the last line ls -lrt only prints 5 which means it is only taking the
> last iteration value in all values of map tasks
>
> Can anyone tell what I am doing wrong 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/bfde4364-d93d-4b7a-9ff6-7b2e7bd3c7a2n%40googlegroups.com
> 
> .
>
>
> --
> 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/ao0SUF9L0H4/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/FABC5220-69E1-449A-AA08-5C0BA770D025%40cloudbees.com
> 
> .
>


-- 
Shashipratap Singh

-- 
You received this message because you are 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/CA%2By9W-zp3nuvgs3PHZ7PDPZrNO_5kA%2B6V_VmUAFGOebgWTjxRw%40mail.gmail.com.


Re: Issue in pipeline step of jenkinsfile

2021-04-16 Thread Devin Nusbaum
This is a classic issue that a lot of people run into in various programming 
languages. https://groovyconsole.appspot.com/script/5078409050849280 
 shows the same 
problem and one way to fix it (click "edit in console" and then you can execute 
the script). This kind of issue is why in Java, anonymous classes and lambda 
expressions can only reference variables that are final or effectively final.

> On Apr 16, 2021, at 11:16, spratap singh  wrote:
> 
> registeries = [1,2,3,4] 
>  Map tasks = [:]
>  for (j=0;j<=registeries.size();j++) 
> { 
>  tasks["Code ${j}"] = { -> sh "touch ${j}" }
>  } 
>  parallel(tasks) 
>  sh "ls -lrt"
> 
> Above code should create files 0,1,2,3,4,5
> 
> but the last line ls -lrt only prints 5 which means it is only taking the 
> last iteration value in all values of map tasks
> 
> Can anyone tell what I am doing wrong 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/bfde4364-d93d-4b7a-9ff6-7b2e7bd3c7a2n%40googlegroups.com
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/FABC5220-69E1-449A-AA08-5C0BA770D025%40cloudbees.com.


Issue in pipeline step of jenkinsfile

2021-04-16 Thread spratap singh
registeries = [1,2,3,4] 
 Map tasks = [:]
 for (j=0;j<=registeries.size();j++) 
{ 
 tasks["Code ${j}"] = { -> sh "touch ${j}" }
 } 
 parallel(tasks) 
 sh "ls -lrt"

  

Above code should create files 0,1,2,3,4,5

but the last line ls -lrt only prints 5 which means it is only taking the 
last iteration value in all values of map tasks

Can anyone tell what I am doing wrong 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/bfde4364-d93d-4b7a-9ff6-7b2e7bd3c7a2n%40googlegroups.com.


Re: GitHub webhook push CI issue with pipeline projects

2019-10-24 Thread kishore babu
I hope you got the solution, If you could suggest me the best practice it 
will be helpful for me.

On Friday, 11 November 2016 09:18:12 UTC+5:30, Cory Grubbs wrote:
>
> Okstill doesn't solve the problem of having to have two separate 
> Jenkins projects for every build which is not efficient nor scalable to the 
> level I need it to be. 
>
> I find it hard to believe you can't configure a webhook on a github repo 
> to kick off a specific Jenkins job that isn't connected to the repo but I 
> sure can't figure out how. 
>
> What is the purpose of the Github project field within the Jenkins job 
> configuration if it doesn't create the necessary association for webhooks 
> to invoke the job when changes are pushed to the specified github repo?
>
> Cory
>
>

-- 
You received this message because you are 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/b2dba239-69e5-4187-872f-3b8b94e20aae%40googlegroups.com.


Re: Git plugin issue in pipeline

2017-06-29 Thread Abhijith Reddy
Thanks @Mark. I switched to using refspecs and it seems to have addressed 
the issue. 

On Tuesday, June 27, 2017 at 5:53:07 PM UTC-4, Abhijith Reddy wrote:
>
> Whenever i specify a branch with GitSCM i see the following issue
> Couldn't find any revision to build. Verify the repository and branch 
> configuration for this job.
>
> Here's my Jenkinsfile
>
> node {
>
> deleteDir()
> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]], 
> doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [], 
> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
> }
>
>
> and here is the error
>
>
> Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to 
> read Jenkinsfile-pull-request
> Wiping out workspace first.
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline@script
>  
> # timeout=10
> Fetching upstream changes from ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git 
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
>  > git config --add remote.origin.fetch 
> +refs/heads/*:refs/remotes/origin/* # timeout=10
>  > git config remote.origin.url ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
> Fetching upstream changes from ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git 
> +refs/heads/*:refs/remotes/origin/*
>  > git rev-parse origin/develop^{commit} # timeout=10
> Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536 
> (origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
>  > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
> First time build. Skipping changelog.
> [Pipeline] node
> Running on q7bld02 in 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
> [Pipeline] {
> [Pipeline] deleteDir
> [Pipeline] checkout
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/api/mpp.git
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline 
> # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
> timeout=10
>  > git config --add remote.origin.fetch 
> +refs/heads/*:refs/remotes/origin/* # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
> timeout=10
> Cleaning workspace
>  > git rev-parse --verify HEAD # timeout=10
> No valid HEAD. Skipping the resetting
>  > git clean -fdx # timeout=10
> Pruning obsolete local branches
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
> +refs/heads/*:refs/remotes/origin/* --prune
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
> timeout=10
>  > git rev-parse 
> refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
> timeout=10
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
> timeout=10
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] End of Pipeline
> ERROR: Couldn't find any revision to build. Verify the repository and 
> branch configuration for this job.
> 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/525a3083-cbd7-42fa-83a4-cce609c08935%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git plugin issue in pipeline

2017-06-28 Thread Michael Pailloncy
Can you try with something like that inside your Jenkinsfile :

node {
deleteDir()
checkout scm
}

Jenkins seems to be already able to retrieve your Jenkinsfile, so you don't
need to give all SCM details inside it, see
https://jenkins.io/doc/book/pipeline/jenkinsfile/#creating-a-jenkinsfile

2017-06-27 23:22 GMT+02:00 Abhijith Reddy :

> Whenever i specify a branch with GitSCM i see the following issue
> Couldn't find any revision to build. Verify the repository and branch
> configuration for this job.
>
> Here's my Jenkinsfile
>
> node {
>
> deleteDir()
> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]],
> doGenerateSubmoduleConfigurations: false, extensions: [[$class:
> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [],
> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
> }
>
>
> and here is the error
>
>
> Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to
> read Jenkinsfile-pull-request
> Wiping out workspace first.
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
>  > git init /var/lib/jenkins/workspace/API/merchant-profile-and-
> preferences/pr-pipeline@script # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git # timeout=10
>  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git +refs/heads/*:refs/remotes/origin/*
>  > git rev-parse origin/develop^{commit} # timeout=10
> Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536
> (origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
>  > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
> First time build. Skipping changelog.
> [Pipeline] node
> Running on q7bld02 in /var/lib/jenkins/workspace/API/merchant-profile-and-
> preferences/pr-pipeline
> [Pipeline] {
> [Pipeline] deleteDir
> [Pipeline] checkout
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/api/mpp.git
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
> # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git #
> timeout=10
>  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git #
> timeout=10
> Cleaning workspace
>  > git rev-parse --verify HEAD # timeout=10
> No valid HEAD. Skipping the resetting
>  > git clean -fdx # timeout=10
> Pruning obsolete local branches
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git
> +refs/heads/*:refs/remotes/origin/* --prune
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} #
> timeout=10
>  > git rev-parse 
> refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit}
> # timeout=10
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} #
> timeout=10
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] End of Pipeline
> ERROR: Couldn't find any revision to build. Verify the repository and
> branch configuration for this job.
> 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/a6a95098-8538-44ac-98ee-22b10e27c223%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed 

Re: Git plugin issue in pipeline

2017-06-27 Thread Mark Waite


On Tuesday, June 27, 2017 at 5:01:46 PM UTC-6, Mark Waite wrote:
>
> I suspect you're encountering a conflict between the git plugin 
> maintaining compatibility with old behavior, and the desire to support 
> branch names which contain slashes.
>
> Refer to the online help in the git plugin for alternate ways to define a 
> branch name.  The format "word/word" is (unfortunately) ambiguous since it 
> can be interpreted as either the local branch "feature/branch" or as a 
> branch named "branch" on a remote named "feature".
>
> If you'll ask for "remote/feature/branch", I think you'll get the result 
> you want.
>
>
As in, "origin/feature/branch" if you're using the default remote name, 
"origin".

 

> Refer to https://issues.jenkins-ci.org/browse/JENKINS-14026 for more 
> history on the issue.
>
> Mark Waite 
>
> On Tuesday, June 27, 2017 at 3:53:07 PM UTC-6, Abhijith Reddy wrote:
>>
>> Whenever i specify a branch with GitSCM i see the following issue
>> Couldn't find any revision to build. Verify the repository and branch 
>> configuration for this job.
>>
>> Here's my Jenkinsfile
>>
>> node {
>>
>> deleteDir()
>> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]], 
>> doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
>> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [], 
>> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
>> }
>>
>>
>> and here is the error
>>
>>
>> Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to 
>> read Jenkinsfile-pull-request
>> Wiping out workspace first.
>> Cloning the remote Git repository
>> Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git 
>> 
>>  > git init 
>> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline@script
>>  
>> # timeout=10
>> Fetching upstream changes from ssh://
>> g...@stash.com:7999/capt/jenkins-pipelines.git
>>  > git --version # timeout=10
>> using GIT_SSH to set credentials automated repo access
>>  > git fetch --tags --progress ssh://
>> g...@stash.com:7999/capt/jenkins-pipelines.git 
>> +refs/heads/*:refs/remotes/origin/*
>>  > git config remote.origin.url ssh://
>> g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
>>  > git config --add remote.origin.fetch 
>> +refs/heads/*:refs/remotes/origin/* # timeout=10
>>  > git config remote.origin.url ssh://
>> g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
>> Fetching upstream changes from ssh://
>> g...@stash.com:7999/capt/jenkins-pipelines.git
>> using GIT_SSH to set credentials automated repo access
>>  > git fetch --tags --progress ssh://
>> g...@stash.com:7999/capt/jenkins-pipelines.git 
>> +refs/heads/*:refs/remotes/origin/*
>>  > git rev-parse origin/develop^{commit} # timeout=10
>> Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536 
>> (origin/develop)
>>  > git config core.sparsecheckout # timeout=10
>>  > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
>>  > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
>> First time build. Skipping changelog.
>> [Pipeline] node
>> Running on q7bld02 in 
>> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
>> [Pipeline] {
>> [Pipeline] deleteDir
>> [Pipeline] checkout
>> Cloning the remote Git repository
>> Cloning repository ssh://g...@stash.com:7999/api/mpp.git
>>  > git init 
>> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline 
>> # timeout=10
>> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>>  > git --version # timeout=10
>> using GIT_SSH to set credentials automated repo access
>>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
>> +refs/heads/*:refs/remotes/origin/*
>>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
>> timeout=10
>>  > git config --add remote.origin.fetch 
>> +refs/heads/*:refs/remotes/origin/* # timeout=10
>>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
>> timeout=10
>> Cleaning workspace
>>  > git rev-parse --verify HEAD # timeout=10
>> No valid HEAD. Skipping the resetting
>>  > git clean -fdx # timeout=10
>> Pruning obsolete local branches
>> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>> using GIT_SSH to set credentials automated repo access
>>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
>> +refs/heads/*:refs/remotes/origin/* --prune
>>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
>> timeout=10
>>  > git rev-parse 
>> refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
>> timeout=10
>>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
>> timeout=10
>> [Pipeline] }
>> [Pipeline] // node
>> [Pipeline] End of 

Re: Git plugin issue in pipeline

2017-06-27 Thread Mark Waite
I suspect you're encountering a conflict between the git plugin maintaining 
compatibility with old behavior, and the desire to support branch names 
which contain slashes.

Refer to the online help in the git plugin for alternate ways to define a 
branch name.  The format "word/word" is (unfortunately) ambiguous since it 
can be interpreted as either the local branch "feature/branch" or as a 
branch named "branch" on a remote named "feature".

If you'll ask for "remote/feature/branch", I think you'll get the result 
you want.

Refer to https://issues.jenkins-ci.org/browse/JENKINS-14026 for more 
history on the issue.

Mark Waite 

On Tuesday, June 27, 2017 at 3:53:07 PM UTC-6, Abhijith Reddy wrote:
>
> Whenever i specify a branch with GitSCM i see the following issue
> Couldn't find any revision to build. Verify the repository and branch 
> configuration for this job.
>
> Here's my Jenkinsfile
>
> node {
>
> deleteDir()
> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]], 
> doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [], 
> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
> }
>
>
> and here is the error
>
>
> Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to 
> read Jenkinsfile-pull-request
> Wiping out workspace first.
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git 
> 
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline@script
>  
> # timeout=10
> Fetching upstream changes from ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git 
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
>  > git config --add remote.origin.fetch 
> +refs/heads/*:refs/remotes/origin/* # timeout=10
>  > git config remote.origin.url ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
> Fetching upstream changes from ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://
> g...@stash.com:7999/capt/jenkins-pipelines.git 
> +refs/heads/*:refs/remotes/origin/*
>  > git rev-parse origin/develop^{commit} # timeout=10
> Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536 
> (origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
>  > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
> First time build. Skipping changelog.
> [Pipeline] node
> Running on q7bld02 in 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
> [Pipeline] {
> [Pipeline] deleteDir
> [Pipeline] checkout
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/api/mpp.git
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline 
> # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
> timeout=10
>  > git config --add remote.origin.fetch 
> +refs/heads/*:refs/remotes/origin/* # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
> timeout=10
> Cleaning workspace
>  > git rev-parse --verify HEAD # timeout=10
> No valid HEAD. Skipping the resetting
>  > git clean -fdx # timeout=10
> Pruning obsolete local branches
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
> +refs/heads/*:refs/remotes/origin/* --prune
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
> timeout=10
>  > git rev-parse 
> refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
> timeout=10
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
> timeout=10
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] End of Pipeline
> ERROR: Couldn't find any revision to build. Verify the repository and 
> branch configuration for this job.
> Finished: FAILURE
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop 

Git plugin issue in pipeline

2017-06-27 Thread Abhijith Reddy
Whenever i specify a branch with GitSCM i see the following issue
Couldn't find any revision to build. Verify the repository and branch 
configuration for this job.

Here's my Jenkinsfile

node {

deleteDir()
checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]], 
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [], 
userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
}


and here is the error


Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to 
read Jenkinsfile-pull-request
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
 > git init 
/var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline@script
 
# timeout=10
Fetching upstream changes from 
ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
 > git --version # timeout=10
using GIT_SSH to set credentials automated repo access
 > git fetch --tags --progress 
ssh://g...@stash.com:7999/capt/jenkins-pipelines.git 
+refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url 
ssh://g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* 
# timeout=10
 > git config remote.origin.url 
ssh://g...@stash.com:7999/capt/jenkins-pipelines.git # timeout=10
Fetching upstream changes from 
ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
using GIT_SSH to set credentials automated repo access
 > git fetch --tags --progress 
ssh://g...@stash.com:7999/capt/jenkins-pipelines.git 
+refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/develop^{commit} # timeout=10
Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536 
(origin/develop)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
 > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
First time build. Skipping changelog.
[Pipeline] node
Running on q7bld02 in 
/var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
[Pipeline] {
[Pipeline] deleteDir
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository ssh://g...@stash.com:7999/api/mpp.git
 > git init 
/var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline 
# timeout=10
Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
 > git --version # timeout=10
using GIT_SSH to set credentials automated repo access
 > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
+refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* 
# timeout=10
 > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git # 
timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
No valid HEAD. Skipping the resetting
 > git clean -fdx # timeout=10
Pruning obsolete local branches
Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
using GIT_SSH to set credentials automated repo access
 > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git 
+refs/heads/*:refs/remotes/origin/* --prune
 > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
timeout=10
 > git rev-parse 
refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
timeout=10
 > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} # 
timeout=10
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Couldn't find any revision to build. Verify the repository and 
branch configuration for this job.
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/a6a95098-8538-44ac-98ee-22b10e27c223%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* : 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/*
>
> 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 

Re: Issue with pipeline

2017-02-09 Thread jerome
the {workspace}@script is done during the initial fetch for the 
Jenkinsfile. Normally the pipeline checkout config. This first checkout is 
not transfer to the real workspace when you start the script


   1. the jenkinsfile checkout inside {workspace}@script. I strongly 
   suggest you get a small repos without the source code, else you will be 
   checkouting twice the source.
   2. read the jenkins file pipeline script inside {workspace}@script
   3. change the directory to {workspace}
   4. start executing the jenkinsfile inside {workspace}
   5. you pipeline script should scm checkout the real source code repos to 
   compile or do any other tasks

I for one would like to have an env variables to get that @script folder, 
since @script2+ is possible. I used some script helper to run the pipeline 
script which are found into the Jenkinsfile repos only. Right now I do 3 
checkout to ensure proper execution (I avoid refereing to 
{workspace}@script at all). 1 for the initial jenkinsfile into the @script, 
2 the jenkinsfile repos again for script helper into workspace which I can 
access and 3 the source code itself into workspace.

-- 
You received this message because you are 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/22f3d61e-5b00-4d48-898f-71028be0a9c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with pipeline

2017-02-09 Thread Daniel Beck

> On 09.02.2017, at 03:17, Sharan Basappa  wrote:
> 
> But I would like to understand the reason behind having files in 
> {workspace}@script rather than {workspace} ...

The Jenkinsfile is checked out to @script so it's not in the actual workspace 
(duh), and you can e.g. deleteDir() to remove leftovers from previous builds 
without getting into problems (imagine a cartoon character sawing off the 
branch on which it sits…).

Did you forget to `checkout scm` inside the node block?

-- 
You received this message because you are 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/F90EA17C-C22B-47D7-9A32-783AAB0E4CF1%40beckweb.net.
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.


Re: Issue with pipeline

2017-02-07 Thread David Karr
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/7b73b757-c8d5-42eb-b047-a269aa15abd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with pipeline

2017-02-07 Thread Indra Gunawan (ingunawa)
Do you have the simple.csh file checked-in or not?


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: Tuesday, February 7, 2017 at 10:15 AM
To: Jenkins Users <jenkinsci-users@googlegroups.com>
Subject: Issue with pipeline

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<mailto: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<https://groups.google.com/d/msgid/jenkinsci-users/73d02186-75a9-4e8a-8787-5ca05cc38ba5%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/921C54C2-9941-47E8-B320-1B6796C00F8A%40cisco.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: GitHub webhook push CI issue with pipeline projects

2016-11-11 Thread Indra Gunawan (ingunawa)
The purpose of Github project field In the Jenkins Job configuration is
just to make Github available in the Jenkins left-nav.



On 11/10/16, 7:48 PM, "jenkinsci-users@googlegroups.com on behalf of Cory
Grubbs"  wrote:

>Okstill doesn't solve the problem of having to have two separate
>Jenkins projects for every build which is not efficient nor scalable to
>the level I need it to be.
>
>I find it hard to believe you can't configure a webhook on a github repo
>to kick off a specific Jenkins job that isn't connected to the repo but I
>sure can't figure out how.
>
>What is the purpose of the Github project field within the Jenkins job
>configuration if it doesn't create the necessary association for webhooks
>to invoke the job when changes are pushed to the specified github repo?
>
>Cory
>
>-- 
>You received this message because you are 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/11eac010-ef97-4eba-9123-
>ab7bd4eff432%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/D44B51A1.5FC18%25ingunawa%40cisco.com.
For more options, visit https://groups.google.com/d/optout.


Re: GitHub webhook push CI issue with pipeline projects

2016-11-10 Thread Cory Grubbs
Okstill doesn't solve the problem of having to have two separate Jenkins 
projects for every build which is not efficient nor scalable to the level I 
need it to be. 

I find it hard to believe you can't configure a webhook on a github repo to 
kick off a specific Jenkins job that isn't connected to the repo but I sure 
can't figure out how. 

What is the purpose of the Github project field within the Jenkins job 
configuration if it doesn't create the necessary association for webhooks to 
invoke the job when changes are pushed to the specified github repo?

Cory

-- 
You received this message because you are 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/11eac010-ef97-4eba-9123-ab7bd4eff432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: GitHub webhook push CI issue with pipeline projects

2016-11-10 Thread Indra Gunawan (ingunawa)
The 1st job does not need poll.  If you have Github plugin and have
configured and installed github-webhook on the source git repository on
GitHub, you enable it to trigger with Github build trigger ³Build when a
change is pushed to GitHub².

You can only associate the pipeline with the source repo if you also
commit the jenkinsFile into the same source repo.
 


On 11/10/16, 2:17 PM, "jenkinsci-users@googlegroups.com on behalf of Cory
Grubbs"  wrote:

>The whole objective is to get away from poll based CI as it places
>unnecessary and unsustainable load on both the source control system and
>Jenkins when you have thousands of projects continuously polling. In
>addition this is not a scalable/efficient solution in that you would have
>to create 2 Jenkins projects for every single build job.
>
>This is why I'm looking for a way to associate a pipeline project to a
>specific github repo so that the webhook knows which project to execute
>when invoked from github.
>
>-- 
>You received this message because you are 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/b2a91747-43ba-4cfa-8462-
>3b57b5253620%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/D44A5A1E.5FA86%25ingunawa%40cisco.com.
For more options, visit https://groups.google.com/d/optout.


Re: GitHub webhook push CI issue with pipeline projects

2016-11-10 Thread Cory Grubbs
The whole objective is to get away from poll based CI as it places unnecessary 
and unsustainable load on both the source control system and Jenkins when you 
have thousands of projects continuously polling. In addition this is not a 
scalable/efficient solution in that you would have to create 2 Jenkins projects 
for every single build job. 

This is why I'm looking for a way to associate a pipeline project to a specific 
github repo so that the webhook knows which project to execute when invoked 
from github. 

-- 
You received this message because you are 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/b2a91747-43ba-4cfa-8462-3b57b5253620%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: GitHub webhook push CI issue with pipeline projects

2016-11-10 Thread Indra Gunawan (ingunawa)
You can create a job that polls for the commit/push to the application
source repository. This job will then simply trigger the pipeline job.

On 11/10/16, 9:55 AM, "jenkinsci-users@googlegroups.com on behalf of Cory
Grubbs"  wrote:

>As a managed service which utilizes Jenkins for CI builds, I have created
>a generic pipeline script which is used by all projects to build. The
>script reads in application specific property files which drives what
>gets executed within the pipeline.
> 
>The generic pipeline script and the application specific property files
>are stored within my github repository.
> 
>The problem I¹m running into is when trying to setup push CI events via
>webhooks on application source repositories. If there is a source
>commit/push on an application source repository, I want to trigger a
>build of the corresponding Jenkins pipeline project. Because there is no
>direct source configuration within the pipeline project, there doesn¹t
>seem to be a way for the webhook to associate where the commit took place
>with the given pipeline project and invoke a build.
> 
>I was hoping the ³GitHub project url² field would allow me to associate
>the pipeline project with the application source repo that the webhook
>should trigger builds on, but that doesn¹t seem to be the case.
> 
>Please assist with guidance on how this can be accomplished.
>
>Cory
>
>-- 
>You received this message because you are 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/5768597b-012d-4466-b8c8-
>2431a1fd0f32%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/D44A1D04.5F9CA%25ingunawa%40cisco.com.
For more options, visit https://groups.google.com/d/optout.


Re: GitHub webhook push CI issue with pipeline projects

2016-11-10 Thread Cory Grubbs
As a managed service which utilizes Jenkins for CI builds, I have created a 
generic pipeline script which is used by all projects to build. The script 
reads in application specific property files which drives what gets executed 
within the pipeline.
 
The generic pipeline script and the application specific property files are 
stored within my github repository.
 
The problem I’m running into is when trying to setup push CI events via 
webhooks on application source repositories. If there is a source commit/push 
on an application source repository, I want to trigger a build of the 
corresponding Jenkins pipeline project. Because there is no direct source 
configuration within the pipeline project, there doesn’t seem to be a way for 
the webhook to associate where the commit took place with the given pipeline 
project and invoke a build.
 
I was hoping the “GitHub project url” field would allow me to associate the 
pipeline project with the application source repo that the webhook should 
trigger builds on, but that doesn’t seem to be the case.
 
Please assist with guidance on how this can be accomplished.

Cory

-- 
You received this message because you are 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/5768597b-012d-4466-b8c8-2431a1fd0f32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.