Subversion Repositories DevTools

Rev

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

Rev 7417 Rev 7457
Line 134... Line 134...
134
   Set rsTemp = nothing
134
   Set rsTemp = nothing
135
End Function
135
End Function
136
 
136
 
137
'----------------------------------------------------------------------------------------------------------------------
137
'----------------------------------------------------------------------------------------------------------------------
138
' Determine s3Sync State
138
' Determine s3Sync State
139
'	This is a property of the release, more than of a package
139
'   This is a property of the release, more than of a package
140
'		Y, N, "<empty>"
140
'       Y, N, "<empty>"
141
Function getS3SyncState(nnRtagId, nnPvId)
141
Function getS3SyncState(nnRtagId, nnPvId)
142
	Dim rsTemp, Query_String
142
    Dim rsTemp, Query_String
143
	getS3SyncState = ""
143
    getS3SyncState = ""
144
 
144
 
145
	If nnRtagId <> "" Then
145
    If nnRtagId <> "" Then
146
	   Query_String = "Select NVL(S3SYNC, 'N') as S3SYNC from Release_Content where rtag_id = " & nnRtagId & " AND pv_id = " & nnPvId
146
       Query_String = "Select NVL(S3SYNC, 'N') as S3SYNC from Release_Content where rtag_id = " & nnRtagId & " AND pv_id = " & nnPvId
147
 
147
 
148
	   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
148
       Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
149
       If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
149
       If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
150
			getS3SyncState = rsTemp("S3SYNC")
150
            getS3SyncState = rsTemp("S3SYNC")
151
			If getS3SyncState <> "Y" Then getS3SyncState = "N"
151
            If getS3SyncState <> "Y" Then getS3SyncState = "N"
152
	   End If
152
       End If
153
 
153
 
154
	   rsTemp.Close
154
       rsTemp.Close
155
	   Set rsTemp = nothing
155
       Set rsTemp = nothing
156
	End If
156
    End If
157
End Function
157
End Function
158
 
158
 
159
'	Update the S3Sycn State, but only if th evalue has changed
159
'   Update the S3Sycn State, but only if th evalue has changed
160
Sub updateS3SyncState( nnRtagId, nnPvId, cState)
160
Sub updateS3SyncState( nnRtagId, nnPvId, cState)
161
	Dim rsTemp, Query_String
161
    Dim rsTemp, Query_String
162
 
162
 
163
	If nnRtagId <> "" Then
163
    If nnRtagId <> "" Then
164
		Query_String = "Select S3SYNC from Release_Content where rtag_id = " & nnRtagId & " AND pv_id = " & nnPvId
164
        Query_String = "Select S3SYNC from Release_Content where rtag_id = " & nnRtagId & " AND pv_id = " & nnPvId
165
		Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
165
        Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
166
 
166
 
167
        Dim Data: Data = rsTemp("S3SYNC")
167
        Dim Data: Data = rsTemp("S3SYNC")
168
		If IsNull(Data) Then Data = "N"
168
        If IsNull(Data) Then Data = "N"
169
		cState = Iif( cState = 1 ,"Y", "N")
169
        cState = Iif( cState = 1 ,"Y", "N")
170
		If ( UCase(cState) <> UCase( Data ) ) Then
170
        If ( UCase(cState) <> UCase( Data ) ) Then
171
			rsTemp.Edit
171
            rsTemp.Edit
172
			rsTemp.Fields("S3SYNC").Value = UCase(cState)
172
            rsTemp.Fields("S3SYNC").Value = UCase(cState)
173
			rsTemp.Update
173
            rsTemp.Update
174
 
174
 
175
			'   Indicate change to the build system
175
            '   Indicate change to the build system
176
			'   May be overkill - perhaps a seperate field
176
            '   May be overkill - perhaps a seperate field
177
            OraDatabase.ExecuteSQL ("BEGIN PK_RELEASE.SET_RELEASE_MODIFIED("& nnRtagId & "); END; ")
177
            OraDatabase.ExecuteSQL ("BEGIN PK_RELEASE.SET_RELEASE_MODIFIED("& nnRtagId & "); END; ")
178
 
178
 
179
		End If
179
        End If
180
 
180
 
181
		rsTemp.Close
181
        rsTemp.Close
182
		Set rsTemp = nothing
182
        Set rsTemp = nothing
183
 
183
 
184
	End If
184
    End If
185
End Sub
185
End Sub
186
 
186
 
187
'----------------------------------------------------------------------------------------------------------------------
187
'----------------------------------------------------------------------------------------------------------------------
188
Sub Get_Form_Details( nPv_id, ByRef objDetails )
188
Sub Get_Form_Details( nPv_id, ByRef objDetails )
189
   Dim rsTemp, Query_String
189
   Dim rsTemp, Query_String
Line 259... Line 259...
259
 
