Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to override config properties via command line arguments #61

Closed
guylabs opened this issue Sep 28, 2012 · 3 comments
Closed

Ability to override config properties via command line arguments #61

guylabs opened this issue Sep 28, 2012 · 3 comments

Comments

@guylabs
Copy link

guylabs commented Sep 28, 2012

Hi,

we have a CI environment where we run multiple projects and each one has e webapp running for the tests. Now we have some kind of logic which searches a free port to start the server and tell the application on which port the server is running. Now i just found out that I could override the port setting in the config by starting testacular with this command line argument:

--port=1234

But I can't create objects in the command line to use for example for the proxies property. Is there a possibility to add them via command line arguments or system properties ?

Thanks and regards,

Guy

@vojtajina
Copy link
Contributor

Can't you have a separate config file per "project" with static port numbers ? That's what we do on Angular CI server.

Anyway, the whole testacular.conf.js is executed javascript, so you could for instance use ENV variable:

port = process.env.MY_PORT;
proxies = {
  '/web/': 'http://localhost:' + port + '/'
};

And then:

MY_PORT=1111 testacular start

Besides that, it would be possible to configure proxies through CLI options, doing something like this:

testacular start --proxies./web/=http://localhost:1111/

But I'm not super crazy about it :-D

@guylabs
Copy link
Author

guylabs commented Oct 2, 2012

The problem is that we evaluate the port at build time and we set it dynamically. But the last hint with the CLI option worked. I tried it already but I didn't know the notation of a json object as a command line parameter ;).

Thanks for your fast answer!

PS: I think we can close the issue now ;).

@hparra
Copy link

hparra commented Nov 3, 2012

I still vote for this feature.

dam-ien added a commit to dam-ien/karma that referenced this issue Aug 3, 2016
…ML URL encoded characters. Karma fails on Jenkins when it checks out branches containing '/' as it converts it to '%2F'. Fixes errors seen on karma-runner#1751, karma-runner#61.
dam-ien added a commit to dam-ien/karma that referenced this issue Aug 3, 2016
…ML URL encoded characters. Karma fails on Jenkins when it checks out branches containing '/' as it converts it to '%2F'. Fixes errors seen on karma-runner#1751, karma-runner#61.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants