[JIRA] (JENKINS-57314) P4 Sync to label after sync to head without deleting non labeled files

2019-08-01 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas edited a comment on  JENKINS-57314  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 Sync to label after sync to head without deleting non labeled files   
 

  
 
 
 
 

 
 Hi,After some digging with  the p4 team support  [~joel_brown] and [~p4karl]   we ([~citylife4] and I) managed to isolate and reproduce the credential issue.Another bug has been created to track this [JENKINS-58745|https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.jenkins-2Dci.org_browse_JENKINS-2D58745=DwMFaQ=DPL6_X_6JkXFx7AXWqB0tg=VUE8IMWRw4czmli0hTPLrZPuDrGc8PQ2GmqEhHAtl3k=3KXou6GA2FrtnXhOqcjv2RQY5XfhgYTeevCKlb1aCb4=qnyLzr7KApU4zNDux6KUqghfuExaVVznYg9XlHHcYVQ=][~chriscarr] you may want to follow up in case the issue matches your setup as well.Thanks,Frederico  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199083.1556813511000.4875.1564643580311%40Atlassian.JIRA.


[JIRA] (JENKINS-57314) P4 Sync to label after sync to head without deleting non labeled files

2019-08-01 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas commented on  JENKINS-57314  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 Sync to label after sync to head without deleting non labeled files   
 

  
 
 
 
 

 
 Hi, After some digging with the p4 team support we (Jose Valverde and I) managed to isolate and reproduce the credential issue. Another bug has been created to track this JENKINS-58745 Chris Carr you may want to follow up in case the issue matches your setup as well. Thanks, Frederico  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199083.1556813511000.4866.1564642380156%40Atlassian.JIRA.


[JIRA] (JENKINS-57314) P4 Sync to label after sync to head without deleting non labeled files

