ClearCase End User Course ED 074W

1 ClearCase End User Course ED 074W ...
Author: Evan Gallagher
0 downloads 2 Views

1 ClearCase End User Course ED 074W

2 What we will touch upon Section 1 Section 2 BreakOverview of ClearCase Understanding VOBs Understanding Views Views and VOBs working together Accessing ClearCase Getting Started Working with Elements Lab 1 Break Section 2 Using Branching Using Attributes and Labels Process Control User Preferences/On-line manuals Lab 2

3 Overview of ClearCase

4 Overview of ClearCase Version Control Workspace ManagementBuild Management Process Control Rel 1.1 Software Development Process

5 Overview of ClearCase Version Control Workspace ManagementBuild Management Process Control Rel 1.1 Software Development Process VOB

6 Overview of ClearCase Version Control Workspace ManagementBuild Management Process Control Rel 1.1 Software Development Process VOB View

7 Overview of ClearCase Version Control Workspace ManagementBuild Management Process Control Rel 1.1 Software Development Process Triggers VOB View

8 Overview of ClearCase Version Control Workspace ManagementBuild Management Process Control Rel 1.1 Software Development Process Triggers Clearmake / Omake VOB View

9 12/17/2017 Understanding VOBs

10 Understanding VOBs A mountable file system that stores version controlled data: files directories Files are read only until they are checked-out Stores metadata info Each program starts with two VOBs It is a network-wide file system resource At BAE SYSTEMS, the VOBs are located on UNIX and WIN servers and are backed up nightly

11 Understanding VOBs The user’s workspace view can span more than one VOB Metadata…labels, branches Program’s Admin VOB V i e w V i e w V i e w Program’s VOB/s (directories/files) ...

12 Understanding Views

13 Understanding Views User’s workspace is determined through a ViewView provides access to version controlled files/versions that are located in the VOB/s Views also access files not stored in VOB/s WIN drive letter “I” has been reserved as the View ROOT Snapshot views have a risk and are not being backed up. They are primarily used for building

14 Understanding Views The selected version of elements that you see for each View is determined through a set of ordered rules called the config spec The config spec is user defined

15 Understanding Views Views also access files not stored in VOB/sSelected elements appear as in standard directory tree structure Views also access files not stored in VOB/s WIN drive letter “I” has been reserved as the View ROOT

16 Understanding Views Dynamic View Snapshot View

