Skip to content

Commit

Permalink
fix: move secret pull inside executor (#60)
Browse files Browse the repository at this point in the history
* refactor: work directory set moved to compiler

* chore: update go-vela dependencies

* fix: properly update success status

* fix: move secret pull inside executor
  • Loading branch information
Neal authored Feb 17, 2020
1 parent 701594f commit 4da3d80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cmd/server/operate.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ func operate(q queue.Service, e map[int]executor.Engine, t time.Duration) (err e
}
}()

logger.Info("pulling secrets")
// pull secrets for the build on the executor
err = executor.PullSecret(ctx)
if err != nil {
logger.Errorf("unable to pull secrets: %v", err)
return err
}

defer func() {
// destroying the build on the executor
logger.Info("destroying build")
Expand Down
9 changes: 9 additions & 0 deletions executor/linux/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ func (c *client) CreateBuild(ctx context.Context) error {

c.build = b

// TODO: Pull this out into a the plan function for steps.
c.logger.Info("pulling secrets")
// pull secrets for the build
err = c.PullSecret(ctx)
if err != nil {
e = err
return fmt.Errorf("unable to pull secrets: %v", err)
}

// TODO: make this better
init := new(pipeline.Container)
if len(p.Steps) > 0 {
Expand Down

0 comments on commit 4da3d80

Please sign in to comment.