Error in Jenkins pipeline when running the script from SVN

2017-12-28 Thread bsurajit

Hi Team,
I am getting the following error when running a pipeline script from SVN.

DSM-WCM-Automation 

 - This folder location I have newly added in SVN through SVN client and 
uploaded the required script files, and I am getting this error.

I have another  folder location where all old projects are situated and I have 
uploaded my scripts there as well, if I give the old folder location in the 
pipeline configuration, then Jenkins build is successful and its able to find 
the scripts from SVN.


Would appreciate if you could rectify the issue for which I am getting this 
error.


Error message:

Checking out svn 
http://nlxdsmcv19.srvfarm4-eur.dsm-group.com:2000/subversion/WCM/DSM-WCM-Automation/trunk
 to read 
jenkins/scripts/aem-maintenance/aem-qa-workflow-purge-pipeline-wrapper.groovy
Cleaning up 
/appl/dsm/jenkins/jobs/WCM/jobs/AEM_WORKFLOW_PURGE_QA_WRAPPER/workspace@script/trunk
Updating 
http://nlxdsmcv19.srvfarm4-eur.dsm-group.com:2000/subversion/WCM/DSM-WCM-Automation/trunk
 at revision '2017-12-28T22:55:03.463 +0100'
Using sole credentials jenkins/** (Please use this credential to login into 
Subversion) in realm ‘ DSM 
DBS - IOS subversion repository’
D jenkins
A jenkins
A jenkins/scripts
A jenkins/scripts/aem-maintenance
A 
jenkins/scripts/aem-maintenance/aem-prod-workflow-purge-pipeline-wrapper.groovy
A 
jenkins/scripts/aem-maintenance/aem-qa-flush-replication-nodes-pipeline-wrapper.groovy
A 
jenkins/scripts/aem-maintenance/aem-prod-flush-replication-nodes-pipeline-wrapper.groovy
A 
jenkins/scripts/aem-maintenance/aem-qa-workflow-purge-pipeline-wrapper.groovy
At revision 9686

Using sole credentials jenkins/** (Please use this credential to login into 
Subversion) in realm ‘ DSM 
DBS - IOS subversion repository’
ERROR: 
/appl/dsm/jenkins/jobs/WCM/jobs/AEM_WORKFLOW_PURGE_QA_WRAPPER/workspace@script/jenkins/scripts/aem-maintenance/aem-qa-workflow-purge-pipeline-wrapper.groovy
 not found
Finished: FAILURE


Kind regards,
Surajit

-- 
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/a490796c-3288-4093-a89f-e5b6ebe5e48c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Example of a working pod with the kubernetes-ci plugin

2017-12-28 Thread Vamsi krishna
@carlos   
i checked the logs but there is nothing showing in the logs jenkins is 
running outside of the cluster.. so i cant use the jenkins if i run outside 
the cluster.

On Monday, November 21, 2016 at 12:43:08 AM UTC-8, Sébastien Douche wrote:
>
> Hi folks, 
> I try with the kubernetes-ci to create a pod with a container to do some 
> work (get source code, compile it, etc) and a jnlp container (only used 
> to connect to the Jenkins server). The goal is to avoid the adding of 
> the jnlp binary into all my containers. So I tried this: 
>
>  
> apiVersion: "v1" 
> kind: "Pod" 
> metadata: 
>   name: "k8s-slave" 
>   labels: 
> name: "k8s-slave" 
> spec: 
>   containers: 
>   - name: "jenkins-slave" 
> image: "jenkinsci/jnlp-slave" 
> volumeMounts: 
> - mountPath: /home/jenkins 
>   name: workspace-volume 
> env: 
> - name: "JENKINS_URL" 
>   value: "https://XXX"; 
>   - name: "golang" 
> image: "golang:1.6.3-alpine" 
> volumeMounts: 
> - mountPath: /home/jenkins 
>   name: workspace-volume 
>   volumes: 
> - emptyDir: {} 
>   name: workspace-volume 
>  
>
> And a trivial job which try to access on the golang container: 
>
>  
> git clone https://github.com/hashicorp/terraform.git 
> mkdir -p /go/src/github.com/hashicorp 
> ln -s `pwd` /go/src/github.com/hashicorp/terraform 
> cd /go/src/github.com/hashicorp/terraform && make core-dev 
>  
>
> It doesn't work 'cause the job have access on the jnlp fs and not the 
> golang one. What is missing to access on the golang container? 
>
>
>
> Thanks. 
>
>
> -- 
> Sébastien Douche > 
> Twitter: @sdouche 
> http://douche.name 
>

-- 
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/6ab7ad20-7468-4695-8191-6560fda11d50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Kubernetes plugin ( want to run slave as pod )

2017-12-28 Thread Vamsi krishna
Hello Team,

I am using kubernetes plugin 1.1 
My cluster is running in local Host.. Jenkins is running in outside 
cluster..
I want to run my Jenkins build jobs with slave pod in containers..after 
build job is done my slave pod has to kill automatically..
Pod is killing automatically when build job is done..but issue is 
My job is running on jenkins/jnlp-slave image not in my base image.for that 
I mentioned jnlp as my container name then job is not able to run showing 
pending slave-td45h is offline.

How to connect my container to  talk to the Jenkins. I am trying for the 
freestyle jobs.

I created image with making baseimage of  in my dockerfike i mentioned FROM 
Jenkins/jnlp-slave is it right to use like this..
If u want I will show my total dockerfile..

>From jenkins/jnlp-slave
USER root

ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.9.0
ENV COMPOSE_VERSION 1.12.0

# NodeJS (from 
https://github.com/nodejs/docker-node/blob/12ba2e5432cd50037b6c0cf53464b5063b028227/8.1/Dockerfile)
# gpg keys listed at https://github.com/nodejs/node#release-team
RUN set -ex \
  && for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
56730D5401028683275BD23C23EFEFE93C4CFFFE \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
  ; do \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
  done


RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
  && case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
*) echo "unsupported architecture"; exit 1 ;; \
  esac \
  && curl -SLO 
"https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz"; 
\
  && curl -SLO --compressed 
"https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc"; \
  && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
  && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | 
sha256sum -c - \
  && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local 
--strip-components=1 \
  && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc 
SHASUMS256.txt \
  && ln -s /usr/local/bin/node /usr/local/bin/nodejs

RUN apt-get update && apt-get install -y git jq rsync g++ build-essential 
&& apt-get clean

ADD jenkins-slave /usr/local/bin

USER jenkins 

using this image my container is not running properly getting logs as failed 
to open log file 
"/var/log/pods/70d9def9-ebf7-11e7-867e-005056bf5570/jnlp_0.log": open 
/var/log/pods/70d9def9-ebf7-11e7-867e-005056bf5570/jnlp_0.log: no such file 
or directory
these are the logs  i am getting any idea... if this container runs 
succesfully then i can run my jenkins job in this container. because i did 
base image as jenkins/jnlp-slave.   Can anyone please help me.. I have this 
issue since week. 

-- 
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/c1d734a7-d4f7-444b-8689-81ab3929384b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get folder name of job if know only CHANGE_TARGET?

2017-12-28 Thread Viacheslav Dubrovskyi

Found the answer:

import jenkins.branch.NameMangler
NameMangler.apply('maintenance/2.4')

Result: maintenance-2-4.c4g2o8



28.12.2017 15:59, Viacheslav Dubrovskyi пишет:

Hi.

I use multibranch pipeline job. In pipeline for PR I see 
env.CHANGE_TARGET variable. For example: CHANGE_TARGET=maintenance/2.4


But in folder branches of job, it transformed in maintenance-2-4.c4g2o8

Ho can I get name of folder if know only env.CHANGE_TARGET? What 
function used for encode maintenance/2.4 -> maintenance-2-4.c4g2o8 ?


I need it because PR use some artifacts from CHANGE_TARGET branch.

Thank you.



--
WBD,
Viacheslav Dubrovskyi


--
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/41ebe258-509f-0c77-d133-44fec9716366%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: Криптографическая подпись S/MIME


Re: HowTo set pipeline step description

2017-12-28 Thread Viacheslav Dubrovskyi

Hi

Is it possible to disable this feature?


04.12.2017 21:09, Victor Martinez пишет:
As far as I know you don't need to do anything since the pipeline does 
it automatically:


For instance, the below pipeline will be shown as the attached screenshot

|
node('docker') {
    sh 'docker --version'
    sh 'docker info'
}

|










Is that what you meant?

Cheers
--
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/f2bd4fda-c68e-4ebc-8ba6-cfed991f7b88%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
WBD,
Viacheslav Dubrovskyi

--
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/b3bcfa3b-60bb-9b5a-1cdd-aeae586c37fe%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: Криптографическая подпись S/MIME


Groovy code in Pipeline and CPS trouble

2017-12-28 Thread Ramanathan Muthaiah
Hello All,

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

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

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

#!/usr/bin/env groovy

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

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

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


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


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

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


/Ram

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


How to get folder name of job if know only CHANGE_TARGET?

2017-12-28 Thread Viacheslav Dubrovskyi

Hi.

I use multibranch pipeline job. In pipeline for PR I see 
env.CHANGE_TARGET variable. For example: CHANGE_TARGET=maintenance/2.4


But in folder branches of job, it transformed in maintenance-2-4.c4g2o8

Ho can I get name of folder if know only env.CHANGE_TARGET? What 
function used for encode maintenance/2.4 -> maintenance-2-4.c4g2o8 ?


I need it because PR use some artifacts from CHANGE_TARGET branch.

Thank you.

--
WBD,
Viacheslav Dubrovskyi


--
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/ebfe6b1e-1ac0-034a-0a58-07afe4d7f754%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: Криптографическая подпись S/MIME


Re: Jenkins on AIX

2017-12-28 Thread Mark Waite
You'll be much better served by installing the Jenkins server on a Linux
computer or a Windows computer, then configure a Jenkins agent to run on
the AIX machine.

That will allow you to run jobs that are specific to AIX, without having to
be on the "bleeding edge" of discovering all the interesting ways that the
IBM JRE is enough different than the Oracle JRE that it affects Jenkins
behavior.

Mark Waite

On Thu, Dec 28, 2017 at 6:07 AM Fancy Yendrembam  wrote:

> I am looking for a download package for AIX,  can someone help me with the
> information.
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/99a33c86-d243-4d45-b135-20151d304537%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/CAO49JtHHLtLB3AjKRa1oiCsjg1q54wfFQZvbbkGEsEw0q4NBaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Prevent using machine when Jenkins is running job

2017-12-28 Thread Mark Waite
Would it reduce the risk of use if you locked the screen of the computer
while it is being used with a Jenkins job?  I believe there are programs
and scripts which will allow you to lock the screen and unlock it.

Mark Waite

On Thu, Dec 28, 2017 at 6:08 AM Long Tran  wrote:

> Hi all,
>
> I have a Jenkins slave that will run some jobs, this machine must not be
> used manually by people when it's running Jenkins job ( because it may
> affect some metrics of the build )
>
> Is there any solution that I can achieve this requirement ?
>
> My current solution: I created a job that show a message box/dialog on
> desktop, this job is triggered when my main jobs run and aborted the it
> (the message box/dialog will disappear/close) after main jobs finish.
>
> But that's not good solution, other people can just close it and use the
> machine as usual.
>
> Sorry about my problem can be too common than a Jenkins issue, but if a
> solution is managed from Jenkins that'd be great.
>
> Many thanks for you guys
>
> --
> 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/a97a295b-7140-42e3-85dd-259342ca50dc%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/CAO49JtH4nqnQzdWoab_VJDTCeoJscngzRvjeRHMRqkF4J%2BRbQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Exclude files and/or path in the build

2017-12-28 Thread Long Tran
You can edit the description of the build.

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


Prevent using machine when Jenkins is running job

2017-12-28 Thread Long Tran
Hi all,

I have a Jenkins slave that will run some jobs, this machine must not be 
used manually by people when it's running Jenkins job ( because it may 
affect some metrics of the build )

Is there any solution that I can achieve this requirement ? 

My current solution: I created a job that show a message box/dialog on 
desktop, this job is triggered when my main jobs run and aborted the it 
(the message box/dialog will disappear/close) after main jobs finish.

But that's not good solution, other people can just close it and use the 
machine as usual.

Sorry about my problem can be too common than a Jenkins issue, but if a 
solution is managed from Jenkins that'd be great.

Many thanks for you guys

-- 
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/a97a295b-7140-42e3-85dd-259342ca50dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins on AIX

2017-12-28 Thread Fancy Yendrembam
I am looking for a download package for AIX,  can someone help me with the 
information. 
Thanks.

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


Re: How do I purge/clobber stashed files?

2017-12-28 Thread red 888
The problem was I wasn't cleaning up the workspaces of the streams. I 
thought their workspaces were destroyed automatically but they persist.

On Wednesday, December 27, 2017 at 1:04:30 PM UTC-5, Mark Waite wrote:
>
> That seems like a bug to me if I've understood your phrasing correctly.
>
> I don't expect the stash from one build (for example, build number 14) to 
> be included in later builds (for example, build number 15).
>
> Within a single build (for example, build number 14), I would initially 
> assume (until proven otherwise) that multiple references to write to a 
> stash of the same name would append to a single stash.
>
> Mark Waite
>
> On Wed, Dec 27, 2017 at 10:44 AM red 888  > wrote:
>
>> Jenkins docs 
>> 
>>  seem 
>> ambiguous about this:
>>
>> Stashed files are not otherwise available and are generally discarded at 
>> the end of the build.
>>
>> S "generally" means what? They *should* get discarded by default? Do 
>> I need to do something to have them discarded?
>>
>>
>> Because my stashed files aren't getting discarded. I run this in my job:
>>
>> stash name: "myZip", includes: "${differentEveryTime}.zip"
>>
>>
>> And every time the job runs it keeps adding the new zip file to the 
>> "myZip" stash.
>>
>> I couldn't find anything in the docs about how to control this. I want 
>> myZip to clobber everything previously or start empty each job run.
>>
>> -- 
>> 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/b879399c-2179-485c-bfdc-793769b70227%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/e2ad559b-9718-4ae4-955c-47256873f9c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.