| Line 68... |
Line 68... |
| 68 |
|
68 |
|
| 69 |
while(!exit)
|
69 |
while(!exit)
|
| 70 |
{
|
70 |
{
|
| 71 |
try
|
71 |
try
|
| 72 |
{
|
72 |
{
|
| 73 |
mLogger.error("run calling sleepCheck");
|
73 |
mLogger.warn("run calling sleepCheck");
|
| 74 |
mPhase.setPhase("sleepCheck");
|
74 |
mPhase.setPhase("sleepCheck");
|
| 75 |
sleepCheck();
|
75 |
sleepCheck();
|
| 76 |
|
76 |
|
| 77 |
mLogger.error("run calling rippleEngine.collectMetaData");
|
77 |
mLogger.warn("run calling rippleEngine.collectMetaData");
|
| 78 |
mPhase.setPhase("collectMetaData", 600);
|
78 |
mPhase.setPhase("collectMetaData", 600);
|
| 79 |
mRippleEngine.collectMetaData();
|
79 |
mRippleEngine.collectMetaData();
|
| 80 |
|
80 |
|
| 81 |
if ( Thread.currentThread().isInterrupted() )
|
81 |
if ( Thread.currentThread().isInterrupted() )
|
| 82 |
{
|
82 |
{
|
| Line 101... |
Line 101... |
| 101 |
//---------------------------------------------------------------
|
101 |
//---------------------------------------------------------------
|
| 102 |
// Wait for all Slaves to enter waiting or paused state
|
102 |
// Wait for all Slaves to enter waiting or paused state
|
| 103 |
// They may be building
|
103 |
// They may be building
|
| 104 |
// They may be starting up
|
104 |
// They may be starting up
|
| 105 |
//
|
105 |
//
|
| 106 |
mLogger.error("run changing run level to WAITING (New) for rcon_id " + mRconId);
|
106 |
mLogger.warn("run changing run level to WAITING (New) for rcon_id {}", mRconId);
|
| 107 |
mPhase.setPhase("Wait for Slave Threads");
|
107 |
mPhase.setPhase("Wait for Slave Threads");
|
| 108 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_WAITING);
|
108 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_WAITING);
|
| 109 |
|
109 |
|
| 110 |
while (true)
|
110 |
while (true)
|
| 111 |
{
|
111 |
{
|
| Line 189... |
Line 189... |
| 189 |
// Publish Package Build Results
|
189 |
// Publish Package Build Results
|
| 190 |
// Indicate to RM that we are publishing
|
190 |
// Indicate to RM that we are publishing
|
| 191 |
// Ensure that all build machines have placed a marker in dpkg_archive
|
191 |
// Ensure that all build machines have placed a marker in dpkg_archive
|
| 192 |
// Save updated build files into VCS
|
192 |
// Save updated build files into VCS
|
| 193 |
//
|
193 |
//
|
| 194 |
mLogger.error("run changing run level to PUBLISHING for rcon_id " + mRconId);
|
194 |
mLogger.warn("run changing run level to PUBLISHING for rcon_id {}", mRconId);
|
| 195 |
mPhase.setPhase("Publishing");
|
195 |
mPhase.setPhase("Publishing");
|
| 196 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_PUBLISHING);
|
196 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_PUBLISHING);
|
| 197 |
|
197 |
|
| 198 |
mLogger.info("run calling deliverChange on AbtPublish");
|
198 |
mLogger.info("run calling deliverChange on AbtPublish");
|
| 199 |
deliverChange("AbtPublish", true, false);
|
199 |
deliverChange("AbtPublish", true, false);
|
| Line 264... |
Line 264... |
| 264 |
// Only record for successful tests. Don't want to record short build times on failure
|
264 |
// Only record for successful tests. Don't want to record short build times on failure
|
| 265 |
// in particular if the package has been released. Would be OK for a WIP, but how to identify these
|
265 |
// in particular if the package has been released. Would be OK for a WIP, but how to identify these
|
| 266 |
if ( mReporting.isFullyPublished)
|
266 |
if ( mReporting.isFullyPublished)
|
| 267 |
{
|
267 |
{
|
| 268 |
int buildDuration = mBuildDuration.toIntSecs();
|
268 |
int buildDuration = mBuildDuration.toIntSecs();
|
| 269 |
mLogger.error("Build Duration:" + buildDuration);
|
269 |
mLogger.warn("Build Duration:{}", buildDuration);
|
| 270 |
mReleaseManager.updateBuildDuration(mReporting.packageVersionId, buildDuration);
|
270 |
mReleaseManager.updateBuildDuration(mReporting.packageVersionId, buildDuration);
|
| 271 |
}
|
271 |
}
|
| 272 |
|
272 |
|
| 273 |
mPhase.setPhase("Update Build Instance for Test");
|
273 |
mPhase.setPhase("Update Build Instance for Test");
|
| 274 |
mReleaseManager.updateBuildInstance(mReporting.buildId, 0, mReporting.isFullyPublished ? BuildResult.Complete :BuildResult.BuildError );
|
274 |
mReleaseManager.updateBuildInstance(mReporting.buildId, 0, mReporting.isFullyPublished ? BuildResult.Complete :BuildResult.BuildError );
|
| Line 301... |
Line 301... |
| 301 |
// Have had zero length values returned
|
301 |
// Have had zero length values returned
|
| 302 |
// Treat as a publishing error
|
302 |
// Treat as a publishing error
|
| 303 |
//
|
303 |
//
|
| 304 |
if ( mReporting.newVcsTag == null || mReporting.newVcsTag.isEmpty() )
|
304 |
if ( mReporting.newVcsTag == null || mReporting.newVcsTag.isEmpty() )
|
| 305 |
{
|
305 |
{
|
| 306 |
mLogger.error("run package not labelled in Version Control on " + mReporting.packageName + mReporting.packageVersion);
|
306 |
mLogger.error("run package not labelled in Version Control on {}{}",mReporting.packageName, mReporting.packageVersion);
|
| 307 |
mReporting.errMsg = "Error publishing to Version Control System"; // Max 50 Characters
|
307 |
mReporting.errMsg = "Error publishing to Version Control System"; // Max 50 Characters
|
| 308 |
throw new Exception();
|
308 |
throw new Exception();
|
| 309 |
}
|
309 |
}
|
| 310 |
|
310 |
|
| 311 |
|
311 |
|
| 312 |
// Publish to release manager
|
312 |
// Publish to release manager
|
| 313 |
// On error mReporting.errMsg will contain error string
|
313 |
// On error mReporting.errMsg will contain error string
|
| 314 |
// Publishing errors only affect the current package
|
314 |
// Publishing errors only affect the current package
|
| 315 |
//
|
315 |
//
|
| 316 |
mLogger.error("run calling mReleaseManager.autoMakeRelease");
|
316 |
mLogger.warn("run calling mReleaseManager.autoMakeRelease");
|
| 317 |
mPhase.setPhase("autoMakeRelease");
|
317 |
mPhase.setPhase("autoMakeRelease");
|
| 318 |
publishError = mReleaseManager.autoMakeRelease(mReporting);
|
318 |
publishError = mReleaseManager.autoMakeRelease(mReporting);
|
| 319 |
if ( publishError )
|
319 |
if ( publishError )
|
| 320 |
{
|
320 |
{
|
| 321 |
mLogger.error("autoMakeRelease publishError: " + mReporting.errMsg);
|
321 |
mLogger.error("autoMakeRelease publishError: {}", mReporting.errMsg);
|
| 322 |
throw new Exception();
|
322 |
throw new Exception();
|
| 323 |
}
|
323 |
}
|
| 324 |
|
324 |
|
| 325 |
//
|
325 |
//
|
| 326 |
// Determine the total time taken by the build
|
326 |
// Determine the total time taken by the build
|
| 327 |
// Done as late a possible in the process
|
327 |
// Done as late a possible in the process
|
| 328 |
// Does not include planning time
|
328 |
// Does not include planning time
|
| 329 |
// Does not handle case where build cycle is broken
|
329 |
// Does not handle case where build cycle is broken
|
| 330 |
//
|
330 |
//
|
| 331 |
int buildDuration = mBuildDuration.toIntSecs();
|
331 |
int buildDuration = mBuildDuration.toIntSecs();
|
| 332 |
mLogger.error("Build Duration:" + buildDuration);
|
332 |
mLogger.warn("Build Duration:{}", buildDuration);
|
| 333 |
mReleaseManager.updateBuildDuration(mReporting.packageVersionId, buildDuration);
|
333 |
mReleaseManager.updateBuildDuration(mReporting.packageVersionId, buildDuration);
|
| 334 |
|
334 |
|
| 335 |
//
|
335 |
//
|
| 336 |
// Update the Build Instance information
|
336 |
// Update the Build Instance information
|
| 337 |
// If this has been a ripple then the pv_id of the build needs to be associated with
|
337 |
// If this has been a ripple then the pv_id of the build needs to be associated with
|
| Line 349... |
Line 349... |
| 349 |
FileInputStream abtmetrics = new FileInputStream( String.valueOf(mRtagId) + "abtmetrics.txt" );
|
349 |
FileInputStream abtmetrics = new FileInputStream( String.valueOf(mRtagId) + "abtmetrics.txt" );
|
| 350 |
DataInputStream din = new DataInputStream( abtmetrics );
|
350 |
DataInputStream din = new DataInputStream( abtmetrics );
|
| 351 |
InputStreamReader isr = new InputStreamReader( din );
|
351 |
InputStreamReader isr = new InputStreamReader( din );
|
| 352 |
BufferedReader br = new BufferedReader( isr );
|
352 |
BufferedReader br = new BufferedReader( isr );
|
| 353 |
String metrics = br.readLine();
|
353 |
String metrics = br.readLine();
|
| 354 |
mLogger.warn( "execute read metrics string " + metrics );
|
354 |
mLogger.warn( "execute read metrics string {}", metrics );
|
| 355 |
br.close();
|
355 |
br.close();
|
| 356 |
isr.close();
|
356 |
isr.close();
|
| 357 |
din.close();
|
357 |
din.close();
|
| 358 |
|
358 |
|
| 359 |
mLogger.error("run calling mReleaseManager.insertPackageMetrics");
|
359 |
mLogger.warn("run calling mReleaseManager.insertPackageMetrics");
|
| 360 |
mReleaseManager.insertPackageMetrics(mRtagId, mReporting.packageName, mReporting.packageExtension, metrics );
|
360 |
mReleaseManager.insertPackageMetrics(mRtagId, mReporting.packageName, mReporting.packageExtension, metrics );
|
| 361 |
|
361 |
|
| 362 |
//
|
362 |
//
|
| 363 |
// Info reporting
|
363 |
// Info reporting
|
| 364 |
// Send an email to track build system usage - may be noise
|
364 |
// Send an email to track build system usage - may be noise
|
| 365 |
//
|
365 |
//
|
| 366 |
mReporting.errMsg = null;
|
366 |
mReporting.errMsg = null;
|
| 367 |
mLogger.error("run calling emailBuildComplete");
|
367 |
mLogger.warn("run calling emailBuildComplete");
|
| 368 |
mPhase.setPhase("Post Build Email");
|
368 |
mPhase.setPhase("Post Build Email");
|
| 369 |
emailPostBuild(mRippleEngine, false);
|
369 |
emailPostBuild(mRippleEngine, false);
|
| 370 |
|
370 |
|
| 371 |
//---------------------------------------------------------------
|
371 |
//---------------------------------------------------------------
|
| 372 |
// All done
|
372 |
// All done
|
| Line 420... |
Line 420... |
| 420 |
|
420 |
|
| 421 |
//
|
421 |
//
|
| 422 |
// Delete the dpkg_archive entry - the package is a dud
|
422 |
// Delete the dpkg_archive entry - the package is a dud
|
| 423 |
//
|
423 |
//
|
| 424 |
mPhase.setPhase("Delete package from archive");
|
424 |
mPhase.setPhase("Delete package from archive");
|
| 425 |
mLogger.error("Delete package from archive");
|
425 |
mLogger.warn("Delete package from archive");
|
| 426 |
deletePackageVersion();
|
426 |
deletePackageVersion();
|
| 427 |
|
427 |
|
| 428 |
// A publishing error. The error occurred, after the build, in the RM publishing
|
428 |
// A publishing error. The error occurred, after the build, in the RM publishing
|
| 429 |
// We won't have a log file, but we will have a rootCause
|
429 |
// We won't have a log file, but we will have a rootCause
|
| 430 |
// Exclude package from the build
|
430 |
// Exclude package from the build
|
| Line 437... |
Line 437... |
| 437 |
// Post Build Error
|
437 |
// Post Build Error
|
| 438 |
// eMails have not been sent by the ABT class as the error has occurred outside of that process
|
438 |
// eMails have not been sent by the ABT class as the error has occurred outside of that process
|
| 439 |
mPhase.setPhase("Post Build Failure Email");
|
439 |
mPhase.setPhase("Post Build Failure Email");
|
| 440 |
emailPostBuild(mRippleEngine, true);
|
440 |
emailPostBuild(mRippleEngine, true);
|
| 441 |
|
441 |
|
| 442 |
mLogger.error("run calling excludeFromBuild");
|
442 |
mLogger.warn("run calling excludeFromBuild");
|
| 443 |
mPhase.setPhase("Excluded from build");
|
443 |
mPhase.setPhase("Excluded from build");
|
| 444 |
mReleaseManager.excludeFromBuild(false,
|
444 |
mReleaseManager.excludeFromBuild(false,
|
| 445 |
mReporting.packageVersionId,
|
445 |
mReporting.packageVersionId,
|
| 446 |
null,
|
446 |
null,
|
| 447 |
mReporting.rtagId,
|
447 |
mReporting.rtagId,
|
| Line 467... |
Line 467... |
| 467 |
|
467 |
|
| 468 |
// If we have a log file, then provide it to the user, else insert a generic message
|
468 |
// If we have a log file, then provide it to the user, else insert a generic message
|
| 469 |
|
469 |
|
| 470 |
mReporting.errMsg = (mReporting.buildFailureLogFile == null) ? "Buildtool env error occurred. Attempt build again" : null;
|
470 |
mReporting.errMsg = (mReporting.buildFailureLogFile == null) ? "Buildtool env error occurred. Attempt build again" : null;
|
| 471 |
|
471 |
|
| 472 |
mLogger.error("run calling excludeFromBuild");
|
472 |
mLogger.warn("run calling excludeFromBuild");
|
| 473 |
mPhase.setPhase("Excluded from build");
|
473 |
mPhase.setPhase("Excluded from build");
|
| 474 |
mReleaseManager.excludeFromBuild(false,
|
474 |
mReleaseManager.excludeFromBuild(false,
|
| 475 |
mReporting.packageVersionId,
|
475 |
mReporting.packageVersionId,
|
| 476 |
mReporting.packageVersion,
|
476 |
mReporting.packageVersion,
|
| 477 |
mReporting.rtagId,
|
477 |
mReporting.rtagId,
|
| Line 502... |
Line 502... |
| 502 |
//---------------------------------------------------------------
|
502 |
//---------------------------------------------------------------
|
| 503 |
// Start of a new build cycle
|
503 |
// Start of a new build cycle
|
| 504 |
// Determine if the daemon has been paused.
|
504 |
// Determine if the daemon has been paused.
|
| 505 |
// Set RunLevel.IDLE (within allowedToProceed)
|
505 |
// Set RunLevel.IDLE (within allowedToProceed)
|
| 506 |
//
|
506 |
//
|
| 507 |
mLogger.error("run calling allowedToProceed");
|
507 |
mLogger.warn("run calling allowedToProceed");
|
| 508 |
mPhase.setPhase("allowedToProceed");
|
508 |
mPhase.setPhase("allowedToProceed");
|
| 509 |
mReleaseManager.discardVersion();
|
509 |
mReleaseManager.discardVersion();
|
| 510 |
mReleaseManager.clearCurrentPackageBeingBuilt(mRconId);
|
510 |
mReleaseManager.clearCurrentPackageBeingBuilt(mRconId);
|
| 511 |
allowedToProceed(true);
|
511 |
allowedToProceed(true);
|
| 512 |
mLogger.info("run allowedToProceed returned");
|
512 |
mLogger.info("run allowedToProceed returned");
|
| Line 516... |
Line 516... |
| 516 |
throw new ExitException();
|
516 |
throw new ExitException();
|
| 517 |
}
|
517 |
}
|
| 518 |
|
518 |
|
| 519 |
// Set up mReleaseConfigCollection
|
519 |
// Set up mReleaseConfigCollection
|
| 520 |
// This will be used when creating a build file
|
520 |
// This will be used when creating a build file
|
| 521 |
mLogger.error("Collect fresh MetaData");
|
521 |
mLogger.warn("Collect fresh MetaData");
|
| 522 |
mPhase.setPhase("collectMetaData");
|
522 |
mPhase.setPhase("collectMetaData");
|
| 523 |
mRippleEngine.collectMetaData();
|
523 |
mRippleEngine.collectMetaData();
|
| 524 |
|
524 |
|
| 525 |
//---------------------------------------------------------------
|
525 |
//---------------------------------------------------------------
|
| 526 |
// Plan the next build
|
526 |
// Plan the next build
|
| 527 |
// Snap current Release Sequence Number
|
527 |
// Snap current Release Sequence Number
|
| 528 |
// Determine what is to be built
|
528 |
// Determine what is to be built
|
| 529 |
// Generate build files
|
529 |
// Generate build files
|
| 530 |
mLogger.error("run calling planRelease");
|
530 |
mLogger.warn("run calling planRelease");
|
| 531 |
mPhase.setPhase("Plan Release", 600);
|
531 |
mPhase.setPhase("Plan Release", 600);
|
| 532 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_PLANNING);
|
532 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_PLANNING);
|
| 533 |
mReleaseSeqNum = mReleaseManager.queryReleaseSeqNum(mRtagId, mRconId, BuildDaemon.mHostname);
|
533 |
mReleaseSeqNum = mReleaseManager.queryReleaseSeqNum(mRtagId, mRconId, BuildDaemon.mHostname);
|
| 534 |
mRippleEngine.planRelease(!mLastBuildWasBenign);
|
534 |
mRippleEngine.planRelease(!mLastBuildWasBenign);
|
| 535 |
|
535 |
|
| Line 543... |
Line 543... |
| 543 |
//---------------------------------------------------------------
|
543 |
//---------------------------------------------------------------
|
| 544 |
// Check that we are good to proceed with the build
|
544 |
// Check that we are good to proceed with the build
|
| 545 |
// Check environment
|
545 |
// Check environment
|
| 546 |
// Ensure we have enough disk space
|
546 |
// Ensure we have enough disk space
|
| 547 |
//
|
547 |
//
|
| 548 |
mLogger.error("run calling checkEnvironment");
|
548 |
mLogger.warn("run calling checkEnvironment");
|
| 549 |
mPhase.setPhase("checkEnvironment");
|
549 |
mPhase.setPhase("checkEnvironment");
|
| 550 |
checkEnvironment();
|
550 |
checkEnvironment();
|
| 551 |
mLogger.info("run checkEnvironment returned");
|
551 |
mLogger.info("run checkEnvironment returned");
|
| 552 |
|
552 |
|
| 553 |
if ( mUnitTest.startsWith("unit test check environment") )
|
553 |
if ( mUnitTest.startsWith("unit test check environment") )
|
| Line 563... |
Line 563... |
| 563 |
mReporting.resetData();
|
563 |
mReporting.resetData();
|
| 564 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_ACTIVE);
|
564 |
mRunLevel.persist(mReleaseManager, mRconId, BuildState.DB_ACTIVE);
|
| 565 |
mReleaseManager.setCurrentPackageBeingBuilt(mRconId, mMasterBuildFile.mPkgId, mMasterBuildFile.mPvId);
|
565 |
mReleaseManager.setCurrentPackageBeingBuilt(mRconId, mMasterBuildFile.mPkgId, mMasterBuildFile.mPvId);
|
| 566 |
|
566 |
|
| 567 |
// Save the buildfile
|
567 |
// Save the buildfile
|
| 568 |
mLogger.error("Save buildfile");
|
568 |
mLogger.warn("Save buildfile");
|
| 569 |
mPhase.setPhase("Save buildfile");
|
569 |
mPhase.setPhase("Save buildfile");
|
| 570 |
saveBuildFile(mMasterBuildFile.content);
|
570 |
saveBuildFile(mMasterBuildFile.content);
|
| 571 |
|
571 |
|
| 572 |
// Quick Test to validate the provided Version Control tag/label
|
572 |
// Quick Test to validate the provided Version Control tag/label
|
| 573 |
mPhase.setPhase("Validate Version Tag");
|
573 |
mPhase.setPhase("Validate Version Tag");
|
| Line 583... |
Line 583... |
| 583 |
mPhase.setPhase("Notify slaves of work", 10);
|
583 |
mPhase.setPhase("Notify slaves of work", 10);
|
| 584 |
if ( mMasterBuildFile.state != BuildFileState.NonGeneric)
|
584 |
if ( mMasterBuildFile.state != BuildFileState.NonGeneric)
|
| 585 |
{
|
585 |
{
|
| 586 |
// publish a dummy build file for either generic or dummy cases
|
586 |
// publish a dummy build file for either generic or dummy cases
|
| 587 |
// this results in the slave not running ant
|
587 |
// this results in the slave not running ant
|
| 588 |
mLogger.error("run calling publishBuildFile on dummy");
|
588 |
mLogger.warn("run calling publishBuildFile on dummy");
|
| 589 |
mMasterBuildFile.content = mDummyBuildFileContent;
|
589 |
mMasterBuildFile.content = mDummyBuildFileContent;
|
| 590 |
}
|
590 |
}
|
| 591 |
else
|
591 |
else
|
| 592 |
{
|
592 |
{
|
| 593 |
// publish the build file
|
593 |
// publish the build file
|
| 594 |
mLogger.error("run calling publishBuildFile");
|
594 |
mLogger.warn("run calling publishBuildFile");
|
| 595 |
}
|
595 |
}
|
| 596 |
mReleaseManager.publishBuildFile(mRtagId, mMasterBuildFile);
|
596 |
mReleaseManager.publishBuildFile(mRtagId, mMasterBuildFile);
|
| 597 |
|
597 |
|
| 598 |
|
598 |
|
| 599 |
if ( mUnitTest.compareTo("unit test generate build files") == 0 )
|
599 |
if ( mUnitTest.compareTo("unit test generate build files") == 0 )
|
| Line 606... |
Line 606... |
| 606 |
//---------------------------------------------------------------
|
606 |
//---------------------------------------------------------------
|
| 607 |
// Build the package
|
607 |
// Build the package
|
| 608 |
// Setup the workspace
|
608 |
// Setup the workspace
|
| 609 |
// Build the package - deliver change to product baseline
|
609 |
// Build the package - deliver change to product baseline
|
| 610 |
//
|
610 |
//
|
| 611 |
mLogger.error("Build Package " + mReporting.packageName + "_" + mReporting.packageVersion);
|
611 |
mLogger.warn("Build Package {}_{}", mReporting.packageName, mReporting.packageVersion);
|
| 612 |
|
612 |
|
| 613 |
mLogger.info("run calling setViewUp");
|
613 |
mLogger.info("run calling setViewUp");
|
| 614 |
mPhase.setPhase("Setup View for build");
|
614 |
mPhase.setPhase("Setup View for build");
|
| 615 |
deliverChange("AbtSetUp", true, false);
|
615 |
deliverChange("AbtSetUp", true, false);
|
| 616 |
|
616 |
|
| Line 678... |
Line 678... |
| 678 |
// Uncaptured exception
|
678 |
// Uncaptured exception
|
| 679 |
// These are not good. Current mechanism to handle this condition is:
|
679 |
// These are not good. Current mechanism to handle this condition is:
|
| 680 |
// 1) Email build system administrator
|
680 |
// 1) Email build system administrator
|
| 681 |
// 2) Pause the build system
|
681 |
// 2) Pause the build system
|
| 682 |
//
|
682 |
//
|
| 683 |
mLogger.error("run indefinitePause " + e.toString());
|
683 |
mLogger.error("run indefinitePause {}", e);
|
| 684 |
|
684 |
|
| 685 |
// DEVI 51366 force sleep at beginning of while loop
|
685 |
// DEVI 51366 force sleep at beginning of while loop
|
| 686 |
mException = true;
|
686 |
mException = true;
|
| 687 |
|
687 |
|
| 688 |
String cause = e.getMessage();
|
688 |
String cause = e.getMessage();
|
| Line 714... |
Line 714... |
| 714 |
}
|
714 |
}
|
| 715 |
}
|
715 |
}
|
| 716 |
try {
|
716 |
try {
|
| 717 |
mReleaseManager.clearCurrentPackageBeingBuilt(mRconId);
|
717 |
mReleaseManager.clearCurrentPackageBeingBuilt(mRconId);
|
| 718 |
} catch (Exception e) {
|
718 |
} catch (Exception e) {
|
| 719 |
mLogger.error("Exception in clearCurrentPackageBeingBuilt:" + e.getMessage());
|
719 |
mLogger.error("Exception in clearCurrentPackageBeingBuilt: {}", e.getMessage());
|
| 720 |
}
|
720 |
}
|
| 721 |
mPhase.setPhase("Exit Thread");
|
721 |
mPhase.setPhase("Exit Thread");
|
| 722 |
}
|
722 |
}
|
| 723 |
|
723 |
|
| 724 |
/** Delete a specified version of a package from dpkg_archive
|
724 |
/** Delete a specified version of a package from dpkg_archive
|
| Line 763... |
Line 763... |
| 763 |
cmd.add("-DeleteVersion");
|
763 |
cmd.add("-DeleteVersion");
|
| 764 |
cmd.add(!ReleaseManager.getUseMutex(), "-testArchive");
|
764 |
cmd.add(!ReleaseManager.getUseMutex(), "-testArchive");
|
| 765 |
cmd.add("'-pname=" + mReporting.packageName + "'");
|
765 |
cmd.add("'-pname=" + mReporting.packageName + "'");
|
| 766 |
cmd.add("'-pversion=" + mReporting.packageVersion + "'");
|
766 |
cmd.add("'-pversion=" + mReporting.packageVersion + "'");
|
| 767 |
|
767 |
|
| 768 |
mLogger.error("run remote command to delete " + mReporting.packageName +", "+ mReporting.packageVersion);
|
768 |
mLogger.warn("run remote command to delete {}, {}", mReporting.packageName, mReporting.packageVersion);
|
| 769 |
int rv = mRemoteExecution.execute(cmd.toString());
|
769 |
int rv = mRemoteExecution.execute(cmd.toString());
|
| 770 |
mLogger.error("run remote command to delete. Returned " + rv);
|
770 |
mLogger.info("run remote command to delete. Returned {}", rv);
|
| 771 |
|
771 |
|
| 772 |
// Belt and Braces
|
772 |
// Belt and Braces
|
| 773 |
// Ensure that the package-version has been deleted,
|
773 |
// Ensure that the package-version has been deleted,
|
| 774 |
// and if not then try to delete it the slow way.
|
774 |
// and if not then try to delete it the slow way.
|
| 775 |
//
|
775 |
//
|
| 776 |
// Note: Need to flush NFS cache before we check existence
|
776 |
// Note: Need to flush NFS cache before we check existence
|
| 777 |
|
777 |
|
| 778 |
String dpkgArchiveEntry = utilities.catDir(Package.mGbeDpkg, mReporting.packageName, mReporting.packageVersion);
|
778 |
String dpkgArchiveEntry = utilities.catDir(Package.mGbeDpkg, mReporting.packageName, mReporting.packageVersion);
|
| 779 |
File dpkgArchiveEntryFile = utilities.freshFile(dpkgArchiveEntry);
|
779 |
File dpkgArchiveEntryFile = utilities.freshFile(dpkgArchiveEntry);
|
| 780 |
mLogger.info("run checking existence of " + dpkgArchiveEntry);
|
780 |
mLogger.debug("run checking existence of {}",dpkgArchiveEntry);
|
| 781 |
|
781 |
|
| 782 |
if ( dpkgArchiveEntryFile.exists() )
|
782 |
if ( dpkgArchiveEntryFile.exists() )
|
| 783 |
{
|
783 |
{
|
| 784 |
if ( dpkgArchiveEntryFile.isDirectory() )
|
784 |
if ( dpkgArchiveEntryFile.isDirectory() )
|
| 785 |
{
|
785 |
{
|
| 786 |
mLogger.error("run calling deleteDirectory on " + dpkgArchiveEntryFile);
|
786 |
mLogger.warn("run calling deleteDirectory on {}", dpkgArchiveEntryFile);
|
| 787 |
deleteDirectory(dpkgArchiveEntryFile);
|
787 |
deleteDirectory(dpkgArchiveEntryFile);
|
| 788 |
}
|
788 |
}
|
| 789 |
}
|
789 |
}
|
| 790 |
}
|
790 |
}
|
| 791 |
|
791 |
|
| Line 908... |
Line 908... |
| 908 |
+ "Build Standards : " + indent + buildStandards;
|
908 |
+ "Build Standards : " + indent + buildStandards;
|
| 909 |
|
909 |
|
| 910 |
mailBody += "<p><hr>";
|
910 |
mailBody += "<p><hr>";
|
| 911 |
try
|
911 |
try
|
| 912 |
{
|
912 |
{
|
| 913 |
mLogger.error("completeTestBuildEmail Server: {}", rippleEngine.getMailServer());
|
913 |
mLogger.info("completeTestBuildEmail Server: {}", rippleEngine.getMailServer());
|
| 914 |
mLogger.error("completeTestBuildEmail Sender: {}", rippleEngine.getMailSender());
|
914 |
mLogger.info("completeTestBuildEmail Sender: {}", rippleEngine.getMailSender());
|
| 915 |
mLogger.error("completeTestBuildEmail Target: {}", mReporting.packageOwners);
|
915 |
mLogger.info("completeTestBuildEmail Target: {}", mReporting.packageOwners);
|
| 916 |
|
916 |
|
| 917 |
Smtpsend.send(rippleEngine.getMailServer(), // mailServer
|
917 |
Smtpsend.send(rippleEngine.getMailServer(), // mailServer
|
| 918 |
rippleEngine.getMailSender(), // source
|
918 |
rippleEngine.getMailSender(), // source
|
| 919 |
mReporting.packageOwners, // target
|
919 |
mReporting.packageOwners, // target
|
| 920 |
rippleEngine.getMailSender(), // cc
|
920 |
rippleEngine.getMailSender(), // cc
|
| Line 928... |
Line 928... |
| 928 |
mLogger.warn("Email Failure: completeTestBuild:{}", e.getMessage());
|
928 |
mLogger.warn("Email Failure: completeTestBuild:{}", e.getMessage());
|
| 929 |
}
|
929 |
}
|
| 930 |
|
930 |
|
| 931 |
// Update the Release Manager Database
|
931 |
// Update the Release Manager Database
|
| 932 |
mReleaseManager.markDaemonInstCompleted(mReporting.testBuildId);
|
932 |
mReleaseManager.markDaemonInstCompleted(mReporting.testBuildId);
|
| 933 |
mLogger.error("completeTest. Returning");
|
933 |
mLogger.warn("completeTest. Returning");
|
| 934 |
}
|
934 |
}
|
| 935 |
|
935 |
|
| 936 |
|
936 |
|
| 937 |
/**returns 'M'
|
937 |
/**returns 'M'
|
| 938 |
*/
|
938 |
*/
|