Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

[CDSK-935] Create a mechanism to change stylesheet between staging and production #363

Merged
merged 5 commits into from
May 16, 2018

Conversation

Mowinski
Copy link

@Mowinski Mowinski commented May 2, 2018

I've created a mechanism to switch between two different schemas in CSS.

On staging before starting katana must set KATANA_CONFIGURATION on staging value.

Staging:
staging

Production:
production

@Mowinski Mowinski self-assigned this May 2, 2018
@Mowinski Mowinski force-pushed the cdsk-935-environment-stylesheet branch from 710695c to 2bb30ac Compare May 2, 2018 08:56
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0002%) to 68.627% when pulling 2bb30ac on cdsk-935-environment-stylesheet into ed375ba on staging.

@coveralls
Copy link

coveralls commented May 2, 2018

Coverage Status

Coverage increased (+0.005%) to 68.632% when pulling 3ad19bb on cdsk-935-environment-stylesheet into ed375ba on staging.

@campos-ddc
Copy link
Member

campos-ddc commented May 2, 2018

I think we should use BuildmasterConfig to set this option, instead of environment variables.

We always start Katana through our buildmaster repo, that contains a master.cfg file:

https://ono.unity3d.com/katana/buildmaster/files/259aaeafa03ce798a02424326b380e3b8160ad5e/master.cfg

Notice that we set a bunch of variables (such as c['slaves'], c['title'], etc) and some of them are imported from a buildmaster_configuration` module. This module is where we keep all differences between staging and production (by keeping separate branches): https://gitlab.internal.unity3d.com/CDS/Katana/buildmaster_configuration

Ideally, this UI configuration should be in that repo, and be passed to Katana through master.cfg in buildmaster

@Mowinski
Copy link
Author

Mowinski commented May 7, 2018

I've added a new option to master.cfg file. You can set a different color schema by setting in config file this attribute c['environment'] = 'production' or c['environment'] = 'staging'. What do you think about this solution?

Should I add this field to master.cfg in buildmaster config repository?

@warcholprzemo
Copy link

warcholprzemo commented May 7, 2018

Do we get rid of the developer color? For me it's ok, just asking.
current_dev

EDIT: Ah, I've figured out that if we setup c['environment'] = '' in master.cfg we can see dev mode :-)
If we put c['environment'] = 'production' we can see production colors. Good job 👍

@campos-ddc
Copy link
Member

@Mowinski yes, that would be great

master.cfg in buildmaster should have a c['environment'] = serversetting.get_environment(), while the actual production/staging string should be set in this file:

https://gitlab.internal.unity3d.com/CDS/Katana/buildmaster_configuration/blob/master/buildmaster_configuration/serversettings.py

With different values for the staging and master (production) branches

@warcholprzemo warcholprzemo merged commit 163ea86 into staging May 16, 2018
@warcholprzemo warcholprzemo deleted the cdsk-935-environment-stylesheet branch May 16, 2018 05:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants