Clearcase trigger Guide (6)-customized trigger as needed

Source: Internet
Author: User

You are welcome to repost this article for any non-commercial purposes. Please indicate the author and source.

Customize trigger as needed

Optimizes clearcase and supports configuration management.

Configuration management is a system that consists of three parts: the process and discipline of tools, personnel, and configuration management. The purpose of the tool is to control the process and discipline, work with and simplify the work of people. This often happens. We can find many clearcase scripts and triggers, but they are not satisfactory. Unexpected problems often occur, it brings a lot of trouble. This should be a sentence: "The south of the Yangtze River is orange, the north of the Yangtze River is orange", we need to modify and customize the script and trigger according to our actual situation.

The first step is to determine the configuration management process system. It depends on what kind of software we want to build, whether it is a project, a semi-customized product, a product line, or other types, these are the foundation of the configuration management system. The task of the Configuration Management System is to serve this goal well. The development method is determined based on the goal and organizational structure, different development methods should be used for different objectives and organizational structures. If it is just a simple project, there is no need for parallel development. If it is a product line, parallel development is inevitable; the objectives, organizational structure, and development methods jointly determine the configuration management process and system.

After the process and system are determined, let's take a look at whether rational clearcase and UCM meet the needs of the process and system. Note that tools only work with processes and systems, rather than processes and systems, some Configuration Management beginners often decide their processes and systems by tools at this stage. If we use UCM, we need to determine the project and stream, and then determine the Configuration Policy for each project and Stream project based on the organizational structure and task arrangement; finally, find out what UCM currently does not support in the process and system and check whether trigger or script implementation is required.

To apply a trigger during a custom process, you must have a deep understanding of the clearcase operations that trigger is targeting so that you can write an effective trigger. For example, if you want to create a trigger for deliver_start, you need to understand the specific steps for the clearcase operation of deliver. The following is my understanding of the clearcase operation of deliver:

1. Check whether there is a deliver or rebase in progress on the current stream. If yes, the system prompts that a deliver or rebase process is running.

2. Check the deliver policy of the Target stream. If the policy does not comply with the stream policy, the system rejects the execution of the deliver and provides a prompt.

3. Check the deliver policy of the source stream. If the policy does not comply with the stream policy, the system rejects the execution of the deliver and provides a prompt.

4. Select the activity to be submitted and check the dependency of the activity.

5. Determine the view of the Target stream to be operated.

6. Check whether the check out configuration item exists in the Operation view of the Target stream. If any prompt is displayed, check out is performed in the Operation view of the Target stream to be submitted and exit.

7. Start the deliver operation. Here is the start of deliver_start. When a deliver activity is created, the current activity of the Target stream view to be operated is set to the deliver activity. Generally, the current activity of the view cannot be modified in the GUI or in the command line before the deliver is completed, but some special methods can be used to modify the view. After this step starts, if a subsequent task fails, you must execute deliver-Cancel to delete the deliver activity and perform the Undo check out operation on the check out configuration item.

8. Obtains the change set of each activity to be submitted.

9. Execute the check out operation on all the configuration items that need to be operated on the Target stream. If any of the current configuration items has been checked out, record the error and continue the operation, after all the check out operations are completed, a list of configuration items that cannot be checked out in the deliver target flow operation view is provided and the deliver activity is aborted. Note: in step 1, check whether the target view has a check out operation. Other views may have a check out operation. When deliver is executed, the check out type of the configuration item must be reserved, if the configuration item has been checked out in another view, the reserved check out operation cannot be performed, and the check in operation cannot be performed at the end of the deliver operation, therefore, we cannot continue to merge deliver.

10. The configuration items to be submitted are merged with those already checked out on the Target stream. The configuration items are automatically merged or manually merged Based on the settings. If the automatic merge fails, the configuration items are manually merged, if the merge of a configuration item is not completed, record the error and continue the execution. After all the merge operations are completed, the list of failed merge operations is displayed and the deliver activity is aborted.

11. If-force is not set or in the graphic interface, the system prompts the user to merge the deliver operation. In this step, you can also perform rollback for the deliver operation. After step 1 is reached, the rollback operation cannot be performed.

12. You can perform the deliver_cancel operation before performing this step. This step starts the deliver_complete operation and checks in the check out configuration items of all deliver operations, place a hidden delivered label on the submitted source stream, and stop locking the current activity of the Target stream operation view. The deliver operation has ended.

The above steps are my understanding of the deliver operation, not the Guide provided by rational clearcase. because there is not enough information, it may be different from the actual situation. As you can see from the above steps, if you have checked in the first six steps, you do not need to set the preop trigger of deliver_start to repeat the check.

Once again, do not rely solely on the configuration management tool to do things. In some cases, use discipline. For example, you do not need to set a trigger if you are not allowed to perform the check out operation on the integrated stream. It is forbidden to notify all personnel to perform the check out operation on the integrated stream, all operations on the Integration stream are recorded. If someone performs the operation, it is only necessary to handle the operation according to discipline. At the same time, trigger may not be used, and trigger is not required as far as possible. For example, if the target stream only allows people with the deliver permission to perform the deliver operation, trigger does not need to be set, you can simply lock the stream, and add the authorized operator to the exclude.

To facilitate the customization process, rational clearcase provides a series of trigger environment variables. For example, clearcase_pn is the operation object of the current element type trigger. Cleartool man mktrtype can be used to obtain the environment variables and their meanings and usage methods.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.