File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818 "context"
1919 "dagger/ci/internal/dagger"
2020 "fmt"
21+ "sync"
2122)
2223
2324type 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+ }
You can’t perform that action at this time.
0 commit comments