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

[ENHANCEMENT] Activate other profiles #308

Open
Leemur89 opened this issue Sep 12, 2024 · 2 comments
Open

[ENHANCEMENT] Activate other profiles #308

Leemur89 opened this issue Sep 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Leemur89
Copy link

Hello,

I'd like to be able to activate other profiles when selecting one. Note that this is different from the inherit
For instance let say I have the following profiles:

  • server_UAT
  • server_PREPROD
  • dryrun
  • ci

Both server_* profiles are setting some variables required for my tests to run (like URL and stuff)
Dryrun is to run tests in dryrun mode, but it still requires some var to avoid undefined variable errors (vars that can be set from above profiles)
And ci is enabled if in ci.

I would like something like:

[profiles.dryrun]
activate_profiles = ["server_UAT", "ci"]

Then in my pipeline I would call my job simply with robotcode -p dryrun robot

Why does inherit not work? For instance ci profile is only enabled in ci environment:

[profiles.ci]
enabled = { if = "environ.get('CI') == 'true'" }

With inherit my dryrun profile would also inherit that enable parameter. Here I want that the dryrun profile to be enabled no matter what, but not the ci

Recap

Command robotcode -p dryrun robot
Always activate the server_UAT profile
If from CI environment, also activate ci profile

Hope it is clear enough

Thanks

@Leemur89 Leemur89 added the enhancement New feature or request label Sep 12, 2024
@d-biehl
Copy link
Member

d-biehl commented Sep 16, 2024

good idea ;-)

@d-biehl d-biehl self-assigned this Sep 16, 2024
@Leemur89
Copy link
Author

Hi,

I've just found our about the existence of the possibility to select the desired profiles from the env variable ROBOTCODE_PROFILES, which actually perfectly covers my needs for CI (btw it lacks the tiny explanation of the separator, which I know now that is a space, in the documentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants