Skip to content

use sensible defaults for the git provider when no data is found #33

@jgangemi

Description

@jgangemi
INFO[0147] [stage=deploy] ERRO took 2m25.238s
INFO[0147] [stage=deploy] Error: Invalid template interpolation value
INFO[0147] [stage=deploy] 
INFO[0147] [stage=deploy]   on /builds/xxx/.togomak/pipelines/tmp/e29e2611-1ea6-4fa4-b002-79788588f2302885812944/deploy/publish.hcl line 81, in stage "echo":
INFO[0147] [stage=deploy]   79:   script = <<EOT
INFO[0147] [stage=deploy]   80:   echo "branch=${data.env.branch.value}"
INFO[0147] [stage=deploy]   81:   echo "commits_since_last_tag=${data.git.this.commits_since_last_tag}"
INFO[0147] [stage=deploy]   82:   echo "last_tag=${data.git.this.last_tag}"
INFO[0147] [stage=deploy]   83:   echo "timestamp=${local.timestamp}"
INFO[0147] [stage=deploy]   84:   echo "gcp: $GOOGLE_APPLICATION_CREDENTIALS"
INFO[0147] [stage=deploy]   85:   EOT
INFO[0147] [stage=deploy] 
INFO[0147] [stage=deploy] with data.git.this.commits_since_last_tag set to null.
INFO[0147] [stage=deploy] 
INFO[0147] [stage=deploy] The expression result is null. Cannot include a null value in a string template.
INFO[0147] [stage=deploy] 
ERRO[0147] <nil>: failed to run command (stage.deploy); exit status 1

if fields don't exist, return sensible defaults instead of null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions