Re: java.lang.NoSuchMethodError: No such DSL method 'pipeline' found among steps

2018-08-22 Thread 'Björn Pedersen' via Jenkins Users
Hi,


> 2) Create it with Notepad++, choose UTF-8 encoding, save it and 
> commit/push to a Git branch;
>


And I guess that is where  the byte-order mark slips in (thats something 
that happens mostly on Windows systems, and it's invisible in the file).
Check 
https://notepad-plus-plus.org/community/topic/14355/encoding-without-bom-where 
to see how to write a file without BOM mark at the beginning.

Björn

-- 
You received this message because you are subscribed to the Google 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/b08237cc-f109-45cd-a369-099274150a63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Want to build Jenkins job every after 15 seconds

2018-08-22 Thread athavan
However, the build schedule cron in Jenkins can have a minimum value of 1 
minute. As far as I know, it won't help for frequency less than a minute. 

On Thursday, August 23, 2018 at 12:15:55 AM UTC+5:30, Robert Rajendra wrote:
>
> Configure a build schedule in jenkins or set a cron under pol scm to run 
> the job
>
> On Wed, 22 Aug 2018, 5:22 pm ,  wrote:
>
>> You may run two Jenkins job with the same code .Say, a master and slave 
>> job. Configure the "quiet period" as 15 seconds for both the jobs and Set 
>> the Master job to build after slave and Slave job to build after Master 
>> using the Build Trigger setings. Now start the Master job. Both the jobs 
>> will do the same task in the frequency of 15 seconds now. Hope this solves 
>> your problem.
>>
>> On Wednesday, July 2, 2014 at 2:12:27 PM UTC+5:30, Swapnil Pawar wrote:
>>>
>>> Hi,
>>>
>>> Can you please tell me How I can schedule Jenkins Job which will execute 
>>> every after 15 seconds.
>>>
>>> Regards,
>>> Swapnil
>>>
>> -- 
>> You received this message because you are 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/a718e820-62a4-49b8-b3d0-6ec6bb84f027%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>
> *Robert Rajendra*
>
> Associate Network/Server Support Engineer 
>
> India +91.863.087.3094
>
> IT Hands offers Technology Solutions to Grow your Business. 
> 
>

-- 
You received this message because you are subscribed to the Google 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/28778b72-9690-49cb-9960-2d90ee958c6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I get the “parentNumber” in my jenkins pipeline?

2018-08-22 Thread red 888
Im not sure where that file is, but im more interested in _how_ they get 
that value. How can you get the build number of the job you rebuild from?

It looks like they're using the build cause to get that build number? Does 
the build cause have the build number of the "parent" job I run rebuild 
from?

-- 
You received this message because you are subscribed to the Google 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/12a98960-4cae-4fb0-8925-e71802285cdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I get the “parentNumber” in my jenkins pipeline?

2018-08-22 Thread red 888
Im not sure where that file is, but im more interested in _how_ they get 
that value. How can you get the build number of the job you rebuild from?

On Wednesday, August 22, 2018 at 8:50:18 PM UTC-4, Jan Monterrubio wrote:
>
> The variables come from: 
> https://wiki.jenkins.io/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-belowJenkinsSetEnvironmentVariables
>  
> , I believe what you have is BUILD_NUMBER.
>
> They're probably passed into the plugin.
>
> Would you be able to get the file located at BUILDINFO_PROPFILE? I found 
> this in the changelog:
>
> "Build-info exports an environment variable 'BUILDINFO_PROPFILE' with the 
> location of the generated build info properties file"
>
>1. 
>
>
>
> On Wed, Aug 22, 2018 at 5:36 PM red 888  > wrote:
>
>> Using the artifactory plugin.
>>
>>
>> When I rebuild a jenkins job and deploy to jfrog, I see this in the build 
>> info json: 
>>
>> [image: enter image description here] 
>> 
>>
>>
>> Super useful to me and I cant find how to get that in the jenkins 
>> pipeline anywhere- its the job from which it was rebuilt.
>>
>> So when I rebuild a job from an old build this value is the number of the 
>> build I rebuilt it from.
>>
>>
>> How do I get that in my pipeline? I look in the build info object but its 
>> not there:
>>
>> def artifactory = Artifactory.server 'myserver.jfrog.io'
>> def buildInfo = Artifactory.newBuildInfo()
>> echo buildInfo.dump()
>>
>>
>> How does the plugin even get this info? Its no where in the env vars I 
>> can find and I havent seen any examples of how to get it.
>>
>> -- 
>> You received this message because you are 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/5ad01da6-f7fb-450b-bff9-8a831121e69c%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/15f1b7e4-7a7e-43df-8b16-4c8ba740d221%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins K8s plugin - PodTemplate fails to create a Nodejs container

2018-08-22 Thread Jan Monterrubio
Does the container work on its own?

Looks like you have this part in the container:

"RUN apk add --no-cache --virtual .gyp \
python \
make \
g++ \
git \
&& npm install --quit && npm cache clean --force \
&& apk del .gyp"

Which runs npm install

On Wed, Aug 22, 2018 at 6:08 AM gil  wrote:

> Anyone?
>
> On Sunday, 12 August 2018 11:28:54 UTC+3, gil wrote:
>>
>> Trying to tun a podTemaplate with the following containerTemplate, we get
>> the following error:
>>
>> npm ERR! path /home/jenkins/package.json
>> npm ERR! code ENOENT
>> npm ERR! errno -2
>> npm ERR! syscall open
>> npm ERR! enoent ENOENT: no such file or directory, open
>> '/home/jenkins/package.json'
>> npm ERR! enoent This is related to npm not being able to find a file.
>> npm ERR! enoent
>>
>> npm ERR! A complete log of this run can be found in:
>> npm ERR! /home/jenkins/.npm/_logs/2018-07-18T10_27_32_822Z-debug.log
>>
>>
>>
>> Configurations:
>>
>> Jenkinsfile PodTemplate:
>>
>>
>> deftestpod="testpod-${UUID.randomUUID().toString()}"
>> podTemplate(label: testpod, containers: [
>> containerTemplate(
>> name: 'myContainer',
>> image: 'gcr.io/xxx/xxxs/zzz:latest',
>> alwaysPullImage: true
>> )],
>> volumes: [
>> hostPathVolume(hostPath: '/var/run/docker.sock', mountPath:
>> '/var/run/docker.sock')
>> ])
>> {
>> try{
>> node(testpod) {
>> stage ("checkout") {
>> container('myContainer')
>> { checkout scm }
>>
>> }
>> ...
>>
>> zzz dockerfile:
>>
>> FROM node:8.9.4-alpine
>> RUN mkdir -p /usr/src/app
>>
>> WORKDIR /usr/src/app
>>
>> COPY package.json /usr/src/app/
>> ARG NODE_ENV
>> ENV NODE_ENV $NODE_ENV
>>
>>1. Add packages needed to build native dependencies
>>RUN apk add --no-cache --virtual .gyp \
>>python \
>>make \
>>g++ \
>>git \
>>&& npm install --quit && npm cache clean --force \
>>&& apk del .gyp
>>
>> RUN apk add --no-cache vim curl
>> COPY . .
>>
>> EXPOSE 
>> CMD [ "npm", "start"]
>>
>>
>> *
>>
>> /home/jenkins is mounted as a volume
>>
>> 1. Why this mounted volume effects the container?
>>
>> 2. Does the plugin do anything besides "docker run "? I am
>> asking this because I don't understand why it is running "nmp install"...
>>
>> 3. Can you please suggest how can this be fixed?
>>
>>
>> FYI -
>>
>> If I add a working directory to the containerTemplate I get the same
>> error with the working directory path:
>>
>> working directory configuration:
>> workingDir: '/usr/src/app',
>>
>>
>> Err msg:
>>
>> kubectl logs -f -c workers jenkins-slave-4tfz2-3nw6d -n jenkins
>> npm ERR! path /usr/src/app/package.json
>> npm ERR! code ENOENT
>> npm ERR! errno -2
>> npm ERR! syscall open
>> npm ERR! enoent ENOENT: no such file or directory, open
>> '/usr/src/app/package.json'
>> npm ERR! enoent This is related to npm not being able to find a file.
>> npm ERR! enoent
>>
>>
>>
>> --
> You received this message because you are subscribed to the Google 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/eaaf1ea1-698a-4712-9776-95a3ecea46d0%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/CADgiF9KsvXCcFr2vfuE%3DUVR5EcNBrivVmQnUc-rK%3DJ8upviRRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Reg scanning for all branches in Multi branch pipeline

2018-08-22 Thread Jan Monterrubio
Could you use one of those PruneStaleBranches traits?


https://github.com/jenkinsci/git-plugin/blob/dd2b84217cc967bf908c7f2c02beea27973cd884/src/main/java/hudson/plugins/git/extensions/impl/PruneStaleBranch.java


>  Or can we add any rule like scan only branches which has Jenkinsfile

How would it know what branches have a jenkins file without scanning them
all?

Follow up question, why 450 branches? Are they all active or can some of
them be removed?

On Wed, Aug 22, 2018 at 7:41 AM Satish Lvr  wrote:

> Hi,
>
> Greetings !
>
> We are currently using Bitbucket + Jenkins. In our Bitbucket repo, we have
> around ~450 branches due to some old reasons.
> When we raise any Pull request, Jenkins automatically scanning all 450
> branches which is taking time to finish build for Pull Request. This is
> happening for all pull requests created.
> Is there any way to avoid to not scan for the branches which we don't want
> or which are not active ? Or can we add any rule like scan only branches
> which has Jenkinsfile. Most of the branches do not have Jenkinsfile.
>
> Regards
> Satish.
>
> --
> You received this message because you are subscribed to the Google 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/23844211-599b-4cac-a239-f3bec3b58aac%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/CADgiF9KDD7YR9igSWbQUKmhHK1QoXr7Ph1Y7AxOiVjTU-4h-sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I get the “parentNumber” in my jenkins pipeline?

2018-08-22 Thread Jan Monterrubio
The variables come from:
https://wiki.jenkins.io/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-belowJenkinsSetEnvironmentVariables
, I believe what you have is BUILD_NUMBER.

They're probably passed into the plugin.

Would you be able to get the file located at BUILDINFO_PROPFILE? I found
this in the changelog:

"Build-info exports an environment variable 'BUILDINFO_PROPFILE' with the
location of the generated build info properties file"

   1.



On Wed, Aug 22, 2018 at 5:36 PM red 888  wrote:

> Using the artifactory plugin.
>
>
> When I rebuild a jenkins job and deploy to jfrog, I see this in the build
> info json:
>
> [image: enter image description here]
> 
>
>
> Super useful to me and I cant find how to get that in the jenkins pipeline
> anywhere- its the job from which it was rebuilt.
>
> So when I rebuild a job from an old build this value is the number of the
> build I rebuilt it from.
>
>
> How do I get that in my pipeline? I look in the build info object but its
> not there:
>
> def artifactory = Artifactory.server 'myserver.jfrog.io'
> def buildInfo = Artifactory.newBuildInfo()
> echo buildInfo.dump()
>
>
> How does the plugin even get this info? Its no where in the env vars I can
> find and I havent seen any examples of how to get it.
>
> --
> You received this message because you are subscribed to the Google 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/5ad01da6-f7fb-450b-bff9-8a831121e69c%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/CADgiF9%2BqhJuLtAjLKGNW1Rw%2BZT8%3DydyrGWZ8GhC5WO02b-VprQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: java.lang.NoSuchMethodError: No such DSL method 'pipeline' found among steps

2018-08-22 Thread Jan Monterrubio
Do you have the jobdsl plugin installed?

On Wed, Aug 22, 2018 at 13:45 Pablo Gandulfo  wrote:

> Hi Mr. Mark Waite,
>
> Maybe there is another issue related to this problem, related to countries
> using latin encoding as standard (I'm from Brazil).
>
> I didn't use any special byte-order mark. These are the steps needed to
> reproduce the error:
>
> 1) Choose a very simple jenkinsfile:
>
> pipeline {
> agent any
>
> stages {
> stage('Build') {
> steps {
> echo 'Building..'
> }
> }
> stage('Test') {
> steps {
> echo 'Testing..'
> }
> }
> stage('Deploy') {
> steps {
> echo 'Deploying'
> }
> }
> }
> }
>
> 2) Create it with Notepad++, choose UTF-8 encoding, save it and
> commit/push to a Git branch;
>
> 3) From a Pipeline Job at Jenkins, configure it to retrieve that branch
> and run the jenkinsfile;
>
> 4) Launch the job. It will complain about "java.lang.NoSuchMethodError: No
> such DSL method 'pipeline' found among steps".
> *Note:* whatever command you choose in the jenkinsfile as the first one
> (node, stage, etc.), all of them will throw the same error;
>
> 5) At Notepad++, now change to ANSI encoding, save it and commit/push to
> Git;
>
> 6) Launch the same job. It will run with success.
>
> Regards,
> Pablo.
>
> terça-feira, 21 de Agosto de 2018 às 20:15:14 UTC-3, Mark Waite escreveu:
>>
>> Can you explain further what you mean when you say that the file was
>> formatted with UTF-8?
>>
>> As an example, I have a scripted Pipeline Jenkinsfile
>>  
>> which
>> includes Japanese characters and is well-behaved.  I am reasonably certain
>> that it is UTF-8.  I have a declarative Jenkinsfile
>> 
>> which also includes Japanese characters and is well-behaved.
>>
>> Does the file you are editing use a byte-order mark to indicate that it
>> is UTF-8?
>>
>> Is there some other technique that indicates it is a UTF-8 file?
>>
>> If you can provide steps to duplicate the problem, feel free to upload
>> those steps to JENKINS-52844, or to create a new bug report if you believe
>> that the bug you're seeing does not match JENKINS-52844.
>>
>> Mark Waite
>>
>> On Tue, Aug 21, 2018 at 2:33 PM Pablo Gandulfo 
>> wrote:
>>
>>> I got this error and invested a considerable amount of time to solve it,
>>> searching on internet and trying different approaches, all of them with no
>>> success. Finally, I found the cause and solve it. So, I would like to share
>>> this knowledge and I hope that someone at Jenkins Developer Team document
>>> this to avoid others facing the same problem.
>>>
>>> The cause was that the Jenkinsfile was formatted with UTF-8. That's it!
>>> Firstly I was using it in ANSI, but some latin characters were appearing
>>> wrongly in the log. So I changed to UTF-8 and, suddenly, every first work I
>>> used in the script file (pipeline, node, def, etc.) didn't work anymore,
>>> throwing the same error: "java.lang.NoSuchMethodError: No such DSL method
>>> 'X' found among steps".
>>>
>>> I imagine that this may be the cause of JENKINS-52844 , which was opened
>>> recently. So, Andrew Bayer (@abayer), I hope you see this message too.
>>>
>>> Regards,
>>> Pablo.
>>>
>>> --
>>> You received this message because you are 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/0d435cdd-0669-4ed5-9142-bb58730bece6%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/5ba8ecbc-c460-4ba4-9ef3-a2188e122ec2%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-user

