[JIRA] (JENKINS-58946) Use p4 changes @date instead of @change when finding CL to sync

2 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Aug 15, 2019, 5:09:02 AM8/15/19
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
 
Jenkins / Improvement JENKINS-58946
Use p4 changes @date instead of @change when finding CL to sync
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2019-08-15 09:08
Environment: 1.10.3
Labels: P4_VERIFY
Priority: Minor Minor
Reporter: Karl Wirth

Background

This is a side effect of the way P4-Plugin now correctly only builds code that existed when the job was triggered.

Imagine the following stream:

 

Steam: //helix/dev
Paths:   share ...   
   import+ imports/bin/... //builds-server/main/bin/... # A REMOTE DEPOT PATH
   import+ doc/html/... //doc/main/html/... # A LOCAL DEPOT PATH

P4-Jenkins  runs 'p4 changes' to determine the correct changelist to build and then 'p4 sync' to get the code at that changelist.

In the above scenario 'p4 changes -m1 ws'  will only return the highest changelist for the local depot paths '//helix/dev/...' and '//doc/main/html/...'.

Problem

This is fine unless the '//builds-server/main/bin/...' has been updated after the other two paths. In that case we will not sync any newer changes from the remote depot until a local depot change occurs even if you click 'Build Now'. This is because we are running that 'p4 changes' first to figure out what to build.

Solution

A possible solution would be to run 'p4 changes -m1 //...' against the whole server and then get the date for the highest changelist. Then sync workspace to the server date and time when the job was triggered e.g.

p4 sync //ws/...@2019/08/15:02:07:21 

NOTE: I understand this an edge case but it has impacted DS. Talk to me if you need more info.

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages