Clean up Jenkins Setup using legacy Workspace Root Directory

2019-05-03 Thread Sarfroz Basha
Hi All,

Can anyone advise me the steps what to do about this Jenkins build 
node console message please?

Apr 15 08:00:06 q4de3gsy751 jenkins[26061]: WARNING: JENKINS-34564 path 
sanitization ineffective when using legacy Workspace Root Directory 
_${ITEM_ROOTDIR}/workspace_; switch to 
${JENKINS_HOME}/workspace/${ITEM_FULLNAME} as in JENKINS-8446 / 
JENKINS-21942
/var/log/jenkins/jenkins.log-20190416.gz:Apr 15 08:00:08 q4de3gsy751 
jenkins[26061]: WARNING: JENKINS-34564 path sanitization ineffective when 
using legacy Workspace Root Directory _${ITEM_ROOTDIR}/workspace_; switch 
to ${JENKINS_HOME}/workspace/${ITEM_FULLNAME} as in JENKINS-8446 / 
JENKINS-21942
/var/log/jenkins/jenkins.log-20190416.gz:Apr 15 08:00:09 q4de3gsy751 
jenkins[26061]: WARNING: JENKINS-34564 path sanitization ineffective when 
using legacy Workspace Root Directory _${ITEM_ROOTDIR}/workspace_; switch 
to ${JENKINS_HOME}/workspace/${ITEM_FULLNAME} as in JENKINS-8446 / 
JENKINS-21942


Thanks in advance.


Regards,
Sarfroz

-- 
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/173d657b-403d-4e54-a95c-d4594197486a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Workspace clean-up killed jobs

2019-05-02 Thread Sarfroz Basha
Hi,

I am also facing same error. Have you found anything regarding this error. 
Please share the solution.

Regards,
Sarfroz

On Monday, November 27, 2017 at 2:16:04 PM UTC+5:30, David Aldrich wrote:

> Hi
>
>  
>
> Two of our declarative script jobs have failed for similar reasons.  The 
> jobs normally run with no problem.  We are running Jenkins 2.91.
>
>  
>
> The jobs take several hours to complete.  Each one failed part way through 
> and gave the following message in its console log:
>
>  
>
> ERROR: missing workspace /data/hudsonuser/workspace/_trunk on 
> 
>
>  
>
> The Jenkins system log shows this message that is coincident with the 
> failure:
>
>  
>
> Nov 26, 2017 9:04:34 PM INFO hudson.model.AsyncPeriodicWork$1 run
>
> Started Workspace clean-up
>
> Nov 26, 2017 9:04:50 PM WARNING jenkins.branch.WorkspaceLocatorImpl locate
>
> JENKINS-34564 path sanitization ineffective when using legacy Workspace Root 
> Directory ‘${ITEM_ROOTDIR}/workspace’; switch to 
> ${JENKINS_HOME}/workspace/${ITEM_FULLNAME} as in JENKINS-8446 / JENKINS-21942
>
>  
>
> What is going on here and how should I fix it?
>
>  
>
> Best regards
>
>  
>
> David
>
>  
>

-- 
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/5f79a2af-b066-49c5-8e24-39a2eb500a35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline Not Honoring Git Timeout During Branch Indexing

2019-05-02 Thread Sarfroz Basha
Hi,

I am also facing same error. Have you found anything related to above 
error. Can you please revert this with solution.

Regards,
Sarfroz


On Friday, October 14, 2016 at 7:07:12 PM UTC+5:30, David Johnson wrote:

