Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagger ci #221

Draft
wants to merge 48 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2c85610
build and lint using dagger
RetGal Nov 11, 2024
dabf839
add missing file, build from dockerfile
RetGal Nov 11, 2024
eb54851
Removes generated dagger.gen.go
buehlmann Nov 11, 2024
a54acc8
Call linter by dagger
buehlmann Nov 11, 2024
a02b492
Run lint on push to branch dagger-ci
buehlmann Nov 11, 2024
7d24052
Use dagger engine v0.14.0
buehlmann Nov 11, 2024
ac5d073
Add module to lint action
buehlmann Nov 11, 2024
98c2543
Set working directory
buehlmann Nov 11, 2024
e2e67ad
Add checkout action
buehlmann Nov 11, 2024
c494a78
fix lint step
RetGal Nov 11, 2024
e16d612
Add services for memcached and postgresql
buehlmann Nov 11, 2024
b6dfe30
add brakeman step
SylivanKenobi Nov 12, 2024
181c36a
add sbom creation and vulnerability scan
SylivanKenobi Nov 12, 2024
e9a1d13
Use memcached image
buehlmann Nov 12, 2024
3e49bdd
Implement integration testing
buehlmann Nov 12, 2024
e53efab
add comments, sdd SbomBuild method
SylivanKenobi Nov 12, 2024
ee5266e
Integrate dagger cloud
buehlmann Nov 12, 2024
535d644
add all step
RetGal Nov 12, 2024
05a1fb0
set repository for trivy
SylivanKenobi Nov 12, 2024
612828f
run steps in parallel
chrira Nov 12, 2024
5d0ea15
dedup trivy
RetGal Nov 12, 2024
c47166b
Merge remote-tracking branch 'origin/dagger-ci' into dagger-ci
RetGal Nov 12, 2024
3dc71f7
redup trivy
RetGal Nov 12, 2024
b988bf7
add dagger pipeline
chrira Nov 12, 2024
c65e996
readd ci-integration function
chrira Nov 12, 2024
e4c5270
export files, add docu
RetGal Nov 13, 2024
cf29681
integrate vulnerabilty scan
RetGal Nov 13, 2024
228aadb
fix dagger-lint
RetGal Nov 13, 2024
995a604
Fixes test job, excluding integration tests
buehlmann Nov 13, 2024
6111d05
Add job for test execution
buehlmann Nov 13, 2024
324ce47
Fix test function
buehlmann Nov 13, 2024
608ca56
Add test step to ci job
buehlmann Nov 13, 2024
ae0c986
Remove test reporter
buehlmann Nov 13, 2024
7525311
Remove terminal stmt
buehlmann Nov 13, 2024
e8f2310
Integrate Minitest reports
buehlmann Nov 13, 2024
587ded1
add ignore linter failures
RetGal Nov 13, 2024
8299596
Add test reports to single job
buehlmann Nov 13, 2024
a0797d3
Export test results
buehlmann Nov 13, 2024
d13e242
Use test-reports/*.xml as path for test reports
buehlmann Nov 13, 2024
f7da10c
export files
chrira Nov 13, 2024
9dbef16
file export
chrira Nov 13, 2024
5aed25c
add export
chrira Nov 13, 2024
465cbb1
pipeline export files
chrira Nov 13, 2024
a26a8f7
do not fail on lint
chrira Nov 13, 2024
36af895
vuln check not parallel
chrira Nov 14, 2024
8b3784b
all report -> unit test
chrira Nov 14, 2024
215af68
archive artifacts
chrira Nov 14, 2024
09d8eff
Add build step
buehlmann Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test step to ci job
  • Loading branch information
buehlmann committed Nov 13, 2024
commit 608ca5640ab14203f1ae7a1237eb208959a6a2fa
8 changes: 7 additions & 1 deletion ci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func (m *Ci) Test(ctx context.Context, dir *dagger.Directory) *dagger.Container
WithExec([]string{"bundle", "exec", "rails", "db:create"}).
WithExec([]string{"bundle", "exec", "rails", "db:migrate"}).
WithExec([]string{"bundle", "exec", "rails", "assets:precompile"}).
Terminal().
WithExec([]string{"bundle", "exec", "rails", "test", "test/controllers", "test/domain", "test/fabricators", "test/fixtures", "test/helpers", "test/mailers", "test/models", "test/presenters", "test/support", "test/tarantula"})
}

Expand Down Expand Up @@ -177,7 +178,7 @@ func (m *Ci) Ci(ctx context.Context, dir *dagger.Directory) *Results {
// Executes all the steps and returns a Results object
func (m *Ci) CiIntegration(ctx context.Context, dir *dagger.Directory) *Results {
var wg sync.WaitGroup
wg.Add(4)
wg.Add(5)

var lintOutput = func() *dagger.File {
defer wg.Done()
Expand All @@ -199,6 +200,11 @@ func (m *Ci) CiIntegration(ctx context.Context, dir *dagger.Directory) *Results
return m.Build(ctx, dir)
}()

go func() {
defer wg.Done()
m.Test(ctx, dir)
}()

// This Blocks the execution until its counter become 0
wg.Wait()

Expand Down
Loading