on 11-11-2013 2:17 PM
Hello
We are developing a project using a framework that is available by the portal out of the box.
The developers are using SVN for version control and every time they need to deploy to the portal they send changes and we manually uploading their resources under the dist folder of a portal DC in NWDI so that we could deploy this to the portal and transport it using NWDI.
This is obviously time consuming process and I'm looking of ways to simplify / automate this and I was thinking about using the DTR shell tool.
I have already setup the shell to run from NWDS and I'm now thinking of the quickest way to achieve this, so suppose I have a local folder full of resources that I want to upload and check-in to NWDI to a specific location of a certain DC, what would be the best way to achieve this?
Hello Roy,
have a look at the guide about the DTR console:
http://help.sap.com/saphelp_nw73/helpdata/en/49/12b42a9ba4105ee10000000a42189d/frameset.htm
Pay attention to the command script you can use to execute set of commands located inside a text file written by you.
I hope this helps.
Best Regards,
Ervin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ervin
Interesting, I never noticed this command before.
Is there a reference to see an example of a script file such as this?
More specifically I am interested in one that:
1. Creates and activity
2. Checkout a DC
3. Uploads files from local machine using this activity
4. Checkin the avtivity
Any ideas...?
Roy
Hi Roy,
one example that crosses immediately my mind is when you do replication.
See how to use the script command for that scenario, then you can implement your own accordingly.
http://help.sap.com/saphelp_nw73/helpdata/en/46/5d032c1e661cbee10000000a11466f/content.htm
I hope this helps.
Regards,
Ervin
Maybe the indentation is not too nice in the guide I just sent you, take a look at another version of this document where the indentation looks much nicer:
http://help.sap.com/saphelp_nw70/helpdata/en/46/5d032c1e661cbee10000000a11466f/frameset.htm
Hello Roy,
activation is possible using the CBS tool:
Best Regards,
Ervin
OK.
I have copied the DTR console from the server as per this help page: http://help.sap.com/saphelp_nw70/helpdata/en/46/652a652a717183e10000000a114a6b/frameset.htm
But when I run it it terminates with an exception (see below)
Any ideas?
Roy
connect sapddswd.bpweb.bp.com:8037 coher0 welcome1 coher0
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\coher0>cd C:\Users\coher0\Desktop\com.sap.dtr.console
C:\Users\coher0\Desktop\com.sap.dtr.console>run.bat
C:\Users\coher0\Desktop\com.sap.dtr.console>java -Dhttp.readtimeout=0 -cp C:\Use
rs\coher0\Desktop\com.sap.dtr.console\sap.com~tc~dtr~console~all.jar;C:\Users\co
her0\Desktop\com.sap.dtr.console\sap.com~tc~dtr~cmdlineappfwk~all.jar;C:\Users\c
oher0\Desktop\com.sap.dtr.console\antlr-runtime-3.0.1.jar com.sap.dtr.console.DT
RConsoleApplication
Exception in thread "main" java.lang.RuntimeException: com.sap.dtr.cmdlinefwk.Co
mmandLineException: Validation of the examples for the command "Discard" failed.
The example "discard -col -cip /collision/dce6250e4fd911dc81e400199905d653_3_b4c
044e04fd511dccef000199905d653_b4c044d84fd511dca33b00199905d653_open_PredSucc" co
ntains a command that is not valid against its specification.
at com.sap.dtr.console.DTRConsoleApplication.registerCommandSpecs(DTRCon
soleApplication.java:207)
at com.sap.dtr.console.DTRConsoleApplication.initialize(DTRConsoleApplic
ation.java:156)
at com.sap.dtr.console.DTRConsoleApplication.<init>(DTRConsoleApplicatio
n.java:137)
at com.sap.dtr.console.DTRConsoleApplication.main(DTRConsoleApplication.
java:311)
Caused by: com.sap.dtr.cmdlinefwk.CommandLineException: Validation of the exampl
es for the command "Discard" failed.
The example "discard -col -cip /collision/dce6250e4fd911dc81e400199905d653_3_b4c
044e04fd511dccef000199905d653_b4c044d84fd511dca33b00199905d653_open_PredSucc" co
ntains a command that is not valid against its specification.
at com.sap.dtr.cmdlinefwk.CommandLineApplication.addCommandLineSpec(Comm
andLineApplication.java:115)
at com.sap.dtr.console.DTRConsoleApplication.registerCommandSpecs(DTRCon
soleApplication.java:204)
... 3 more
Caused by: com.sap.dtr.cmdlinefwk.CommandNotSupportedException: Command 'discard
' is not supported
at com.sap.dtr.cmdlinefwk.support.parser.DefaultCommandLineParser.parse(
DefaultCommandLineParser.java:57)
at com.sap.dtr.cmdlinefwk.CommandLineApplication.addCommandLineSpec(Comm
andLineApplication.java:107)
... 4 more
C:\Users\coher0\Desktop\com.sap.dtr.console>^X
Hi,
how did you resolve the DTR console startup problem?
I ask it because this might come in handy for other customers in future.
Regarding the put command I think you can again use the script command to execute multiple commands.
I provide you some more info on this command:
Examples
Put on versioned file
Checks out the versioned file "/ws/dir/wsp/dir/a.txt" in an activity that is
implicitly created and stored in the variable $act. Then with the put command
the content of the local file "c:/dir/a.txt" is uploaded to the working resource
of the file, which is available in the variable $wr. To make the change become
active in the workspace the activity is checked in afterwards.
checkout /ws/dir/wsp/dir/a.txt
put c:/dir/a.txt
$wr
checkin $act
Put on versioned file with checkout-in-place
Same as example 1. Automatically creates an activity in which the versioned
file "/ws/dir/wsp/dir/a.txt" is checked out. Then uploads the content of the
local file "c:/dir/a.txt" to the working resource of the file and afterwards
automatically checks in the activity that was implictly created to make the
change become active in the workspace. If the remote file does not exist it is
created.
put -cip c:/dir/a.txt /ws/dir/wsp/dir/a.txt
Upload a new folder hierarchy
Automatically creates an activity in which the versioned collection
"/ws/dir/wsp/dir" is checked out. Then uploads the local folder "c:/dir/subdir"
to the working resource of the collection and afterwards automatically checks in
the activity that was implictly created to make the change become active in the
workspace. Since no remote resource was specified the uploaded folder will
remotely be available as "/ws/dir/wsp/dir/subdir" (The remote path is created
out of the current session path "/ws/dir/wsp/dir" and the name of the uploaded
folder "subdir").
/ws/dir/wsp/dir> put -cip c:/dir/subdir
Put on non-versioned file
Uploads the content of the local file "c:/dir/a.txt" to the non-versioned
file "/ws/dir/a.txt". If the remote file does not exist it is created.
put c:/dir/a.txt /ws/dir/a.txt
Regards,
Ervin
Hi,
first you need to connect to the dtr this way:
connect <host>:<port> <user> <password> <session>
(session can be an arbitary name,e.g. ses1).
Then you can use ls to list the workspace, e.g.:
ses1:/>ls
Mon, 9 Jan 2012 17:05:25 GMT .
Fri, 22 Nov 2013 16:57:52 GMT system-tools/
Mon, 9 Jan 2012 17:05:25 GMT ws/
Then you can use the cd to navigate, e.g.
ses1:/>cd ws
ses1:/ws>cd DEMO/sap.com_SAPNWDEMO
Use the ma command to create activity, e.g.:
ses1:/ws/DEMO/sap.com_SAPNWDEMO/>ma abc
Created activity /act/abc
Use the la command to list all activities.
Regards,
Ervin
TThanks Eric I can create an activity already the thing is that in NWDS you see the activity from the relevant track but when creating them via the console I can see them in the DTR web view but no where in NWDS. Any idea why?
also, I don't see an option to add multiple files or a completed folder to an activity. If I want to checkin a local project with 100 files other than one put per resource. Any ideas...?
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.