How do I get the “parentNumber” in my jenkins pipeline?

2018-08-22 Thread red 888


Using the artifactory plugin.


When I rebuild a jenkins job and deploy to jfrog, I see this in the build 
info json: 

[image: enter image description here] 


Super useful to me and I cant find how to get that in the jenkins pipeline 
anywhere- its the job from which it was rebuilt.

So when I rebuild a job from an old build this value is the number of the 
build I rebuilt it from.


How do I get that in my pipeline? I look in the build info object but its 
not there:

def artifactory = Artifactory.server 'myserver.jfrog.io'
def buildInfo = Artifactory.newBuildInfo()
echo buildInfo.dump()


How does the plugin even get this info? Its no where in the env vars I can 
find and I havent seen any examples of how to get it.

-- 
You received this message because you are subscribed to the Google 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/5ad01da6-f7fb-450b-bff9-8a831121e69c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: java.lang.NoSuchMethodError: No such DSL method 'pipeline' found among steps

2018-08-22 Thread Pablo Gandulfo
Hi Mr. Mark Waite,

Maybe there is another issue related to this problem, related to countries 
using latin encoding as standard (I'm from Brazil).

I didn't use any special byte-order mark. These are the steps needed to 
reproduce the error:

1) Choose a very simple jenkinsfile:

