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 {}
@@ -158,3 +159,36 @@ func (m *Ci) Ci(ctx context.Context, dir *dagger.Directory) *Results {
158159 Image : image ,
159160 }
160161}
162+
163+ // Executes all the steps and returns a Results object
164+ func (m * Ci ) CiIntegration (ctx context.Context , dir * dagger.Directory ) * Results {
165+ var wg sync.WaitGroup
166+ wg .Add (3 )
167+
168+ var lintOutput , _ = func () (string , error ) {
169+ defer wg .Done ()
170+ return "empty" , error (nil ) //m.Lint(ctx, dir)
171+ }()
172+
173+ var securityScan = func () * dagger.File {
174+ defer wg .Done ()
175+ return m .Sast (ctx , dir )
176+ }()
177+
178+ //vulnerabilityScan := m.Vulnscan(ctx, m.SbomBuild(ctx, dir))
179+
180+ var image = func () * dagger.Container {
181+ defer wg .Done ()
182+ return m .Build (ctx , dir )
183+ }()
184+
185+ // This Blocks the execution until its counter become 0
186+ wg .Wait ()
187+
188+ return & Results {
189+ LintOutput : lintOutput ,
190+ SecurityScan : securityScan ,
191+ // VulnerabilityScan: vulnerabilityScan,
192+ Image : image ,
193+ }
194+ }
You can’t perform that action at this time.
0 commit comments