259
 
260
   rsTemp.Close
260
   rsTemp.Close
261
   Set rsTemp = Nothing
261
   Set rsTemp = Nothing
262
 
262
 
263
   '
263
   '
264
   '	Get other items needed for the form
264
   '    Get other items needed for the form
265
   objDetails.Item("s3Sync") = getS3SyncState(parRtag_id, nPv_id)
265
   objDetails.Item("s3Sync") = getS3SyncState(parRtag_id, nPv_id)
266
 
266
 
267
End Sub
267
End Sub
268
'----------------------------------------------------------------------------------------------------------------------
268
'----------------------------------------------------------------------------------------------------------------------
269
' Updates the database, specifically the is_build_env_required flag setting in the package_versions table
269
' Updates the database, specifically the is_build_env_required flag setting in the package_versions table
Line 473... Line 473...
473
      Call UpdateIsBuildEnvRequired( NNpv_id, objFormCollector.Item("bs_name") )
473
      Call UpdateIsBuildEnvRequired( NNpv_id, objFormCollector.Item("bs_name") )
474
 
474
 
475
      ' Update the package_build_info table for this PV_ID
475
      ' Update the package_build_info table for this PV_ID
476
      Call UpdatePackageBuildInfo( NNpv_id )
476
      Call UpdatePackageBuildInfo( NNpv_id )
477
 
477
 
478
	  ' Update the S3 Sync State
478
      ' Update the S3 Sync State
479
	  Call updateS3SyncState( parRtag_id, NNpv_id, NNs3Sync)
479
      Call updateS3SyncState( parRtag_id, NNpv_id, NNs3Sync)
480
 
480
 
481
   End If
481
   End If
482
End Sub
482
End Sub
483
'----------------------------------------------------------------------------------------------------------------------
483
'----------------------------------------------------------------------------------------------------------------------
484
Function ShowHideBuildType( sBuildEnvChecked )
484
Function ShowHideBuildType( sBuildEnvChecked )
Line 981... Line 981...
981
}
981
}
982
 
982
 
983
//
983
//
984
//  Local form tips
984
//  Local form tips
985
formTips.tips.deployable           = newTip(-150, 20, 150, 10, 'DEPLOYABLE','Select YES if this package or certain files of this package have to be deployed to the field.');
985
formTips.tips.deployable           = newTip(-150, 20, 150, 10, 'DEPLOYABLE','Select YES if this package or certain files of this package have to be deployed to the field.');
986
formTips.tips.s3Sync               = newTip(-150, 20, 150, 10, 'SYNC to S3','Select YES if this package contains an S3Tranfer.json file.<p>'+
986
formTips.tips.s3Sync               = newTip(-150, 20, 300, 10, 'SYNC to S3','Select YES if this package contains an s3Transfer.json file.<p>'+
987
                                                               'The files in this section will be synced to an S3 bucket, if the S3Sync is enabled on the Release.<p>'+
987
                                                               'The files in this section will be synced to an S3 bucket, if the S3Sync is enabled on the Release.<p>'+
988
															   'The target bucket name is based on the rtagId'+'<p>Cannot be altered until the package has been released');
988
                                                               'The target bucket name is based on the rtagId'+'<p>Cannot be altered until the package has been released');
989
formTips.tips.pkg_info_short_desc  = newTip(-150, 20, 150, 10, 'SHORT DESCRIPTION','Describe the meaning of the package name.');
989
formTips.tips.pkg_info_short_desc  = newTip(-150, 20, 150, 10, 'SHORT DESCRIPTION','Describe the meaning of the package name.');
990
formTips.tips.pkg_info_overview    = newTip(-150, 20, 150, 10, 'PACKAGE OVERVIEW','Describe in a paragraph what does the package do.<br>NOTE: You have to do this only once!');
990
formTips.tips.pkg_info_overview    = newTip(-150, 20, 150, 10, 'PACKAGE OVERVIEW','Describe in a paragraph what does the package do.<br>NOTE: You have to do this only once!');
991
formTips.tips.build_environment    = newTip(-150, 20, 150, 10, 'BUILD ENVIRONMENT','Select which build environments are used to build this package.');
991
formTips.tips.build_environment    = newTip(-150, 10, 150, 10, 'BUILD ENVIRONMENT','Select which build environments are used to build this package.');
992
 
992
 
993
 
993
 
994
formTips.tips.pkg_label            = newTip(-150, 20, 150, 10, 'LABEL','Enter the ClearCase label used to tag all the source code in this release.');
994
formTips.tips.pkg_label            = newTip(-150, 20, 150, 10, 'LABEL','Enter the ClearCase label used to tag all the source code in this release.');
995
formTips. tips.src_path             = newTip(-180, 20, 180, 10, 'SOURCE PATH','Enter the path to the source code in a ClearCase VOB. This is used to create a "load rule". ie: /MASS_Dev/%package_name%');
995
formTips. tips.src_path             = newTip(-180, 20, 180, 10, 'SOURCE PATH','Enter the path to the source code in a ClearCase VOB. This is used to create a "load rule". ie: /MASS_Dev/%package_name%');
996
 
