How to use a environment variable to specify StarTeam Hostname in jenkins? - properties

We moved from Hudson to Jenkins and are using StarTeam for version control.
Now according to this site (https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=47480884) there are no global settings to setup StarTeam config.
So we have to specify the StarTeam configuration manually per project (Jenkins Home/[myProject]/configure 'Source Code Management Section')
Certain properties will always be the same like the HostName and the Port #. Now if we were ever to change the StarTeam server we will have to go to every single project and update it again.
Is there a way that we can specify this in a variable and use it in every project?
We tried to create a global environment var (Jenkins Home/Manage Jenkins/Configure System in the 'Global Properties' section).
And then under the project I am trying to configure I have
But when it is building it has difficulty connection to server ${STARTEAM_SERVER}. Have anyone used this before?

Sadly, the Starteam Jenkins plugin doesn’t understand parameterized values. You have to enter the IP or machine name instead.
Raise issue in Jenkins if you want but I don't think anyone is maintaining the Starteam plugin now.

I do not know if it works, but you can try a properties.file.
Content of the file which constains the script:
echo "STARTTEAM_SERVER=`MyServerNameGoesHere`"> env.properties
Path of the properties file:
env.properties
Source code Management (StartTeam)
echo"$STARTTEAM_SERVER"
Something like this works for the build, maybe here works too.

The answer from ABose was correct at the time, but might be worth another look. As of June 24, Borland closed a vote on their User Voice site. I believe they have finally taken an active role in contributing to the Jenkins plugin. Not sure if it is the same base or if they have written their own plugin. I was in conversation with them on this back in 2012, and it seems they may have gotten this going again. Here's a link: http://borland.uservoice.com/forums/143611-starteam-feature-requests/suggestions/2466059-expanded-build-tool-integrations.
You might try contacting Borland Support to find out more, and bring this feature suggestion to their attention.

Related

Modify IntelliJ custom properties in plugin tests

I develop plugin for IntelliJ. How can I modify custom properties for my plugin tests?
For example I want to set idea.max.content.load.filesize property to, say, 100MiB
These are system properties, so java.lang.System#setProperty
Depending on the properties you wish to modify, you may be able to use idea.properties, which contains the "default properties used to run IntelliJ IDEA" (per the link you provided). To modify the file, you go to Help > Edit Custom Properties... (see these steps).
For example, I used this approach to address a problem where my machine's security software was blocking plugins that used IntelliJ's default config directory (C:\Users<user>\AppData...).
This is the Windows OS default Application Data directory and is included in the paths scanned by the security software. By moving my idea.properties file to a different directory (c:/development/idea/caches/), not automatically scanned by the security software, my plugins were no longer blocked.
It's a different use case from what you're describing, but may be an approach worth looking into.

How do you see, set, and access variables in IntelliJ so that it can be passed from one plug-in to system properties?

Have a GitHub plug-in in IntelliJ. It knows the branch that is being worked on.
How would you get that branch name and add it into the system properties used when launching a server in the IDE?
This would be the equivalent of something like:
-Dthevariableforbranchnumber=${some.branch.number}
Support for variables in the parameters of the run/debug configurations was added recently, but there is no variable for the branch number.
There is also a related request to add branch to the live templates.
You are welcome to submit a new request at https://youtrack.jetbrains.com/issues/IDEA to provide a variable with the VCS branch for the run configuration.
Still not clear how it will work if the project has multiple VCS roots with different branches.

Can IntelliJ's Run/Debug configurations have prompts for input?

i was wondering, if i can configure a run configuration (like executing a ruby script on a deployment server) with a prompt for parameters on starting the config. Like it does for starting rake tasks from the 'Run Rake Task...' after selecting a task.
I couldn't find anything in the run/debug config view and with a google search.
I recently found out that this feature is in fact implemented, kind of.
On the Run/Debug Configurations page there is a checkbox at the bottom called "Show this page". If you check this, everytime you want to start the config, you get a somewhat smaller version of the config page, letting you edit for example arguments and stuff.
Serves me quite well and yes, it is not fully what i need, but it does the job.
It's not supported at the moment, related requests:
IDEA-152268 User prompted values in run configuration for "VM options" and "Program arguments"
IDEA-74031 Variables in command line parameters of run configuration

Configuring Play Framework 2.0 conf file in Intellij IDEA 14.1.4

I'm using Intellij IDEA 14.1.4 to develop a Play 2.x application and I was wondering if it's possible to somehow configure the conf file used by Play. I'd like to do something similar to what's described here: https://www.playframework.com/documentation/2.4.x/ProductionConfiguration.
$ /path/to/bin/<project-name> -Dconfig.file=/opt/conf/prod.conf
Is is possible to somehow set up a configuration in IDEA? I've looked at the configuration settings in IDEA, but I haven't found anything to specify the conf file. I've also tried the IDEA forum but unfortunately nobody has answered so far.
Here's the configuration window in IDEA:
You can edit the "run configuration" and specify additional parameters. Recent versions of IDEA use sbt to run Play Applications, which allows you to add additional parameters.
Simply add -Dconfig.resource=idea.conf and create an idea.conf-file containing the development configuration.

How to deploy a WAR onto an existing Tomcat 6 instance using Cargo?

I installed Tomcat using the Windows installer ages ago and it runs fine as a service on my development laptop. Now I'm mavenising my project and would like to use Cargo (or something similar) to deploy updated WARs onto the local Tomcat.
I can't find any fully worked examples of a POM file containing the right XML to do this and am struggling with the partial examples on the Cargo site.
Does anyone have a POM they can post or know of an example in the wild they can link to?
FWIW the error I get is this - though I've tried many different combinations of parameters:
Cannot create configuration. There's
no registered configuration for the
parameters (container [id =
[tomcat6x], type = [local]],
configuration type [existing]).
Actually there are no valid types
registered for this configuration.
Maybe you've made a mistake spelling
it?
I'm not even sure I know exactly what the error means by a "type" in the first place!
Update: I eventually found the m2eclipse WTP integration plugin, which frankly rocks!
Is there a reason to use just cargo?
You can try the maven tomcat plugin in order to deploy your wars to tomcat. See the instructions about configuration and deployment.