app/models/deploy.rb
# commands and deploy groups can change via many different paths,
# so we validate once a user actually tries to execute the command
commands and deploy groups can change via many different paths,
so we validate once a user actually tries to execute the command
commands and deploy groups can change via many different paths so we validate once a user actually tries to execute the command
def validate_stage_uses_deploy_groups_properly
    return unless DeployGroup.enabled?
    return if skip_deploy_group_validation
    return if stage.deploy_groups.any?
    return unless stage.script.include?("$DEPLOY_GROUPS")
    errors.add(
      :stage,
      "contains at least one command using the $DEPLOY_GROUPS environment variable," \
      " but there are no Deploy Groups associated with this stage."
    )
  end
def validate_stage_uses_deploy_groups_properly return unless DeployGroup . enabled? return if skip_deploy_group_validation return if stage . deploy_groups . any? return unless stage . script . include? ( "$DEPLOY_GROUPS" ) errors . add ( :stage , "contains at least one command using the $DEPLOY_GROUPS environment variable," " but there are no Deploy Groups associated with this stage." ) end
commands and deploy groups can change via many different paths,
so we validate once a user actually tries to execute the command
commands and deploy groups can change via many different paths so we validate once a user actually tries to execute the command