Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Evaluate the env field #100

Merged
merged 5 commits into from
Sep 14, 2021
Merged

Evaluate the env field #100

merged 5 commits into from
Sep 14, 2021

Conversation

noahingh
Copy link
Member

@noahingh noahingh commented Sep 14, 2021

Reserve some variables to assign values dynamically. And change into that the Env struct has pointer type for optional field.

Variables

  • GITPLOY_DEPLOY_TASK - returns 'deploy' when deploy, otherwise returns the empty string.
  • GITPLOY_ROLLBACK_TASK - returns 'rollback' when rollback, otherwise returns the empty string.
  • GITPLOY_IS_ROLLBACK - 'true' or 'false' for each context.

Comment on lines +21 to +26
Task *string `json:"task" yaml:"task"`
Description *string `json:"description" yaml:"description"`
AutoMerge *bool `json:"auto_merge" yaml:"auto_merge"`
RequiredContexts *[]string `json:"required_contexts,omitempty" yaml:"required_contexts"`
Payload *string `json:"payload" yaml:"payload"`
ProductionEnvironment *bool `json:"production_environment" yaml:"production_environment"`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change types into a pointer for optional fields.

@noahingh noahingh linked an issue Sep 14, 2021 that may be closed by this pull request
@noahingh noahingh merged commit 3fa3dbb into main Sep 14, 2021
@noahingh noahingh deleted the feat/envsubst branch September 14, 2021 14:06
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.

Support variables in payload
1 participant