Automatic Check-(In/Out) - starteam

Is it possible to setup a StarTeam repository that automatically checks in and checks out code? Would I have to write code that checks (in/out) through the command line, or is there an option in the software itself?

This can be done via the commandline tool (stcmd)
The command for checking in is stcmd ci and the command for checking out is stcmd co.
Here is the documentation:
http://documentation.microfocus.com/help/topic/com.borland.stcmdtools.doc/STARTEAM-57C20EC2-CLIENTCOMMANDLINEOPERATIONSJUMPOFF.html?cp=8_3_2
There is also an official forum for more general usage questions
ST Forum

Related

RPM Build, how to get the path where the RPM package been "rpm -ivh" at shell script running by '%post' macro

I'm a newbie in rpm build. and i did my best i can to describe the little complicated question with my amature english...
i have a script(.sh) with some code,what the script do is to setup the code,and it need some user input.
sadly i found out scripts running by rpm can not get user input.
and i know that's not right usage. i'm not trying to get user input
anymore.
my question is:
i'm now trying to get those input with a config file along with the rpm package,but i don't know how to get the rpm package path at the SPEC file macros or the script file running by SPEC file macros.
rpm packages are not supposed to "adapt" themselves to user input. I would recommend you to make sure the installation of the package is always the same. Once the package is installed, you can tell users how to configure the program.
Take git for example: it provides /etc/gitconfig which contains the default packaged configuration. Users can then make their changes to the configuration and save those in ~/.gitconfig. Thus the user configuration is separated from the packaged configuration, so you can keep updating git without losing your configuration.

Run a command before and after running an interactive command

I have a command say intr-cmd which opens an interactive console for web framework. But I need to run command cmd-a before and cmd-b after running the intr-cmd manually. These commands change some files for intr-cmd to run.
How can I code this in Bash such that I only have to run intr-cmd and these commands are run before and after it.
Edit:
Some explanation
intr-cmd opens an interactive console but it first reads a file of currently installed plugins to load them. But there is a plugin which is installed on production but is not working on the local environment and it is not necessary for my work. but the plugins file is committed into the git. so I have to comment on the plugin then run the intr-cmd and then uncomment that line in the file.
I want to automate this step so that it does not accidentally get committed to the git.
You can create a function intr-cmd, which replaces the general intr-cmd command, as explained here.
I should like like:
intr-cmd()
{
cmd-a
/path/intr-cmd
cmd-b
}
(Obviously you need to fill in the right path.)
I tried to flag your question as a duplicate, but as the link refers to another StackExchange forum, this wasn't allowed, hence this answer.
In your case, instead of changing intr-cmd each time you need it, you could create a git branch (possibly in a specific clone of your git repo) for your testing environment with a modified version of intr-cmd, and/or a modified version of the plugin list.

Hybris - Trigger update process by command line

With Hybris you need to do an 'update running system', when updating platform code and certain data / *.xml files has changed.
This is a manual process and for that it doesn't really fit into a CI environment.
There are 2 options, initialise or update. But both look like it can't be triggered from the command line / bash
https://stackoverflow.com/a/29981777/2750476
I wonder if anyone knows the command line for triggering the update process (for updating the type system definitions)
Or did anyone found another solution for continuously updating a hybris platform.
You can use the ant target 'updatesystem' :
updatesystem Runs an update system of the
specified tenant in stand-alone mode, using hybris Administration
Console default settings or the configuration from a given file.
Syntax: ant updatesystem [-Dtenant=tenantID -DdryRun=true|false
-DtypeSystemOnly=true|false -DconfigFile=PATH_TO_CONFIG_FILE]
Run below command from your command prompt
ant updatesystem -Dtenant=master -DdryRun=false -DtypeSystemOnly=true

Jekyll private deployment?

I have created jekyll site. Regarding the deployment I don't want to host on github pages. To host private domain I came know from documentation to copy the all files from _site folder. That's all wicked.
Question:
Each time I add new blog post, I am running cmd>jekyll build then I am copying newly created html to hosted domain. Is there any easy way to update without compiling each time ?
The reason, Why I am asking is because it will updated by non technical person
Thanks for the help!!
If you don't want to use GitHub Pages, AFAIK there's no other way than to compile your site each time you make a change.
But of course you can script/automate as much as possible.
That's what I do with my own blog as well. I'm hosting it on my own webspace instead of GitHub Pages, so I need to do these steps for each update:
Compile on local machine
Upload via FTP
I can do this with a single click (okay, a single double-click).
Note: I'm on Windows, so the following solution is for Windows.
But if you're using Linux/MacOS/whatever, of course you can use the tools given there to build something similar.
I'm using a batch file (the Windows equivalent to a shell script) to compile my site and then call WinSCP, a free command-line FTP client.
WinSCP allows me to store session configurations, so I saved the connection to my server there once.
Because of this, I didn't want to commit WinSCP to my (public) repository, so my script expects WinSCP in the parent folder.
The batch file looks like this:
call jekyll build
echo If the build succeeded, press RETURN to upload!
pause
set uploadpath=%~dp0\_site
%~dp0\..\winscp.com /script=build-upload.txt /xmllog=build-upload.log
pause
The first parameter in the WinSCP call (/script=build-upload.txt) specifies the script file which contains the actual WinSCP commands
This is in the script file:
option batch abort
option confirm off
open blog
synchronize remote -delete "%uploadpath%"
close
exit
Some explanations:
%~dp0 (in the batch file) is the folder where the current batch file is
The set uploadpath=... line (in the batch file) saves the complete path to the generated site into an environment variable
The open blog line (in the script file) opens a connection to the pre-saved session configuration (which I named blog)
The synchronize remote ... line (in the script file) uses the synchronize command to sync from the local folder (saved in %uploadpath%, the environment variable from step 2) to the server.
IMO this solution is suitable for non-technical persons as well.
If the technical person in your case doesn't know how to use source control, you could even script committing & pushing, too.
There are a number of options available which are mentioned in the documentation: http://jekyllrb.com/docs/deployment-methods/
If you are using Git, I would recommend the Git Post-Receive Hook approach. It simply builds the site after the new code is received:
GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/myrepo
PUBLIC_WWW=/var/www/myrepo
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
Since you mentioned that it will be updated by a non-technical person, you might try something like rack-jekyll to automatically rebuild when new files are FTP'd.

Remote Run over Git-Svn

I am trying to get git-svn working with the teamcity remote run.
Anyone had success witht that ?
The main querstion here is whether that is actually possible.
Very late for an answer but nevertheless...
It's possible through remote run via commandline:
https://github.com/tendant/teamcity-git-svn
Script needs some updates to run on windows and I'll make a pull request to the author once I'm done fixing it.

Resources