17 Dynamic View Dynamic View Transparent access to the VOBs for elementsYour View will always be up to date (changes) Minimal copying of elements Use a Dynamic View for most of your day to day work (i.e.: ci, co, adding to source control, getting metadata info, attaching labels, etc.

18 Dynamic View Dynamic View Config Spec Program’s VOB/s (Your workspace)(new/copy of directories/files) (view private & checked out) Directories/files (selected by the config spec) (element links) Config Spec Program’s VOB/s

19 Dynamic View A View “filters” out versions of elementsVOB A View “filters” out versions of elements C O N F I G S P E VOB /main/one.c/1 /main/two.c/5 /main/hello.c/6 Displayed to user one.c two.c hello.c three.txt View Storage three.txt

20 Dynamic View VOB View-private files are visible in the VOB directory but are not versioned View-private files can only be accessed in the View where they were created/placed View Storage includes CO files and files created during the build process C O N F I G S P E VOB /main/one.c/1 /main/two.c/5 /main/hello.c/6 Displayed to user Checked out one.c two.c hello.c three.txt VIEW Storage hello.c three.txt Copy of the file “hello.c” is placed in the View Storage

21 Snapshot View Snapshot ViewCopies elements based on the load rule in the Config Spec As development progresses, the View will become out of date and will need to be updated Update the View by using the “Update Tool” which will evaluate the Config Spec and compare the non-checked out versions against the VOBs Use a Snapshot View to speed up your builds

22 Snapshot View Snapshot View Config Spec Program’s VOB/s(Your workspace) (new/copy of directories/files) (view private & checked out) Directories/files (selected by the config spec load rules) (copy elements) Config Spec Program’s VOB/s

23 Snapshot View VOB A snapshot View uses the load rule to determine which directories/files are copied. C O N F I G S P E VOB /main/one.c/1 /main/two.c/5 /main/hello.c/6 Displayed to user one.c two.c hello.c three.txt View Storage one.c two.c hello.c three.txt

24 Views and VOBs working together

25 Views and VOBs Views and VOBs are independent identitiesStorage VOB 2 Storage VOB 1 Storage Views and VOBs are independent identities Any VOB can work with any View View Storage WORKSPACE (View)

26 Views and VOBs As a user, you will not be required to create a VOB You will be required to create one or more Views VOB 1 VOB 1 VOBs VOB 1 WORKSPACE AREA View C View A View B

27 Views and VOBs Key thing to rememberTo view directories/files in a VOB; you must do the following: Mount a VOB Start a View Otherwise you will see NOTHING

28 Accessing ClearCase

29 ClearCase Explorer (WIN)Shortcut is installed on the WIN desktop CC Explorer provides access to most CC functions that an end user will need

30 Windows Explorer Menus are accessible by right clicking on the mouse while the object is highlighted Context sensitive menus - change depending upon the type of CC object selected

31 “cleartool” utility (UNIX & WIN)

32 ClearCase Home Base (WIN)Suggest that you create a shortcut on your desktop

33 Getting Started

34 ClearCase Primary Group (WIN)Before you can proceed with creating your ClearCase View, you must make sure that the following has been done: “CLEARCASE_PRIMARY_GROUP” user environmental variable is set to “edeXXXX” or G-APPL-ede.xxxx (XXXX = your program mnemonic) (you need this so that you can add, checkin, and checkout files in your program’s VOB/s (see following slide)

35 Setting your CC Primary Group (XP)

36 Setting your CC Primary Group (WIN)lisa.shattuck.edebidm

37 Create a Dynamic View To create a View…(from your WIN desktop)...select “Start”, “Programs”, Rational ClearCase”, and “Create View”. (This will start the “View Creation Wizard”) The following slides will guide you in creating your view

38 Create a Dynamic View To create a Dynamic View…select “Create View” in the Views tab This will start the “View Creation Wizard”

39 Create a Dynamic View 1. Select “Next”

40 Create a Dynamic View 2. Select Dynamic View Button

41 Create a Dynamic View 3. Give your view the following prefix…(program _ and add your WIN user name after it. i.e.: bidm_lisa_shattuck_view 4. Select “none” for the drive to connect to this view 5. Enter a comment (optional) 6. Select the “Advanced Options” button

42 7a. Select the server storage location for the project.Create a Dynamic View 7a. Select the server storage location for the project. OR

43 Create a Dynamic View 7b. Highlight and replace the entry in “View storage location:” to \\edents75\views\(your program name mnemonic folder) and select the Browse button i.e.: \\edents75\Views\bidm\ { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://slideplayer.com/12303223/73/images/43/Create+a+Dynamic+View.jpg", "name": "Create a Dynamic View", "description": "7b. Highlight and replace the entry in View storage location: to \\edents75\views\(your program name mnemonic folder) and select the Browse button. i.e.: \\edents75\Views\bidm\", "width": "1024" }

45 Create a Dynamic View 9. Select the OK button

46

47 Create a Dynamic View 10. Select the Finish button

48 Create a Dynamic View 5. Select the Finish Button

49 Create a Dynamic View 11. Select the OK button

50 View Shortcut in CC ExplorerNow that your View has been created, you will want to create a simple Dynamic view shortcut in ClearCase Explorer so that you can easily access the files in your program’s VOB The following slides will guide you in creating your View shortcut, as well as, the final steps in accessing a VOB using ClearCase Explorer

51 Creating your Dynamic View ShortcutSelect the Rational ClearCase shortcut on your desktop (this will start ClearCase Explorer)

52 Creating your Dynamic View ShortcutSelect the View Tab

53 Creating your Dynamic View ShortcutRight click in this gray area

54 Create a Dynamic View ShortcutSelect “Add View Shortcut”

55 Create a Dynamic View ShortcutSelect “Dynamic” from the full down list Select your view from the pull down list i.e.: ipdp_smnute_view Select “none” from the pull down list Select “OK”

56 Create a Dynamic View ShortcutYour View shortcut has been created Now single click on your new View shortcut to access that view

57 Create a Snapshot View To create a View…(from your WIN desktop)...select “Start”, “Programs”, Rational ClearCase”, and “Create View”. (This will start the “View Creation Wizard”) The following slides will guide you in creating your Snapshot view

58 Create a Snapshot View To create a Snapshot View…select “Create View” in the Views tab This will start the “View Creation Wizard”

59 Create a Snapshot View 1. Select “Next”

60 Create a Snapshot View 2. Select Snapshot View Button

61 Create a Snapshot View 3. Select a local location on your hard drive. Change your snapshot view name. i.e.: ipdp_smnute_view11 4. Select the Next Button

62 Create a Snapshot View 5. Select the Finish Button

63 Create a Snapshot View 6. Select the OK Button

64 Create a Snapshot View Load Rules for your new View7. Select the Folders/Files within the VOB that you want to copy to your hard drive 8. Select the OK Button

65 Create a Snapshot View 9. Select the OK Button

66 View Shortcut in CC ExplorerNow that your View has been created, you will want to create a simple Snapshot view shortcut in ClearCase Explorer so that you can easily access the files local hard drive and have ClearCase information all in one place The following slides will guide you in creating your Snapshot View shortcut

67 Creating your Snapshot View ShortcutSelect the Rational ClearCase shortcut on your desktop (this will start ClearCase Explorer)

68 Creating your Snapshot View ShortcutSelect the View Tab

69 Creating your Snapshot View ShortcutRight click in this gray area

70 Creating your Snapshot View ShortcutSelect “Add View Shortcut”

71 Creating your Snapshot View ShortcutSelect “Snapshot” from the full down list Enter in your Snapshot location or use the browse button to find the location Select “OK”

72 Creating your Snapshot View ShortcutYour Snapshot View shortcut has been created Now single click on your new View shortcut to access the data

73 Creating your Snapshot View ShortcutThe files that are copied from the VOB/s are now viewable and you can use, view, and checkout files as needed

74 Mount a VOB You will now mount your program’s VOB/s. Right click on the new view and select Mount VOB...

75 Mount a VOB Highlight the VOB/s you want to mountDecide if you want to have the “reconnect at Logon” selected Click on the Mount Button

76 Mount a VOB Your VOB/s are mounted and your view is now startedYou can now access files in your View and VOB/s

77 Mount a VOB To use a VOB…select “Mount VOB” in the VOB tab of the ClearCase Home Base

78 Working with Elements

79 Understanding ElementsElement is an object that has a set of versions, organized into a version tree: directories files A new version of an file is created when you checkin a file or create a branch Version Tree Format

80 Understanding ElementsVersion Tree Browser Eye indicates the version selected by the VIEW

81 Understanding ElementsA new version of a directory is created when one of the following occurs: new file or subdirectory is added existing file is renamed or deleted file/subdirectory is moved When a new file/directory is being added to a WIN VOB, the parent directory (if not checkout) will be checkout and checkin automatically With UNIX, you will need to manually checkout and checkin the parent directory

82 CO-revise-CI model ClearCase uses the “CO-revise-CI” model to control versions of elements Elements are read only unless they are checked out When a file is checkout, the following stuff happens: CO event record is created A placeholder version of the file is created in the version tree The file is reserved or unreserved A modifiable copy of the version of the file is created in your view If someone tries to CO a file that is currently has a reserved CO, an error message will appear Multiple unreserved COs are allowed

83 CO-revise-CI model file: foo.c file: foo.c file: foo.c file: foo.c 7 7checkout checkin R 8 RESERVED checkout file: foo.c file: foo.c 7 7 checkin U 8 UNRESERVED checkout

84 CO-revise-CI model file: foo.c file: foo.c file: foo.c file: foo.cResolving Checkouts checkout 7 R file: foo.c file: foo.c 8 7 U checkin 7 R checkout file: foo.c U 8 7 U 9 merge checkin file: foo.c

85 Accessing Element InfoDisplaying file info in your View Allows you to see which version of a file is selected by your view For each element, the displays shows the status, name, size, kind, version, and config spec rule that selected the version

86 Accessing Element InfoFind Checkouts

87 Accessing Element InfoFind Checkouts

88 Accessing Element InfoFind Checkouts

89 Accessing Element InfoFind Checkouts

90 Accessing Element InfoComparing an element with the previous version

91 Accessing Element InfoComparing an element with the previous version

92 Accessing Element InfoComparing an element with the another version

93 Accessing Element InfoComparing an element with the another version

94 Accessing Element Info12/17/2017 Accessing Element Info Comparing directory versions

95 Accessing Element InfoProperties of a version of an Element

96 Accessing Element InfoProperties of an Element

97 Accessing Element InfoHistory Browser

98 Accessing Element InfoHistory Browser

99 Accessing Element Infocleartool> describe . directory version created 08-May-06.13:56:25 by Adams "Added file element "XP_ClearCase Lab 1 new may2004.doc". Added file element "XP_ClearCase Lab 2 new may2004.doc". Added file element "XP_CLEARCASE_END_USER_TRAINING.ppt"." Element Protection: User : BLUELNK\geoffrey.d.adams : rwx Group: BLUELNK\ededocs : rwx Other: : rwx element type: directory predecessor version: \main\1

100 LAB 1

101 Using Branching

102 Attempting not to BranchWhy Branch at all? All development work is done directly off of /main Versions that are ready for system build and testing are labeled While testing will take time, work continues But “What if an error is discovered in STL_Test 4.1” What potential problems can occur? What are the solutions to resolve this? STL_Test 4.1 STL_Test 4.1

103 Attempting not to BranchA checkout of /main/5 Fix bug A checkin is done, creating /main/6 Changes made in /main/4 and /main/5 might introduce new errors STL_Test 4.1 Could implement the strategy of prohibiting work until testing is done and the bugs are all fix…which is an unacceptable solution

104 Attempting not to BranchLeapfrog effect A checkout of /main/5 /main/3 copied to the checkout version (overwrites) and work is done for the bug fixed A checkin is done, creating /main/6 Label is moved to mark new version A checkout of /main/6 /main/5 is merged with the bug fix in /main/6 copied A checkin is done, creating /main/7 STL_Test 4.1

105 Branching example One of the ways to use branching Create a branchfoo.c REL1 Create a branch Fix the error on the branch Run the test on the change on the branch If the fix passes, then move the label to No impact to developers on /main STL_Test 4.1 STL_Test 4.1

106 Branching example Another way in using branching/pcr101_test /main 4 /pcr101 1 2 3 MR_LATEST REL_2.0 REL_1.1 Developers work is done on their own branch Team leader tests the code on his/her own branch /main branch is reserved only for master repository and releases Another way in using branching

107 Purpose of using BRANCHINGIsolates changes Work can continue at the same time and later be merged back to the main line

108 Creating a new Branch

109 Creating a new Branch

110 Creating a new Branch

111 Modify Config Spec

112 Merging

113 Merging

114 Merging

115 Merging

116 Merging

117 Using Attributes and Labels

118 Attributes and Labels What is an attribute… What is a label…An attribute is a type of metadata that uniquely identifies one or more versions of any element or the element itself What is a label… A label is a type of metadata that uniquely identifies a single version of any element Why use labels? Labels are most commonly used to identify the version of elements that collectively make up a configuration

119 Creating an Attribute Before you can apply an attribute to something, you must first create it in the VOB

120 Creating an Attribute

121 Creating a Label Before you can apply a label to something, you must first create it in the VOB

122 Creating a Label

123 Example using Attributes and Labels12/17/2017 Example using Attributes and Labels - ATTRIBUTES - ePDM uses the “problem_ticket_number” and “enhancement_ticket_number” attributes on versions of files - LABELS - ePDM uses the “STL_LATEST” label to reference the latest approved version of files ePDM uses the “REL_date” label to reference the approved versions that are placed on the Production Server PDM is Product Data Manager

124 Applying an Attribute Start of workflow12/17/2017 Applying an Attribute Start of workflow Software engineer is task to work on a problem ticket Checks out the last approved version of a file (Version of file with the label “STL_latest”)

125 Applying an Attribute Needs to reference the work back to a problem ticket by using an attribute

126 12/17/2017 Applying an Attribute Checked out version now has a reference to a problem ticket Code is now ready to be modified and then it will be tested on the development server

127 Applying an Attribute File passes testing on the development server12/17/2017 Applying an Attribute File passes testing on the development server Time to check-in the file

128 Moving STL_latest LabelNeed to move the “STL_latest” label to the latest version to reflect that it has passed testing on the development server

129 Moving STL_latest Label

130 Moving STL_latest LabelThe “STL_latest” label is now moved to the new approved version Copy of this latest version can now be placed on the Production Server

131 Creating a new Release LabelBefore you can attach a label to something, you must first create it in the VOB (admin VOB…epdm_admin)

132 Creating a new Release LabelSet Scope to “Global”

133 APPLY THE LABEL (EXAMPLE)

134 Applying the Release LabelNeed to apply a label against hundreds of files\versions Need to change the config spec

135 Applying the Release LabelUsing the single pass on applying a label using the label wizard Use ClearCase Home Base to apply the “REL_Date” label

136 Applying the Release Labelsingle pass

137 Applying the Release Labelsingle pass

138 Applying the Release LabelOnce the Release label is applied to the appropriate versions, a lock needs to be applied against that label workflow done

139 Applying a Label - (First and Second pass)

140 Applying a Label (First Pass)

141 Applying a Label (First Pass)

142 Applying a Label (First Pass)

143 Applying a Label (Second Pass)

144 Applying a Label (Second Pass)

145 Process Control

146 Process Control Allows enforcement of policies and processesBAE SYSTEMS has a limited number of customized rules: examples of some of them: end user cannot remove elements, labels, branches, attributes, and versions of files/directories

147 Process Control BAE SYSTEMS triggersPerl script checks the VOB’s access control list

148 Process Control using LabelsAn Example of Element foo.c. User has decided that v6 is ready for use by the team. The Team leader will add v6 of this file to his view by adding the following to the TOP of his config spec cleartool element foo.c EDL_User The Team leader will then test the STL_Latest base line with this file added.

149 Process Control using LabelsAfter successful testing the Team leader will move the STL_Latest label. Moving the label should be done using the Apply label wizard with the view used for testing. This will allow for the Team leader to test multiple changes and then move the STL_Latest label to all the files at once.

150 Process Control using LabelsWhen sell off occurs, or when SCRs are closed CM will then use a view that points to the STL_Latest label Then apply / move the MR_Latest Label to all the files with the STL_Latest label on it.

151 User Preferences/On-Line Manuals

152 User Preferences

153 User Preferences/ClearCase manuals

154 User Preferences/ClearCase manuals

155 User Preferences/ClearCase manuals

156 LAB 2