Forum Discussion
nicklott
8 years agoOccasional Contributor
Thanks for responding! We use Octo as opposed to Jenkins. I know there's a place in Octo where you can set the environment that you want to deploy to. What we're trying to do is capture the environment from Octo, and set the environment variable in the ProjectSuite to be whatever that Octo environment is, so that the tests kick off when we deploy. It's virtually the same thing that you're describing, except we're trying to use Octo to do it instead of Jenkins.
Could you share an example of the TestComplete script that you guys are using to pull the environment value down from Jenkins?
bo_roop
8 years agoContributor
Sample Code:
ServerURL = aqEnvironment["GetEnvironmentVariable"]("TC_ServerURL") // Set the TestComplete variable if the value isn't blank. if(ServerURL != "") { Log["Message"]("The Windows TC_ServerURL Environment Variable = " + ServerURL); // Save the URL to the projectSuite variable ServerURL ProjectSuite["Variables"]["ServerURL"] = ServerURL } else { Log["Warning"]("The ServerURL environment variable is blank. We'll use whatever is there currently.") }
Enjoy!