Subversion Repositories DevTools

Rev

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

Rev 4482 Rev 5097
Line 14... Line 14...
14
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/formating.asp"-->
18
<!--#include file="common/formating.asp"-->
-
 
19
<!--#include file="common/release_changed.asp"-->
19
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="common/base64encode.vbs"></SCRIPT> 
20
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="common/base64encode.vbs"></SCRIPT> 
20
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="class/classaspJSON.vbs"></SCRIPT> 
21
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="class/classaspJSON.vbs"></SCRIPT> 
21
<%
22
<%
22
'------------ Variable Definition -------------
23
'------------ Variable Definition -------------
23
Dim parOpr, newitem
24
Dim parOpr, newitem
Line 51... Line 52...
51
    Call sendWshEmail
52
    Call sendWshEmail
52
ElseIf (parOpr = "remExecTest") Then
53
ElseIf (parOpr = "remExecTest") Then
53
    Call remExec
54
    Call remExec
54
ElseIf (parOpr = "pkgAccessTest") Then
55
ElseIf (parOpr = "pkgAccessTest") Then
55
    Call pkgAccess
56
    Call pkgAccess
-
 
57
ElseIf (parOpr = "ddpTest") Then
-
 
58
    Call ddpTest
-
 
59
 
56
Else
60
Else
57
    oJSON.data("emsgSummary") = "Unknown operation requested:" & parOpr
61
    oJSON.data("emsgSummary") = "Unknown operation requested:" & parOpr
58
End If
62
End If
59
 
63
 
60
'
64
'
Line 77... Line 81...
77
next
81
next
78
 
82
 
79
'Return the object
83
'Return the object
80
Response.Write oJSON.JSONoutput()
84
Response.Write oJSON.JSONoutput()
81
 
85
 
-
 
86
Sub ddpTest
-
 
87
    Dim rv
-
 
88
        Dim objRC: Set objRC = New ReleaseChanged
-
 
89
        Call objRC.Run_ReleaseChanged(62884,1042919,enumRELEASE_CHANGE_MODE_PKG_ADDED, true)
-
 
90
        rv = objRC.last_resultCode
-
 
91
        Set objRC = Nothing
-
 
92
 
-
 
93
        If rv = 0 Then
-
 
94
            result = 0
-
 
95
        Else
-
 
96
            result = 1
-
 
97
            oJSON.data("emsgSummary") = "Error:("&rv&")"
-
 
98
        End If
-
 
99
 
-
 
100
End Sub
-
 
101
'-------------------------------------------------
-
 
102
' Function:    ddpTest
-
 
103
' Description:
-
 
104
' C:\WINDOWS\system32\cmd.exe" /c C:\clearcase\dpurdie_manager_suite\Release_Manager\scripts\bin\plink.exe -ssh -batch releasem@auperaarc01.vix.local -pw releasem "sudo ~/sbin/make_test_access;"
-
 
105
 
-
 
106
Sub ddpTest1
-
 
107
   Dim objWSH, rv, wCmdLine
-
 
108
   Dim plinkPath, plinkCmd, archiveServer, uname, upasswd, sudoCmd
-
 
109
    
-
 
110
      Dim sqry: sqry = "SELECT * FROM BUILD_SERVICE_CONFIG WHERE SERVICE='ARCHIVE SERVER'"
-
 
111
      Dim rsTemp
-
 
112
      Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )
-
 
113
      archiveServer = rsTemp("config")
-
 
114
      rsTemp.Close()
-
 
115
      Set rsTemp = Nothing
-
 
116
 
-
 
117
      Dim pArchive_Path : pArchive_Path = "dpkg_archive"
-
 
118
      Dim apkg_name     : apkg_name     = "pkg_name"
-
 
119
      Dim apkg_version  : apkg_version  = "pkg_version"
-
 
120
      Dim artag_id      : artag_id      = "rtag_id"
-
 
121
      Dim apkg_id       : apkg_id       = "pkg_id"
-
 
122
      Dim apv_id        : apv_id        = "pv_id"
-
 
123
      Dim aproj_id      : aproj_id      = "proj_id"
-
 
124
      Dim amode_id      : amode_id      = "mode_id"
-
 
125
 
-
 
126
      sudoCmd = "~/sbin/make_release_changed" &_
-
 
127
             " archive=" & pArchive_Path &_
-
 
128
             " pkg_name='\""" & apkg_name & "\""'" &_
-
 
129
             " pkg_version='\"""& apkg_version &"\""'" &_
-
 
130
             " rtag_id="& artag_id &_
-
 
131
             " pkg_id=" & apkg_id &_
-
 
132
             " pv_id="& apv_id &_
-
 
133
             " proj_id="& aproj_id &_
-
 
134
             " mode_id="& amode_id
-
 
135
 
-
 
136
       uname = "releasem"
-
 
137
       upasswd = "releasem"
-
 
138
       plinkPath = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Release_Manager\scripts\bin\plink.exe"
-
 
139
       plinkCmd =  "-ssh -batch " & uname & "@" & archiveServer & " -pw " & upasswd & " ""sudo " & sudoCmd & ";"""
-
 
140
       wCmdLine =  plinkPath & " " & plinkCmd
-
 
141
        
-
 
142
        Set objWSH = Server.CreateObject("WScript.Shell")
-
 
143
        rv = objWSH.Run (wCmdLine, 0, TRUE)
-
 
144
        Set objWSH = Nothing
-
 
145
        If rv = 105 Then
-
 
146
            result = 0
-
 
147
        Else
-
 
148
            result = 1
-
 
149
            oJSON.data("emsgSummary") = "Error:("&rv&")" & wCmdLine
-
 
150
        End If
-
 
151
End Sub
-
 
152
 
82
'-------------------------------------------------
153
'-------------------------------------------------
83
' Function:    zipFile
154
' Function:    zipFile
84
' Description: Test the File Zipping process
155
' Description: Test the File Zipping process
85
Sub zipFile
156
Sub zipFile
86
    '
157
    '