pipeline {
agent any

stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying'
}
}
}
}

2) Create it with Notepad++, choose UTF-8 encoding, save it and commit/push 
to a Git branch;

3) From a Pipeline Job at Jenkins, configure it to retrieve that branch and 
run the jenkinsfile;

4) Launch the job. It will complain about "java.lang.NoSuchMethodError: No 
such DSL method 'pipeline' found among steps".
*Note:* whatever command you choose in the jenkinsfile as the first one 
(node, stage, etc.), all of them will throw the same error;

5) At Notepad++, now change to ANSI encoding, save it and commit/push to 
Git;

6) Launch the same job. It will run with success.

Regards,
Pablo.

terça-feira, 21 de Agosto de 2018 às 20:15:14 UTC-3, Mark Waite escreveu:
>
> Can you explain further what you mean when you say that the file was 
> formatted with UTF-8?
>
> As an example, I have a scripted Pipeline Jenkinsfile 
>  
> which 
> includes Japanese characters and is well-behaved.  I am reasonably certain 
> that it is UTF-8.  I have a declarative Jenkinsfile 
>  
> which also includes Japanese characters and is well-behaved.
>
> Does the file you are editing use a byte-order mark to indicate that it is 
> UTF-8?
>
> Is there some other technique that indicates it is a UTF-8 file?
>
> If you can provide steps to duplicate the problem, feel free to upload 
> those steps to JENKINS-52844, or to create a new bug report if you believe 
> that the bug you're seeing does not match JENKINS-52844.
>
> Mark Waite
>
> On Tue, Aug 21, 2018 at 2:33 PM Pablo Gandulfo  > wrote:
>
>> I got this error and invested a considerable amount of time to solve it, 
>> searching on internet and trying different approaches, all of them with no 
>> success. Finally, I found the cause and solve it. So, I would like to share 
>> this knowledge and I hope that someone at Jenkins Developer Team document 
>> this to avoid others facing the same problem.
>>
>> The cause was that the Jenkinsfile was formatted with UTF-8. That's it! 
>> Firstly I was using it in ANSI, but some latin characters were appearing 
>> wrongly in the log. So I changed to UTF-8 and, suddenly, every first work I 
>> used in the script file (pipeline, node, def, etc.) didn't work anymore, 
>> throwing the same error: "java.lang.NoSuchMethodError: No such DSL method 
>> 'X' found among steps".
>>
>> I imagine that this may be the cause of JENKINS-52844 , which was opened 
>> recently. So, Andrew Bayer (@abayer), I hope you see this message too.
>>
>> Regards,
>> Pablo.
>>
>> -- 
>> You received this message because you are 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/0d435cdd-0669-4ed5-9142-bb58730bece6%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/5ba8ecbc-c460-4ba4-9ef3-a2188e122ec2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Want to build Jenkins job every after 15 seconds

