Skip to content

Commit

Permalink
Merge pull request #183 from clarsonneur/predefault
Browse files Browse the repository at this point in the history
Fix plugins default not set before flow applied
  • Loading branch information
clarsonneur authored Jun 15, 2018
2 parents b6801ab + a909aa3 commit 14594e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions create.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func (a *Forj) Create() error {
return fmt.Errorf("Your Forjfile is having issues. %s Try to fix and retry.", err)
}

// Set plugin defaults for objects defined by plugins loaded.
if err := a.scanAndSetDefaults(a.f.DeployForjfile(), creds.Global); err != nil {
return fmt.Errorf("Unable to update. Global dispatch issue. %s", err)
}

// Identify deployment repositories from main Forjfile
if err := a.DefineDeployRepositories(a.f.DeployForjfile(), false); err != nil {
return fmt.Errorf("Issues to automatically add your deployment repositories. %s", err)
Expand Down
6 changes: 6 additions & 0 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func (a *Forj) Update() error {
return fmt.Errorf("Your Forjfile is having issues. %s Try to fix and retry", err)
}

// Set plugin defaults for objects defined by plugins loaded.
if err := a.scanAndSetDefaults(a.f.DeployForjfile(), creds.Global); err != nil {
return fmt.Errorf("Unable to update. Global dispatch issue. %s", err)
}

// Build in memory representation from source files loaded.
if err := a.f.BuildForjfileInMem(); err != nil {
return err
Expand Down Expand Up @@ -59,6 +64,7 @@ func (a *Forj) Update() error {

gotrace.Trace("Infra upstream selected: '%s'", a.w.Instance)


// Apply the flow to the inMemForjfile
if err := a.FlowApply(); err != nil {
return fmt.Errorf("Unable to apply flows. %s", err)
Expand Down

0 comments on commit 14594e9

Please sign in to comment.