996
 
Line 1000... Line 1000...
1000
 
1000
 
1001
formTips.tips.svn_tag              = newTip(-180, 20, 180, 10,  'SUBVERSION TAG',
1001
formTips.tips.svn_tag              = newTip(-180, 20, 180, 10,  'SUBVERSION TAG',
1002
                                                        'Enter the Subversion tag. This is a named directory within the packages \'tags\' directory. It may be pegged.');
1002
                                                        'Enter the Subversion tag. This is a named directory within the packages \'tags\' directory. It may be pegged.');
1003
 
1003
 
1004
formTips.tips.git_source_path      = newTip(-180, 20, 180, 10,  'GIT SOURCE PATH',
1004
formTips.tips.git_source_path      = newTip(-180, 20, 180, 10,  'GIT SOURCE PATH',
1005
                                                        'Enter the GIT path to the development branch of the package. <p>The first element will be a symbolic repository reference. '+
1005
                                                        'Enter the GIT path to the package. <p>The first element will be a symbolic repository reference. '+
1006
                                                        '<p>The last element will be the packages main release branch - which may be \'master\' or a project name.');
1006
                                                        '<p>The last element will be the root of the package source within the GIT repo.');
1007
 
1007
 
1008
formTips.tips.git_tag              = newTip(-180, 20, 180, 10,  'GIT TAG',
1008
formTips.tips.git_tag              = newTip(-180, 20, 300, 10,  'GIT TAG',
1009
                                                        'Enter a GIT tag or SHA-1 commit identifier.');
1009
                                                        'Enter a GIT tag, a WIP tag or SHA-1 commit identifier.<p>A GIT Tag start with a \'v\'.<br>A WIP tag ends in \'.WIP\'.<br>A SHA-1 commit ID is 40 hex characters long.');
1010
//-->
1010
//-->
1011
</script>
1011
</script>
1012
</head>
1012
</head>
1013
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
1013
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
1014
<form id="pkginfo" name="pkginfo" method="post" onSubmit="return document.MM_returnValue;" action="<%=submit_action_url%>" class="form_tight">
1014
<form id="pkginfo" name="pkginfo" method="post" onSubmit="return document.MM_returnValue;" action="<%=submit_action_url%>" class="form_tight">
Line 1047... Line 1047...
1047
               </tr>
1047
               </tr>
1048
<%If parRtag_id <> "" Then%>
1048
<%If parRtag_id <> "" Then%>
1049
               <tr>
1049
               <tr>
1050
                  <td nowrap>Sync to S3?<%=Quick_Help ( "s3Sync" )%></td>
1050
                  <td nowrap>Sync to S3?<%=Quick_Help ( "s3Sync" )%></td>
1051
                  <%
1051
                  <%
1052
				  Dim FRs3SyncDisabled
1052
                  Dim FRs3SyncDisabled
1053
                  FRs3SyncYES = ""
1053
                  FRs3SyncYES = ""
1054
                  FRs3SyncNO = ""
1054
                  FRs3SyncNO = ""
1055
 
1055
 
1056
                  If objForm.IsPostBack Then
1056
                  If objForm.IsPostBack Then
1057
                     If Request("FRs3Sync") = "1" Then
1057
                     If Request("FRs3Sync") = "1" Then
Line 1059... Line 1059...
1059
                     Else
1059
                     Else
1060
                        FRs3SyncNO = "checked"
1060
                        FRs3SyncNO = "checked"
1061
                     End If
1061
                     End If
1062
 
1062
 
1063
                  Else
1063
                  Else
1064
					 If objFormCollector.Item("s3Sync") = "" Then
1064
                     If objFormCollector.Item("s3Sync") = "" Then
1065
						FRs3SyncDisabled = "disabled"
1065
                        FRs3SyncDisabled = "disabled"
1066
					 Else
1066
                     Else
1067
						 If objFormCollector.Item("s3Sync") = enumDB_YES Then
1067
                         If objFormCollector.Item("s3Sync") = enumDB_YES Then
1068
							FRs3SyncYES = "checked"
1068
                            FRs3SyncYES = "checked"
1069
						 Else
1069
                         Else
1070
							FRs3SyncNO = "checked"
1070
                            FRs3SyncNO = "checked"
1071
						 End If
1071
                         End If
1072
					 End If
1072
                     End If
1073
 
1073
 
1074
                  End If
1074
                  End If
1075
                  %>
1075
                  %>
