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

Platform.sh support #73

Open
benvoynick opened this issue Jan 25, 2022 · 1 comment
Open

Platform.sh support #73

benvoynick opened this issue Jan 25, 2022 · 1 comment

Comments

@benvoynick
Copy link

Details:

Environment variables
Vars are listed at https://docs.platform.sh/development/variables.html#use-platformsh-provided-variables

I believe PLATFORM_OUTPUT_DIR might be the variable to check for whether to consider the environment a CI. P.sh reuses the same containers, and that is the only variable that is available in builds only (and not afterwards at runtime).

That said, PLATFORM_TREE_ID is the appropriate variable for a build ID.

@gilzow
Copy link

gilzow commented Jan 25, 2022

You are correct in that PLATFORM_OUTPUT_DIR is one environmental variable that is not available during deploy/runtime but is available during the build stage. The other one is PLATFORM_CACHE_DIR. However, both of these environmental variables are also available during a source operation.

I'm not sure how/if that affects your code. If you need to differentiate between a build stage and a source operation, a source operation stage will have GIT_COMMITTER_NAME, GIT_AUTHOR_NAME, GIT_COMMITTER_EMAIL, and GIT_AUTHOR_EMAIL environmental variables set and available and those are not available in other stages.

You might also include https://community.platform.sh/. It contains numerous community-provided guides/tutorials/how-tos that don't fit into the documentation.

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

2 participants