> Hey all,
>
> I am trying to set up a multibranch pipeline job against a fairly large 
> repo. I have set both the fetch and checkout timeouts to 180 minutes under 
> the Advanced Clone Behaviors and Advanced Checkout Behaviors, to no avail. 
> Whenever the branch indexing job begins it reports that my timeouts are set 
> to 10 minutes and sure enough, after 10 minutes the job fails as follows.
>
> I am curious if there is some other configuration that I need to do in 
> order to get this to work properly? Whenever I try this on a smaller repo 
> with fewer branches I am able to see the branch indexing go through 
> successfully.
>
>  > git rev-parse --is-inside-work-tree # timeout=10
> Setting origin to 
>  > git config remote.origin.url  # timeout=10
> Fetching & pruning origin...
> Fetching upstream changes from origin
>  > git --version # timeout=10
> using GIT_SSH to set credentials 
>  > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* 
> --prune
> ERROR: Timeout after 10 minutes
> FATAL: Failed to recompute children of Multibranch_Pipeline
> hudson.plugins.git.GitException: Command "git fetch --tags --progress origin 
> +refs/heads/*:refs/remotes/origin/* --prune" returned status code 143:
>
> fatal: The remote end hung up unexpectedly
> fatal: early EOF
>
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495)
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
> at 
> jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:233)
> at jenkins.scm.api.SCMSource.fetch(SCMSource.java:148)
> at 
> jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
> at 
> com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157)
> at 
> com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
> at hudson.model.ResourceController.execute(ResourceController.java:98)
> at hudson.model.Executor.run(Executor.java:404)
> 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/37f73e70-1619-470e-aac8-7beca92469ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkinslibrary stepEnvironmentVariables aren't encoded properly

2019-04-12 Thread Sarfroz Basha
Hi All,

I need some help from you guys.

e.g. value "daivb/r/DAIVB2/config-server\ndaivb/r/DAIVB2/registry-server"
causes build or more specific script-execution to fail with:


Error: java.io.IOException: Failed to run image '
.com:10004/buildcontainers/linux-18.04-base'. Error: docker: invalid 
reference format: repository name must be lowercase.

I have given wrong environmentID but still build is success. I want to give 
wrong environment ID and build needs to fail like above Error message. So 
if I set the variable in replay button like this:-

#!/usr/bin/env groovy
@Library('jenkinslib@jira-SBS-8863')_

Build(
 
pipeline: this,
releaseBranchPattern: 'test/jira-SBS-8863',
abortOnFailedTests: true,
checkoutPostStep: [scriptName : './testScript1'],
buildPreStep: [scriptName : './testScript2'],
 stepEnvironmentVariables: [
 'ENVIRONMENT_ID' : '23\\ / : ; 45d3',
 'ENVIRONMENT_ID2' : 'JUST A Test',
 'BUILD _NUMBER' : env.BUILD_ID], 
 buildPeriodically: '30 08 * * 1-6'
); 


If value string is encoded as base64 everything works fine. If without 
encode the value is failing the job with below error. so I don't want to 
encode the value.


-- 
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/be3e1182-f7d8-49bd-a363-71eb362bc6b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Send mail to mailbox when there's an infrastructure fail

2019-04-10 Thread Sarfroz Basha
Hi Aaron,

Thanks for your reply. Its very helpful to me.

Can you please explain steps to create freestyle job triggered by cron in 
Jenkins. Whenever checks into the Gitserver, if Gitserver was down 
automatically email notification need to come. 


Regards,
Sarfroz Basha


On Wednesday, April 10, 2019 at 5:06:03 PM UTC+5:30, Aaron Digulla wrote:

> Hi Sarfroz,
>
> To make sure I understand you correctly:
>
> - Your Git server was down
> - Jenkins did start a job
> - The job tried to check out the code from Git
> - That step failed
> - You didn't receive a mail for this specific failure (usually, it works)
> - You're using Scripted Pipeline, not Declarative Pipeline
>
> Correct?
>
> The problem here is that the mail recipients come from the Jenkinsfile. 
> When Git isn't running, Jenkins can't get the Jenkinsfile and therefore has 
> no chance to figure out where to send mails.
>
> Try to set up monitoring of the Git server outside of Jenkins.
>
> Alternatively, use a freestyle Job triggered by cron which periodically 
> checks that it can connect to the Git server (just execute a git ls or 
> something again a small repo). You can then send a mail from this job when 
> it fails.
>
> Regards,
>
> Aaron Digulla
>

-- 
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/a67da821-a13b-4bb5-873c-340126bc28c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Send mail to mailbox when there's an infrastructure fail

2019-04-09 Thread Sarfroz Basha
Hi All,

This is Sarfroz, Working in T-systems, I need small help.

Whenever GIT server was down at that time build was trigger in Jenkins if 
build fails email notification need to come like Git exception during 
checkout like that. Need to mention in Groovy script pipeline.

Example:-
- GitException (during checkout)
- Network exceptions (403 unauthorized, connection refused, connection 
timeout)



Regards,
Sarfroz

-- 
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/f9c46245-6d54-4729-ac71-3efffe2d2a33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Security - Pipeline parameterized credentials can be reused by other users

2019-03-14 Thread Sarfroz Basha


On Thursday, March 14, 2019 at 10:10:50 PM UTC+5:30, Stuart Rowe wrote:
>
> Could you remove build permissions on that job for the users that don't 
> know the credentials? They wouldn't be able to run the job anyways. That 
> should also remove their ability to replay the job as far as I understand.



Hi,


 

> Thanks for your reply.

 

> Can you elaborate clearly by steps.

 

-- 
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/ee6b03fc-96f3-4adf-966a-d67e40dca928%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Security - Pipeline parameterized credentials can be reused by other users

2019-03-14 Thread Sarfroz Basha
Hi All,

This is Sarfroz Basha.. I'm Working on T-Systems ICT INDIA PVT LTD company. 
I have one risky task, Can you please help me on this.



I want to remove the ability for users of Jenkins Pipeline to be able to 
modify the Jenkinsfile or other loaded pipeline scripts using the Replay 
option.

It seems that when a build with parameterized credentials is replayed, the 
credentials are reused. This may allow a user who doesn't know the password 
to run builds he shouldn't be able to, or impersonate other users.

Example:

Parameterized release -> The deployment credentials are parameters and so 
they aren't visible, but they are reused when the build is replayed.



*Has anyone else experienced this or similar issues? Any assistance would 
be greatly appreciated!*




*Regards,*

*Sarfroz Basha*

-- 
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/c4d84b73-90a1-476c-b0c2-74a181f12015%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Send mail to sbs mailbox when there's an infrastructure fail

2019-03-14 Thread Sarfroz Basha




On Monday, March 4, 2019 at 4:04:24 PM UTC+5:30, Sarfroz Basha wrote:

Can anybody please give some suggestions on this.

>
>- GitException (during checkout)
>- Network exceptions (403 unauthorized, connection refused, connection 
>timeout)
>
> Tried GitException and it is tricky; GitException's are transformed into 
> AbortException without a trace. Only maybe a mention in the stack trace.
>

-- 
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/cfaaefad-d690-4682-8e70-2df8744f27c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Send mail to sbs mailbox when there's an infrastructure fail

2019-03-04 Thread Sarfroz Basha

   
   - GitException (during checkout)
   - Network exceptions (403 unauthorized, connection refused, connection 
   timeout)

Tried GitException and it is tricky; GitException's are transformed into 
AbortException without a trace. Only maybe a mention in the stack trace.

-- 
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/c68a0bec-dc9c-4185-9b1e-c0e7b7532733%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.