1076
                  <td nowrap>Yes<input name="FRs3Sync" type="radio" value="1" <%=FRs3SyncDisabled%> <%=FRs3SyncYES%>>
1076
                  <td nowrap>Yes<input name="FRs3Sync" type="radio" value="1" <%=FRs3SyncDisabled%> <%=FRs3SyncYES%>>
1077
                  &nbsp;&nbsp;No<input name="FRs3Sync" type="radio" value="0" <%=FRs3SyncDisabled%> <%=FRs3SyncNO%>></td>
1077
                  &nbsp;&nbsp;No<input name="FRs3Sync" type="radio" value="0" <%=FRs3SyncDisabled%> <%=FRs3SyncNO%>></td>
Line 1079... Line 1079...
1079
<%End If%>
1079
<%End If%>
1080
               <tr>
1080
               <tr>
1081
                  <td nowrap>Version Control System</td>
1081
                  <td nowrap>Version Control System</td>
1082
                  <td nowrap>
1082
                  <td nowrap>
1083
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
1083
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
1084
                     <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) OR  (objFormCollector.Item("vcs_tag") = enum_VCS_GIT_TAG) Then%>
1084
                     <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
1085
                        <span class='err_alert'>[Not fully Supported]</span>
1085
                        <span class='err_alert'>[Not fully Supported]</span>
1086
                     <%End If%>
1086
                     <%End If%>
1087
                  </td>
1087
                  </td>
1088
               </tr>
1088
               </tr>
1089
 
1089
 
Line 1218... Line 1218...
1218
                     <td nowrap>
1218
                     <td nowrap>
1219
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateGitPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
1219
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateGitPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
1220
                        <table>
1220
                        <table>
1221
                            <tr>
1221
                            <tr>
1222
                            <td>Example:</td>
1222
                            <td>Example:</td>
1223
                            <td>VIXGIT0X/RepoName/<%=objFormCollector.Item("pkg_name")%>/master</td>
1223
                            <td>VIXGIT0X/RepoName/<%=objFormCollector.Item("pkg_name")%></td>
1224
                            </tr>
1224
                            </tr>
1225
                        </table>
1225
                        </table>
1226
                        <span class='val_err' id=gitPathErr style='display:none'></span>
1226
                        <span class='val_err' id=gitPathErr style='display:none'></span>
1227
                     </td>
1227
                     </td>
1228
                  </tr>
1228
                  </tr>
Line 1265... Line 1265...
1265
                        %>
1265
                        %>
1266
 
1266
 
1267
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="120" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateGitTag();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
1267
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="120" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateGitTag();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
1268
                        <%
1268
                        <%
1269
                        If objFormCollector.Item("build_type") = "M" Then
1269
                        If objFormCollector.Item("build_type") = "M" Then
1270
                            sDefaultLabel = sDefaultLabel & "1234567"
1270
                            sDefaultLabel = sDefaultLabel
1271
                        Else
1271
                        Else
1272
                            sDefaultLabel = sDefaultLabel & "1234567"
1272
                            sDefaultLabel = sDefaultLabel
1273
                        End If
1273
                        End If
1274
                        %>
1274
                        %>
1275
                        <table>
1275
                        <table>
1276
                            <tr>
1276
                            <tr>
1277
                            <td>Example:</td>
1277
                            <td>Example:</td>
Line 1415... Line 1415...
1415
               </tr>
1415
               </tr>
1416
            </table>
1416
            </table>
1417
         </td>
1417
         </td>
1418
      </tr>
1418
      </tr>
1419
      <tr>
1419
      <tr>
1420
		 <td align="right">
1420
         <td align="right">
1421
			<input id="btn_submit" type="submit" name="btn" value="Submit" <%If pageIsEditable Then%>class="form_btn_comp"<%Else%>disabled class="form_btn_comp_disabled"<%End If%>>
1421
            <input id="btn_submit" type="submit" name="btn" value="Submit" <%If pageIsEditable Then%>class="form_btn_comp"<%Else%>disabled class="form_btn_comp_disabled"<%End If%>>
1422
			<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
1422
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
1423
		 </td>
1423
         </td>
1424
      </tr>
1424
      </tr>
1425
   </table>
1425
   </table>
1426
   <input type="hidden" name="pv_id"   id="pv_id"   value="<%=parPv_id%>">
1426
   <input type="hidden" name="pv_id"   id="pv_id"   value="<%=parPv_id%>">
1427
   <input type="hidden" name="rtag_id" id="rtag_id" value="<%=parRtag_id%>">
1427
   <input type="hidden" name="rtag_id" id="rtag_id" value="<%=parRtag_id%>">
1428
   <input type="hidden" name="vcs_tag" id="vcs_tag" value="<%=parVCSTag%>">
1428
   <input type="hidden" name="vcs_tag" id="vcs_tag" value="<%=parVCSTag%>">