2018-08-22 Thread Robert Rajendra
Configure a build schedule in jenkins or set a cron under pol scm to run
the job

On Wed, 22 Aug 2018, 5:22 pm ,  wrote:

> You may run two Jenkins job with the same code .Say, a master and slave
> job. Configure the "quiet period" as 15 seconds for both the jobs and Set
> the Master job to build after slave and Slave job to build after Master
> using the Build Trigger setings. Now start the Master job. Both the jobs
> will do the same task in the frequency of 15 seconds now. Hope this solves
> your problem.
>
> On Wednesday, July 2, 2014 at 2:12:27 PM UTC+5:30, Swapnil Pawar wrote:
>>
>> Hi,
>>
>> Can you please tell me How I can schedule Jenkins Job which will execute
>> every after 15 seconds.
>>
>> Regards,
>> Swapnil
>>
> --
> You received this message because you are subscribed to the Google 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/a718e820-62a4-49b8-b3d0-6ec6bb84f027%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

*Robert Rajendra*

Associate Network/Server Support Engineer

India +91.863.087.3094

IT Hands offers Technology Solutions to Grow your Business.


-- 
You received this message because you are subscribed to the Google 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/CABbC_KFEZWANgFG%2BtVk%2Bwty_TeCs5gfSmcq7u6vZH9%3Dz6KBxOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Reg scanning for all branches in Multi branch pipeline

