Skip to content

Commit

Permalink
pull env vars for cli (#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes authored Jul 12, 2024
1 parent 07f175f commit 3c3587f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/pkg/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/diggerhq/digger/libs/scheduler"
"github.com/diggerhq/digger/libs/spec"
"github.com/diggerhq/digger/libs/storage"
"github.com/samber/lo"
"log"
"os"
"time"
Expand Down Expand Up @@ -83,6 +84,11 @@ func RunSpec(
usage.ReportErrorAndExit(spec.VCS.Actor, fmt.Sprintf("could not get plan storage: %v", err), 8)
}

workflow := diggerConfig.Workflows[job.ProjectName]
stateEnvVars, commandEnvVars := digger_config.CollectTerraformEnvConfig(workflow.EnvVars)
job.StateEnvVars = lo.Assign(job.StateEnvVars, stateEnvVars)
job.CommandEnvVars = lo.Assign(job.CommandEnvVars, commandEnvVars)

jobs := []scheduler.Job{job}

fullRepoName := fmt.Sprintf("%v-%v", spec.VCS.RepoOwner, spec.VCS.RepoName)
Expand Down

0 comments on commit 3c3587f

Please sign in to comment.