Skip to content

Commit c47166b

Browse files
committed
Merge remote-tracking branch 'origin/dagger-ci' into dagger-ci
2 parents 5d0ea15 + 612828f commit c47166b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

ci/main.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"dagger/ci/internal/dagger"
2020
"fmt"
21+
"sync"
2122
)
2223

2324
type Ci struct{}
@@ -160,3 +161,36 @@ func (m *Ci) Ci(ctx context.Context, dir *dagger.Directory) *Results {
160161
Image: image,
161162
}
162163
}
164+
165+
// Executes all the steps and returns a Results object
166+
func (m *Ci) CiIntegration(ctx context.Context, dir *dagger.Directory) *Results {
167+
var wg sync.WaitGroup
168+
wg.Add(3)
169+
170+
var lintOutput, _ = func() (string, error) {
171+
defer wg.Done()
172+
return "empty", error(nil) //m.Lint(ctx, dir)
173+
}()
174+
175+
var securityScan = func() *dagger.File {
176+
defer wg.Done()
177+
return m.Sast(ctx, dir)
178+
}()
179+
180+
//vulnerabilityScan := m.Vulnscan(ctx, m.SbomBuild(ctx, dir))
181+
182+
var image = func() *dagger.Container {
183+
defer wg.Done()
184+
return m.Build(ctx, dir)
185+
}()
186+
187+
// This Blocks the execution until its counter become 0
188+
wg.Wait()
189+
190+
return &Results{
191+
LintOutput: lintOutput,
192+
SecurityScan: securityScan,
193+
// VulnerabilityScan: vulnerabilityScan,
194+
Image: image,
195+
}
196+
}

0 commit comments

Comments
 (0)