2018-08-22 Thread Satish Lvr
Hi,

Greetings !

We are currently using Bitbucket + Jenkins. In our Bitbucket repo, we have 
around ~450 branches due to some old reasons.
When we raise any Pull request, Jenkins automatically scanning all 450 
branches which is taking time to finish build for Pull Request. This is 
happening for all pull requests created.
Is there any way to avoid to not scan for the branches which we don't want 
or which are not active ? Or can we add any rule like scan only branches 
which has Jenkinsfile. Most of the branches do not have Jenkinsfile.

Regards
Satish.

-- 
You received this message because you are subscribed to the Google 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/23844211-599b-4cac-a239-f3bec3b58aac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Disable Scan Organization Button For Non-admin users

2018-08-22 Thread apeleg
Is it possible to disable the button? 

Occasionally a developer will press the button and as a result we will hit 
limits on our github api quota.

-- 
You received this message because you are subscribed to the Google 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/5f978100-4e4f-4f20-9014-cbbf2f3093cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to execute oracle sqlplus in jenkins pipeline??

2018-08-22 Thread 김용호
Hello, I really new to jenkins and I have a problem about sql query 
execution in jenkins pipeline.

I want to execute sql query with oracle sqlplus in pipeline code and query 
string is in a test.sql file(parameter).
I'm not using SQLPlus plugin and only use pipeline.

