Subversion Repositories DevTools

Rev

Rev 7032 | Rev 7044 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7032 Rev 7033
Line 5... Line 5...
5
import java.util.Collections;
5
import java.util.Collections;
6
import java.util.Iterator;
6
import java.util.Iterator;
7
import java.util.List;
7
import java.util.List;
8
import java.util.ListIterator;
8
import java.util.ListIterator;
9
 
9
 
10
import org.apache.log4j.Logger;
10
import org.slf4j.Logger;
-
 
11
import org.slf4j.LoggerFactory;
11
 
12
 
12
import com.erggroup.buildtool.ripple.BuildFile.BuildFileState;
13
import com.erggroup.buildtool.ripple.BuildFile.BuildFileState;
13
import com.erggroup.buildtool.ripple.ReleaseManager.BuildReason;
14
import com.erggroup.buildtool.ripple.ReleaseManager.BuildReason;
14
import com.erggroup.buildtool.smtp.CreateUrls;
15
import com.erggroup.buildtool.smtp.CreateUrls;
15
import com.erggroup.buildtool.smtp.Smtpsend;
16
import com.erggroup.buildtool.smtp.Smtpsend;
Line 60... Line 61...
60
    ArrayList<BuildExclusion> mBuildExclusionCollection = new ArrayList<BuildExclusion>();
61
    ArrayList<BuildExclusion> mBuildExclusionCollection = new ArrayList<BuildExclusion>();
61
 
62
 
62
    /**Logger
63
    /**Logger
63
     * @attribute
64
     * @attribute
64
     */
65
     */
65
    private static final Logger mLogger = Logger.getLogger(RippleEngine.class);
66
    private static final Logger mLogger = LoggerFactory.getLogger(RippleEngine.class);
66
 
67
 
67
    /** Escrow information - commands to set up escrow
68
    /** Escrow information - commands to set up escrow
68
     * @attribute
69
     * @attribute
69
     */
70
     */
70
    private String mEscrowSetup;
71
    private String mEscrowSetup;
Line 388... Line 389...
388
                        if(p.mIsPegged || p.mIsSdk)
389
                        if(p.mIsPegged || p.mIsSdk)
389
                        {
390
                        {
390
                            String reason;
391
                            String reason;
391
                            reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
392
                            reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
392
 
393
 
393
                            mLogger.fatal("planRelease Daemon Instruction of " + reason + " package deleted: " + p.mName);
394
                            mLogger.error("planRelease Daemon Instruction of " + reason + " package deleted: " + p.mName);
394
                            mReleaseManager.markDaemonInstCompleted( p.mTestBuildInstruction );
395
                            mReleaseManager.markDaemonInstCompleted( p.mTestBuildInstruction );
395
                            emailRejectedDaemonInstruction("Cannot 'Test Build' a " + reason + " package",p);
396
                            emailRejectedDaemonInstruction("Cannot 'Test Build' a " + reason + " package",p);
396
                        }
397
                        }
397
 
398
 
398
                        // force patch for test build numbering
399
                        // force patch for test build numbering
Line 819... Line 820...
819
                        if(p.mIsPegged || p.mIsSdk)
820
                        if(p.mIsPegged || p.mIsSdk)
820
                        {
821
                        {
821
                            String reason;
822
                            String reason;
822
                            reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
823
                            reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
823
 
824
 
824
                            mLogger.fatal("planRelease Daemon Instruction of " + reason + " package deleted: " + p.mName);
825
                            mLogger.error("planRelease Daemon Instruction of " + reason + " package deleted: " + p.mName);
825
                            mReleaseManager.markDaemonInstCompleted( p.mForcedRippleInstruction );
826
                            mReleaseManager.markDaemonInstCompleted( p.mForcedRippleInstruction );
826
                            emailRejectedDaemonInstruction("Cannot 'Ripple' a " + reason + " package",p);
827
                            emailRejectedDaemonInstruction("Cannot 'Ripple' a " + reason + " package",p);
827
 
828
 
828
                            p.mBuildFile = -8; 
829
                            p.mBuildFile = -8; 
829
                        }
830
                        }
Line 887... Line 888...
887
                        case -9: reason = "Rejected Daemon Instruction"; break;
888
                        case -9: reason = "Rejected Daemon Instruction"; break;
888
                        case -10: reason = "Unbuildable package not in dpkg_archive"; break;
889
                        case -10: reason = "Unbuildable package not in dpkg_archive"; break;
889
                        case -11: reason = "Marked as 'RippleStop'"; break;
890
                        case -11: reason = "Marked as 'RippleStop'"; break;
890
                        default: reason = "Unknown reason. Code:" + p.mBuildFile; break;
891
                        default: reason = "Unknown reason. Code:" + p.mBuildFile; break;
891
                        }