2019-05-07 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas commented on  JENKINS-57314  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 Sync to label after sync to head without deleting non labeled files   
 

  
 
 
 
 

 
 Hi Karl Wirth, I've also tried this kind of construction. In my case I have created a shared library (my_groovy_lib). Inside the vars/ folder I've placed a call p4SyncLabel.groovy (see in attachmentp4SyncLabel.groovy Then inside the main pipe I call: 

 

#!/usr/bin/env groovy  
@Library('my_groovy_lib') _
// Pipeline steering
pipeline {
 agent {
label 'my_slave_0'
 }
 options {
timestamps()
 }
 stages {
stage('Test') {
   steps{
  echo 'Test'
  script{
 p4SyncLabel('my_p4_ticket_id', "jenkins_${NODE_NAME}_${JOB_BASE_NAME}_${EXECUTOR_NUMBER}",
  "//depot/... //jenkins_${NODE_NAME}_${JOB_BASE_NAME}_${EXECUTOR_NUMBER}/...",
 'head', true, false )
  }
}
  }
   }
}
 

     I'm getting the following output:   

 

Started by user Frederico Pratas
Running in Durability level: MAX_SURVIVABILITY
Loading library my_groovy_lib@master
... p4 client -o jenkins_shared_lib_master_example +
... p4 info +
... p4 info +
... p4 client -o jenkins_shared_lib_master_example +
... No change in client detected.
... p4 counter change +
... p4 changes -m1 -ssubmitted //jenkins_shared_lib_master___ +
Building on Node: master
... p4 client -o jenkins_shared_lib_master_example +
... p4 info +
... p4 info +
... p4 client -o jenkins_shared_lib_master_example +
... No change in client detected.
P4 Task: establishing connection.
... server: X:1666
... node: X
P4 Task: reverting all pending and shelved revisions.
... p4 revert /var/lib/jenkins/workspace/example%40libs/sn___ +
... rm [abandoned files]
duration: (845ms)
P4 Task: cleaning workspace to match have list.
... p4 reconcile -w -f /var/lib/jenkins/workspace/example%___ +
duration: 0m 1s
P4 Task: syncing files at change: X
... p4 sync -q /var/lib/jenkins/workspace/example%40libs/s___ +
duration: 0m 4s
P4 Task: saving built changes.
Found last change X on syncID jenkins_shared_lib_NODE_NAME_example
... p4 client -o jenkins_shared_lib_master_example +
... p4 info +
... p4 info +
... p4 client -o jenkins_shared_lib_master_example +
... No change in client detected.
... p4 changes -m20 //jenkins_shared_lib_master_example/..___ +
... p4 changes -l -m1 @X +
... p4 user -o pratas +
... p4 describe -s -m51 X +
... p4 fixes -cX +
... done
[Pipeline] Start of Pipeline
[Pipeline] node
Running on my_slave_0 in /users/jenkins/workspace/example
[Pipeline] {
[Pipeline] timestamps
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] echo
09:45:20 Test
[Pipeline] script
[Pipeline] {
[Pipeline] p4
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: P4: Task Exception: Invalid credentials
Finished: FAILURE
 

     I'm using the same credential that is used to load the library from p4, which as you can see works fine. Any ideas what is 

[JIRA] (JENKINS-57314) P4 Sync to label after sync to head without deleting non labeled files

2019-05-07 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-57314  
 
 
  P4 Sync to label after sync to head without deleting non labeled files   
 

  
 
 
 
 

 
Change By: 
 Frederico Pratas  
 
 
Attachment: 
 p4SyncLabel.groovy  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199083.1556813511000.20415.1557256200163%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55248) workspace mixup when 2 jobs running on 2 diff nodes at the same time

2019-01-28 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas commented on  JENKINS-55248  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: workspace mixup when 2 jobs running on 2 diff nodes at the same time   
 

  
 
 
 
 

 
 Hi Karl Wirth, Thanks for your quick feedback. Unfortunately still no luck    I should clarify that: 
 
I'm only using the master node (single node) 
a given job always uses the same folder/location (unless Jenkins is moving folders around in the background), 
each p4 workspace is unique to a job (i.e, jobA always does taskA which uses workspace A, jobB always does taskB which uses workspace B), the differences are just incremental syncs with p4 (i.e., update workspace with new changelists) 
I only allow one instance of each job to run at a given time to avoid clashes 
a job can run in any executor 
 I'v modified my script as so: 

 

{{
   def p4_ws_name
   def workspace_view

   pipeline {
  agent any
  options { timestamps() }
  stages {
 stage('Checkout') {
steps {
   script {
  // need to initialize the global variable here because some env vars are only available inside the agent
  p4_ws_name = 'jenkins_${JOB_NAME}_${NODE_NAME}_${EXECUTOR_NUMBER}'
  workspace_view """\
 //my_depot/... //${p4_ws_name}/...
 """.stripIndent()
   }
   checkout perforce( 
  credential: '',
  populate: autoClean(
 delete: true,
 modtime: false,
 parallel: [
enable: false,
minbytes: '1024',
minfiles: '1',
threads: '4'],
 pin: '',
 quiet: true,
 replace: true,
 tidy: false
  ),
  workspace: manualSpec(
 charset: 'none',
 cleanup: false,
 name: p4_ws_name,
 pinHost: false,
 spec: clientSpec(
allwrite: false,
backup: true,
changeView: '',
clobber: true,
compress: false,
line: 'LOCAL',
locked: false,
modtime: false,
rmdir: false,
serverID: '',
streamName: '',
type: 'WRITABLE',
view: workspace_view
 )
  )
   )
}
 }
 stage('Something after') {
steps {
   echo "something something"
}
 }
  }
   }
}}
 

  
 

 

[JIRA] (JENKINS-55248) workspace mixup when 2 jobs running on 2 diff nodes at the same time

2019-01-28 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas commented on  JENKINS-55248  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: workspace mixup when 2 jobs running on 2 diff nodes at the same time   
 

  
 
 
 
 

 
 Hi Karl Wirth, In my case the ws name is defined by "def p4_ws_name = 'jenkins_${env.JOB_NAME}'" The name is only based on the job name because each job always uses the same space with only incremental updates. Also, I dont allow different iterations of the same job to run concurrently, only different jobs may run at the same time. It sounds weird to me to have a different workspace names for each time a given job is running, which will also create a load of redundant workspaces in p4 (it would create #jobs*#executors*#nodes workspaces when I only require #jobs). I will anyway give it a try for the sake of investigation. Further information: I've actually tried to run all jobs just in the master node (single node) with multiple executors and I see the same issue.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55248) workspace mixup when 2 jobs running on 2 diff nodes at the same time

2019-01-25 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas edited a comment on  JENKINS-55248  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: workspace mixup when 2 jobs running on 2 diff nodes at the same time   
 

  
 
 
 
 

 
 Hi,Any update on this one?I get a similar issue on my setup.I've several independent pipeline jobs.Each job, when triggered, does a p4 checkout.When multible jobs are triggered at the same time the P4CLIENT seems to be inconsistent between jobs and some of the jobs fail because they are using the client from a different job. It seems that the P4CLIENT variable is being shared between different checkout processes.The jobs that get the wrong P4CLIENT fail with the error reported previously:ERROR: P4: Task Exception: hudson.AbortException: P4JAVA: Error(s):Path '/correct/path/for/this/job/...' is not under client's root '/path/from/parallel/job'.Each job is using the checkout in the following manner:{{def p4_ws_name = 'jenkins_${env.JOB_NAME}'def workspace_view = """\ //my_depot/... //${p4_ws_name}/... """.stripIndent()pipeline {   agent any   options {  timestamps()   }   stages {  stage('Checkout') { steps {checkout perforce(   credential: '',   populate: autoClean(  delete: true,  modtime: false,  parallel: [ enable: false, minbytes: '1024', minfiles: '1', threads: '4'],  pin: '', quiet: true,  replace: true,  tidy: false),   workspace: manualSpec(  charset: 'none',  cleanup: false,  name: p4_ws_name,  pinHost: false,  spec: clientSpec( allwrite: false, backup: true, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE', view: workspace_view  )   )) }  }  stage('Something after') { steps {echo "something something" }  }    Some help would be appreciated.Thanks,Frederico  PS: I've tried with manually triggered builds, timer triggered, and SCM, all produce the same issue if triggered at the same time.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  

[JIRA] (JENKINS-55248) workspace mixup when 2 jobs running on 2 diff nodes at the same time

2019-01-25 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas edited a comment on  JENKINS-55248  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: workspace mixup when 2 jobs running on 2 diff nodes at the same time   
 

  
 
 
 
 

 
 Hi,Any update on this one?I get a similar issue on my setup.I've several independent pipeline jobs.Each job, when triggered, does a p4 checkout.When multible jobs are triggered at the same  time  the  the  P4CLIENT seems to be inconsistent between jobs and some of the jobs fail because they are using the client from a different job. It seems that the P4CLIENT variable is being shared between different checkout processes.The jobs that get the wrong P4CLIENT fail with the error reported previously:ERROR: P4: Task Exception: hudson.AbortException: P4JAVA: Error(s):Path '/correct/path/for/this/job/...' is not under client's root '/path/from/parallel/job'.Each job is using the checkout in the following manner:{{def p4_ws_name = 'jenkins_${env.JOB_NAME}'def workspace_view = """\ //my_depot/... //${p4_ws_name}/... """.stripIndent()pipeline {   agent any   options {  timestamps()   }   stages {  stage('Checkout') { steps {checkout perforce(   credential: '',   populate: autoClean(  delete: true,  modtime: false,  parallel: [ enable: false, minbytes: '1024', minfiles: '1', threads: '4'],  pin: '', quiet: true,  replace: true,  tidy: false),   workspace: manualSpec(  charset: 'none',  cleanup: false,  name: p4_ws_name,  pinHost: false,  spec: clientSpec( allwrite: false, backup: true, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE', view: workspace_view  )   )) }  }  stage('Something after') { steps {echo "something something" }  }    Some help would be appreciated.Thanks,Frederico   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 

[JIRA] (JENKINS-55248) workspace mixup when 2 jobs running on 2 diff nodes at the same time

2019-01-25 Thread fcp.pra...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederico Pratas commented on  JENKINS-55248  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: workspace mixup when 2 jobs running on 2 diff nodes at the same time   
 

  
 
 
 
 

 
 Hi, Any update on this one? I get a similar issue on my setup. I've several independent pipeline jobs. Each job, when triggered, does a p4 checkout. When multible jobs are triggered at the same the the P4CLIENT seems to be inconsistent between jobs and some of the jobs fail because they are using the client from a different job. It seems that the P4CLIENT variable is being shared between different checkout processes. The jobs that get the wrong P4CLIENT fail with the error reported previously: ERROR: P4: Task Exception: hudson.AbortException: P4JAVA: Error(s): Path '/correct/path/for/this/job/...' is not under client's root '/path/from/parallel/job'. Each job is using the checkout in the following manner: {{def p4_ws_name = 'jenkins_${env.JOB_NAME}' def workspace_view = """\ //my_depot/... //${p4_ws_name}/... """.stripIndent() pipeline { agent any options  { timestamps() }  stages { stage('Checkout') { steps  { checkout perforce( credential: '', populate: autoClean( delete: true, modtime: false, parallel: [ enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), workspace: manualSpec( charset: 'none', cleanup: false, name: p4_ws_name, pinHost: false, spec: clientSpec( allwrite: false, backup: true, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE', view: workspace_view ) ) ) }  } stage('Something after') { steps  { echo "something something" }  } } }}}   Some help would be appreciated. Thanks, Frederico    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to