How can I do this? 
And what I need to do this? (plugin or setting option etc)

please 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/0517b807-2a56-4492-8824-d6480de6a360%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Want to build Jenkins job every after 15 seconds

2018-08-22 Thread athavan
You may run two Jenkins job with the same code .Say, a master and slave 
job. Configure the "quiet period" as 15 seconds for both the jobs and Set 
the Master job to build after slave and Slave job to build after Master 
using the Build Trigger setings. Now start the Master job. Both the jobs 
will do the same task in the frequency of 15 seconds now. Hope this solves 
your problem.

On Wednesday, July 2, 2014 at 2:12:27 PM UTC+5:30, Swapnil Pawar wrote:
>
> Hi,
>
> Can you please tell me How I can schedule Jenkins Job which will execute 
> every after 15 seconds.
>
> Regards,
> Swapnil
>

-- 
You received this message because you are subscribed to the Google 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/a718e820-62a4-49b8-b3d0-6ec6bb84f027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins K8s plugin - PodTemplate fails to create a Nodejs container

2018-08-22 Thread gil
Anyone?

On Sunday, 12 August 2018 11:28:54 UTC+3, gil wrote:
>
> Trying to tun a podTemaplate with the following containerTemplate, we get 
> the following error:
>
> npm ERR! path /home/jenkins/package.json
> npm ERR! code ENOENT
> npm ERR! errno -2
> npm ERR! syscall open
> npm ERR! enoent ENOENT: no such file or directory, open 
> '/home/jenkins/package.json'
> npm ERR! enoent This is related to npm not being able to find a file.
> npm ERR! enoent
>
> npm ERR! A complete log of this run can be found in:
> npm ERR! /home/jenkins/.npm/_logs/2018-07-18T10_27_32_822Z-debug.log
>
>  
>
> Configurations:
>
> Jenkinsfile PodTemplate:
>
>  
> deftestpod="testpod-${UUID.randomUUID().toString()}"
> podTemplate(label: testpod, containers: [
> containerTemplate(
> name: 'myContainer',
> image: 'gcr.io/xxx/xxxs/zzz:latest',
> alwaysPullImage: true
> )],
> volumes: [
> hostPathVolume(hostPath: '/var/run/docker.sock', mountPath: 
> '/var/run/docker.sock')
> ])
> {
> try{
> node(testpod) {
> stage ("checkout") {
> container('myContainer')
> { checkout scm }
>
> }
> ...
>  
> zzz dockerfile:
>
> FROM node:8.9.4-alpine
> RUN mkdir -p /usr/src/app
>
> WORKDIR /usr/src/app
>
> COPY package.json /usr/src/app/
> ARG NODE_ENV
> ENV NODE_ENV $NODE_ENV
>
>1. Add packages needed to build native dependencies
>RUN apk add --no-cache --virtual .gyp \
>python \
>make \
>g++ \
>git \
>&& npm install --quit && npm cache clean --force \
>&& apk del .gyp
>
> RUN apk add --no-cache vim curl
> COPY . .
>
> EXPOSE 
> CMD [ "npm", "start"]
>
>
> *
>
> /home/jenkins is mounted as a volume
>
> 1. Why this mounted volume effects the container?
>
> 2. Does the plugin do anything besides "docker run "? I am 
> asking this because I don't understand why it is running "nmp install"...
>
> 3. Can you please suggest how can this be fixed?
>
>
> FYI - 
>
> If I add a working directory to the containerTemplate I get the same error 
> with the working directory path:
>
> working directory configuration:
> workingDir: '/usr/src/app',
>  
>
> Err msg:
>
> kubectl logs -f -c workers jenkins-slave-4tfz2-3nw6d -n jenkins
> npm ERR! path /usr/src/app/package.json
> npm ERR! code ENOENT
> npm ERR! errno -2
> npm ERR! syscall open
> npm ERR! enoent ENOENT: no such file or directory, open 
> '/usr/src/app/package.json'
> npm ERR! enoent This is related to npm not being able to find a file.
> npm ERR! enoent
>
>
>
>

-- 
You received this message because you are subscribed to the Google 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/eaaf1ea1-698a-4712-9776-95a3ecea46d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting cause for branch indexing in multibranch pipeline

2018-08-22 Thread Sverre Moe


import jenkins.branch.BranchIndexingCause

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

}
}


tirsdag 21. august 2018 19.01.57 UTC+2 skrev Ramanathan Muthaiah følgende:
>
> Am referring to this API doc to find out which method should be used to 
> identify the reason for a build job to be triggered.
>
> http://javadoc.jenkins-ci.org/hudson/model/class-use/Cause.html
>
> Would appreciate if anyone on this list could point me to the relevant 
> method ?
>
> For some strange reason, GHE org folder config (in prod Jenkins) does not 
> have periodic triggering / scanning (that initiates branch indexing) but 
> the detected repos have that option enabled !!!
>
> --
> regards
> Ram
>
>

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