892
                        }
892
                        mLogger.fatal("planRelease Test Build of an unbuildable of package deleted: " + p.mName);
893
                        mLogger.error("planRelease Test Build of an unbuildable of package deleted: " + p.mName);
893
                        mReleaseManager.markDaemonInstCompleted( p.mTestBuildInstruction );
894
                        mReleaseManager.markDaemonInstCompleted( p.mTestBuildInstruction );
894
                        emailRejectedDaemonInstruction(reason,p);
895
                        emailRejectedDaemonInstruction(reason,p);
895
                    }
896
                    }
896
                }
897
                }
897
            }
898
            }
Line 1211... Line 1212...
1211
            if ( !buildExclusion.isProcessed() )
1212
            if ( !buildExclusion.isProcessed() )
1212
            {
1213
            {
1213
                if (buildExclusion.isImported() && ! buildExclusion.isARootCause() ) {
1214
                if (buildExclusion.isImported() && ! buildExclusion.isARootCause() ) {
1214
                    // Remove from the exclusion list
1215
                    // Remove from the exclusion list
1215
                    buildExclusion.includeToBuild(mReleaseManager, mBaseline);
1216
                    buildExclusion.includeToBuild(mReleaseManager, mBaseline);
1216
                    mLogger.fatal("reportChange remove unused exclusion: " + buildExclusion.info());
1217
                    mLogger.error("reportChange remove unused exclusion: " + buildExclusion.info());
1217
                } else {
1218
                } else {
1218
                    // Exclude and notify
1219
                    // Exclude and notify
1219
                    buildExclusion.excludeFromBuild(mReleaseManager, mBaseline);
1220
                    buildExclusion.excludeFromBuild(mReleaseManager, mBaseline);
1220
                    buildExclusion.email(this, mPackageCollection);
1221
                    buildExclusion.email(this, mPackageCollection);
1221
                    counter++;
1222
                    counter++;
1222
                }
1223
                }
1223
            }
1224
            }
1224
        }
1225
        }
1225
        mLogger.fatal("reportChange exclusion count: " + counter);
1226
        mLogger.error("reportChange exclusion count: " + counter);
1226
    }
1227
    }
1227
 
1228
 
1228
    /**reports the build plan
1229
    /**reports the build plan
1229
     */
1230
     */
1230
    public void reportPlan() throws SQLException, Exception
1231
    public void reportPlan() throws SQLException, Exception
Line 1294... Line 1295...
1294
                mSbomId = mBaseline;
1295
                mSbomId = mBaseline;
1295
                phase.setPhase("queryRtagIdForSbom");
1296
                phase.setPhase("queryRtagIdForSbom");
1296
                mRtagId = mReleaseManager.queryRtagIdForSbom(mBaseline);
1297
                mRtagId = mReleaseManager.queryRtagIdForSbom(mBaseline);
1297
                if (mRtagId == 0)
1298
                if (mRtagId == 0)
1298
                {
1299
                {
1299
                    mLogger.fatal("SBOM does not have a matching Release. Cannot be used as a base for an Escrow"); 
1300
                    mLogger.error("SBOM does not have a matching Release. Cannot be used as a base for an Escrow"); 
1300
                    throw new Exception("rtagIdForSbom show stopper. SBOM does not have an associated Release");
1301
                    throw new Exception("rtagIdForSbom show stopper. SBOM does not have an associated Release");
1301
                }
1302
                }
1302
            }
1303
            }
1303
 
1304
 
1304
            phase.setPhase("queryReleaseConfig");
1305
            phase.setPhase("queryReleaseConfig");
Line 2356... Line 2357...
2356
        //        Transfer the daemon instruction email list into the package before use
2357
        //        Transfer the daemon instruction email list into the package before use
2357
 
2358
 
2358
        p.setTestEmail();
2359
        p.setTestEmail();
2359
        String target = p.emailInfoNonAntTask(this);
2360
        String target = p.emailInfoNonAntTask(this);
2360
 
2361
 
2361
        mLogger.fatal("emailRejectedDaemonInstruction Server: " + getMailServer());
2362
        mLogger.error("emailRejectedDaemonInstruction Server: " + getMailServer());
2362
        mLogger.fatal("emailRejectedDaemonInstruction Sender: " + getMailSender());
2363
        mLogger.error("emailRejectedDaemonInstruction Sender: " + getMailSender());
2363
        mLogger.fatal("emailRejectedDaemonInstruction Target: " + target);
2364
        mLogger.error("emailRejectedDaemonInstruction Target: " + target);
2364
 
2365
 
2365
        try
2366
        try
2366
        {
2367
        {
2367
            //    
2368
            //    
2368
            Smtpsend.send(getMailServer(), // mailServer
2369
            Smtpsend.send(getMailServer(), // mailServer