-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for Platform.sh #4
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
base: main
Are you sure you want to change the base?
Conversation
b833432
to
b793418
Compare
@davereid The code climate action won't be able to complete successfully because CC_TEST_REPORTER_ID will be empty since secrets aren't available to PRs coming from a forked repo. |
I made some changes to the workflow and also test coverage to help support overwriting other non-environment global variables, so this looks like it's passing. I'll give this some more review shortly! |
I would say we probably want the reverse, for getEnvironment() to return the type (development, test, live) and add a new getEnvironmentName() or getName() to return the user-defined environment name. We would want the settings-file-inclusion workflow to work consistently across hosting platforms to always include a |
…add getEnvironmentName() method Update based on PR feedback to separate environment type and name, ensuring consistent behavior across platforms. - Renamed getEnvironmentType() to getEnvironment() in PlatformSh for consistency - Added getEnvironmentName() method to return user-defined environment name - Updated tests to reflect the new API design
I've updated the PR based on the feedback provided:
@davereid Please let me know if you'd like any additional changes. |
Resolves #2
Platform.sh allows a user to create their own environments with arbitrary names. It also allows a user to define the type of environment that it is (development, staging, production). The names and types are available in environment variables. I opted to have
getEnvironment()
always return the user-defined environment name and introduce a newgetEnvironmentType()
method to the PlatformSh class to be used byisProduction()
and the like to get the type of environment.Neither Lando nor DDEV supply the environment type variable, so I defaulted to "local" when it is not present.