Subversion Repositories DevTools

Rev

Rev 5170 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5170 Rev 5172
Line 68... Line 68...
68
   rsTemp.Close
68
   rsTemp.Close
69
   Set rsTemp = Nothing
69
   Set rsTemp = Nothing
70
End Sub
70
End Sub
71
 
71
 
72
'-----------------------------------------------------------------------------------------------------------------
72
'-----------------------------------------------------------------------------------------------------------------
73
' Run script job, ReleaseChanged, of script, on_Make_Official.wsf for the specified list of package versions.
73
' Perform the Run_ReleaseChanged function on a list of packages
-
 
74
'
-
 
75
'   Args:   artag_id    - Release Identifier
74
' apv_id_list is a comma separated list of pv_id's
76
'           apv_id_list - Package Identifiers. A comma separated list of pv_id's
-
 
77
'           amode_id    - Mode of indication. One of enumRELEASE_CHANGE_MODE_*
-
 
78
'
75
Sub Run_ReleaseChanged_List(artag_id,apv_id_list,amode_id)
79
Sub Run_ReleaseChanged_List(artag_id,apv_id_list,amode_id)
76
  Dim pv_id, idArr
80
  Dim pv_id, idArr
77
 
81
 
78
  idArr = Split(apv_id_list,",")
82
  idArr = Split(apv_id_list,",")
79
  For Each pv_id in idArr
83
  For Each pv_id in idArr
Line 182... Line 186...
182
' Returns TRUE if the specified package is released
186
' Returns TRUE if the specified package is released
183
Function IsReleased (artagId, apvId)
187
Function IsReleased (artagId, apvId)
184
  IsReleased = (CInt(Get_Pkg_Area(artagId, apvId)) = CInt(enum_PKG_AREA_RELEASED))
188
  IsReleased = (CInt(Get_Pkg_Area(artagId, apvId)) = CInt(enum_PKG_AREA_RELEASED))
185
End Function
189
End Function
186
 
190
 
-
 
191
'-----------------------------------------------------------------------------------------------------------------
-
 
192
'   Test Access to the package server
-
 
193
'   Uses a dedicated script onthe target
-
 
194
'
-
 
195
Sub TestAccess(sMsg)
-
 
196
    Dim sudoCmd, plinkPath, plinkCmd, wCmdLine
-
 
197
 
-
 
198
    last_resultCode = -1
-
 
199
 
-
 
200
    ' Build up the command line to the target script
-
 
201
    ' Note: DoubleQuotes quotes will be escaped \"
-
 
202
    '       Double space will be process as <ret> for error reporting
-
 
203
    ' Chr(92) == \
-
 
204
    ' Chr(34) == "
-
 
205
    ' Chr(39) = '
-
 
206
    sudoCmd = "~/sbin/make_test_access " & sMsg
-
 
207
 
-
 
208
    Dim pkgCredentails, uname, upasswd
-
 
209
    pkgCredentails = split(PKGARCHIVE_CREDENTIALS,":")
-
 
210
    uname = pkgCredentails(0)
-
 
211
    upasswd = pkgCredentails(1)
-
 
212
 
-
 
213
    plinkPath = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Release_Manager\scripts\bin\plink.exe"
-
 
214
    plinkCmd =  "-ssh -batch " & uname & "@" & archive_server & " -pw " & upasswd & " ""sudo " & Replace(sudoCmd,Chr(34),Chr(92)&Chr(34)) & ";"""
-
 
215
    wCmdLine =  plinkPath & " " & plinkCmd
-
 
216
 
-
 
217
    Dim objWSH, rv
-
 
218
    Set objWSH = Server.CreateObject("WScript.Shell")
-
 
219
    rv = objWSH.Run (wCmdLine, 0, TRUE)
-
 
220
    Set objWSH = Nothing
-
 
221
 
-
 
222
    '
-
 
223
    '   Report Errors. Expecting a '55'
-
 
224
    '
-
 
225
    If  rv = 55 Then
-
 
226
        last_resultCode = 0
-
 
227
    Else
-
 
228
        last_resultCode = 1
-
 
229
        last_errorMsg = "Result Code: " & rv
-
 
230
    End If
-
 
231
 
-
 
232
End Sub
-
 
233
 
-
 
234
 
187
End Class
235
End Class
188
%>
236
%>