| Line 158... |
Line 158... |
| 158 |
OraDatabase.Parameters.Remove "USER_ID"
|
158 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 159 |
OraDatabase.Parameters.Remove "enumISSUES_STATE_IMPORTED"
|
159 |
OraDatabase.Parameters.Remove "enumISSUES_STATE_IMPORTED"
|
| 160 |
OraDatabase.Parameters.Remove "RETPV_ID"
|
160 |
OraDatabase.Parameters.Remove "RETPV_ID"
|
| 161 |
End Sub
|
161 |
End Sub
|
| 162 |
'---------------------------------------------------------------
|
162 |
'---------------------------------------------------------------
|
| 163 |
Sub Config_Spec (NNRtag_id, NNPv_id)
|
- |
|
| 164 |
OraDatabase.Parameters.Add "RTAG_ID", NNRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
- |
|
| 165 |
OraDatabase.Parameters.Add "PV_ID", NNPv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
- |
|
| 166 |
|
- |
|
| 167 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec.sql"), cint(0))
|
- |
|
| 168 |
|
- |
|
| 169 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
- |
|
| 170 |
OraDatabase.Parameters.Remove "PV_ID"
|
- |
|
| 171 |
End Sub
|
- |
|
| 172 |
'---------------------------------------------------------------
|
- |
|
| 173 |
Sub Config_Spec_Template (config_branch, pkg_label, src_path, pkg_name, release_name)
|
- |
|
| 174 |
|
- |
|
| 175 |
Dim myMail, LocalPath, Template
|
- |
|
| 176 |
|
- |
|
| 177 |
Set myMail=Server.CreateObject("Persits.MailSender")
|
- |
|
| 178 |
'LocalPath = Server.MapPath("docs\compareReleases_"&objAccessControl.UserName&".html")
|
- |
|
| 179 |
myMail.Host = SMTP_HOST
|
- |
|
| 180 |
myMail.Subject="Config Specs for package "& pkg_name &" in "& release_name &""
|
- |
|
| 181 |
myMail.From = ADMIN_EMAIL
|
- |
|
| 182 |
myMail.AddAddress objAccessControl.UserEmail
|
- |
|
| 183 |
' Attach the file
|
- |
|
| 184 |
'myMail.AddAttachment LocalPath
|
- |
|
| 185 |
Template = "element * CHECKEDOUT" & chr(13) & chr(10) & _
|
- |
|
| 186 |
"element .../lost+found -none" & chr(13) & chr(10) & _
|
- |
|
| 187 |
"element * .../"& config_branch &"/LATEST" & chr(13) & chr(10) & _
|
- |
|
| 188 |
"element * "& pkg_label &" -mkbranch "& config_branch &"" & chr(13) & chr(10) & _
|
- |
|
| 189 |
"element * /main/0 -mkbranch "& config_branch &"" & chr(13) & chr(10) & _
|
- |
|
| 190 |
"load "& src_path &""
|
- |
|
| 191 |
|
- |
|
| 192 |
myMail.Body = Template
|
- |
|
| 193 |
myMail.Send
|
- |
|
| 194 |
set myMail=nothing
|
- |
|
| 195 |
|
- |
|
| 196 |
|
- |
|
| 197 |
End Sub
|
- |
|
| 198 |
'---------------------------------------------------------------
|
- |
|
| 199 |
Function SanityCheck ( newVersion )
|
163 |
Function SanityCheck ( newVersion )
|
| 200 |
|
164 |
|
| 201 |
SanityCheck = False
|
165 |
SanityCheck = False
|
| 202 |
|
166 |
|
| 203 |
Dim objRegEx, objRegEx2
|
167 |
Dim objRegEx, objRegEx2
|
| Line 221... |
Line 185... |
| 221 |
Set objRegEx = Nothing
|
185 |
Set objRegEx = Nothing
|
| 222 |
Set objRegEx2 = Nothing
|
186 |
Set objRegEx2 = Nothing
|
| 223 |
End Function
|
187 |
End Function
|
| 224 |
|
188 |
|
| 225 |
'---------------------------------------------------------------
|
189 |
'---------------------------------------------------------------
|
| 226 |
Function VersionHasCotsExtension ( newVersion )
|
- |
|
| 227 |
VersionHasCotsExtension = False
|
- |
|
| 228 |
|
- |
|
| 229 |
Dim myRegExp
|
- |
|
| 230 |
Set myRegExp = New RegExp
|
- |
|
| 231 |
|
- |
|
| 232 |
myRegExp.Pattern = "\.cots$"
|
- |
|
| 233 |
|
- |
|
| 234 |
If myRegExp.Test( newVersion ) Then
|
- |
|
| 235 |
VersionHasCotsExtension = True
|
- |
|
| 236 |
End If
|
- |
|
| 237 |
|
- |
|
| 238 |
Set myRegExp = Nothing
|
- |
|
| 239 |
End Function
|
- |
|
| 240 |
|
- |
|
| 241 |
'---------------------------------------------------------------
|
- |
|
| 242 |
'Returns TRUE if the package is a COTS package and it has an ERG style
|
- |
|
| 243 |
'patch-build number that can be rippled by the build system.
|
- |
|
| 244 |
Function IsCotsPatch ( apv_id, achange_type)
|
- |
|
| 245 |
'--- get old package version ---
|
- |
|
| 246 |
Dim rsQry, Query_String
|
- |
|
| 247 |
Dim pkg_version_old
|
- |
|
| 248 |
Query_string = " SELECT pv.pkg_version FROM package_versions pv WHERE pv.pv_id = "& apv_id
|
- |
|
| 249 |
Set rsQry = OraDatabase.DbCreateDynaset(Query_String, cint(0))
|
- |
|
| 250 |
pkg_version_old = rsQry("pkg_version")
|
- |
|
| 251 |
rsQry.Close()
|
- |
|
| 252 |
Set rsQry = Nothing
|
- |
|
| 253 |
|
- |
|
| 254 |
Dim myRegExp
|
- |
|
| 255 |
Set myRegExp = New RegExp
|
- |
|
| 256 |
' Must be a patch and the version must have a patch build number, ie a dot and at least 4 digits before the cots extenstion.
|
- |
|
| 257 |
myRegExp.Pattern = "\.\d{4,}\.cots$"
|
- |
|
| 258 |
IsCotsPatch = myRegExp.Test( pkg_version_old ) and (achange_type = "P")
|
- |
|
| 259 |
Set myRegExp = Nothing
|
- |
|
| 260 |
End Function
|
- |
|
| 261 |
|
- |
|
| 262 |
'---------------------------------------------------------------
|
- |
|
| 263 |
'Returns a new subversion package source path string by replacing or adding
|
190 |
'Returns a new subversion package source path string by replacing or adding
|
| 264 |
'the specified label to the specified subversion package source path string.
|
191 |
'the specified label to the specified subversion package source path string.
|
| 265 |
Function GetNewSvnSrcPath(asrc_path, alabel)
|
192 |
Function GetNewSvnSrcPath(asrc_path, alabel)
|
| 266 |
Dim ssrc_base
|
193 |
Dim ssrc_base
|
| 267 |
Dim snew_src_path
|
194 |
Dim snew_src_path
|
| Line 349... |
Line 276... |
| 349 |
'----------------------- MAIN LINE ---------------------------
|
276 |
'----------------------- MAIN LINE ---------------------------
|
| 350 |
Dim rsQry, Query_String, Record_Count
|
277 |
Dim rsQry, Query_String, Record_Count
|
| 351 |
Dim versionToSanityCheck
|
278 |
Dim versionToSanityCheck
|
| 352 |
|
279 |
|
| 353 |
'--- Process submission ---
|
280 |
'--- Process submission ---
|
| 354 |
If Request("build_type") = "A" AND VersionHasCotsExtension(parFRnewver) AND NOT (IsCotsPatch(parOLDpv_id,Request("change_type"))) Then
|
- |
|
| 355 |
Call RaiseMsg ( enum_MSG_CANNOT_AUTO_GENERATE_COTS_PKG&"?rtag_id="& parRtag_id &"&pv_id="& parOLDpv_id &"", parFRnewver)
|
- |
|
| 356 |
Else
|
- |
|
| 357 |
If (parOLDpv_id <> "") AND ( (parFRnewver <> "") OR (parSetToPv_id <> "") ) AND (parRtag_id <> "") Then
|
281 |
If (parOLDpv_id <> "") AND ( (parFRnewver <> "") OR (parSetToPv_id <> "") ) AND (parRtag_id <> "") Then
|
| 358 |
' All mandatory parameters FOUND
|
282 |
' All mandatory parameters FOUND
|
| 359 |
|
283 |
|
| 360 |
If ( (parSetToPv_id <> "") OR SanityCheck(parFRnewver) ) Then
|
284 |
If ( (parSetToPv_id <> "") OR SanityCheck(parFRnewver) ) Then
|
| 361 |
|
285 |
|
| Line 390... |
Line 314... |
| 390 |
|
314 |
|
| 391 |
Else
|
315 |
Else
|
| 392 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
316 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
| 393 |
Response.write QSTR_All
|
317 |
Response.write QSTR_All
|
| 394 |
End If ' If (parOLDpv_id <> "") AND ( (parFRnewver <> "") OR (parSetToPv_id <> "") ) AND (parRtag_id <> "") Then
|
318 |
End If ' If (parOLDpv_id <> "") AND ( (parFRnewver <> "") OR (parSetToPv_id <> "") ) AND (parRtag_id <> "") Then
|
| 395 |
End If ' If Request("build_type") = "A" AND VersionHasCotsExtension( parFRnewver ) Then
|
- |
|
| 396 |
%>
|
319 |
%>
|
| 397 |
|
320 |
|
| 398 |
<!-- DESTRUCTOR ------->
|
321 |
<!-- DESTRUCTOR ------->
|
| 399 |
<!--#include file="common/destructor.asp"-->
|
322 |
<!--#include file="common/destructor.asp"-->
|