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
noahingh merged 5 commits into
mainfrom
feat/envsubst
Sep 14, 2021
Merged

Evaluate the env field#100
noahingh merged 5 commits into
mainfrom
feat/envsubst

Conversation

@noahingh

@noahinghnoahingh commented Sep 14, 2021

Copy link
Copy Markdown
Member

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 threadvo/config.go
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
Copy Markdown
MemberAuthor

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.

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

@noahingh