Skip to content

Commit b415f94

Browse files
committed
format
1 parent fd3ac33 commit b415f94

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

ci/implementation/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ func (m *Implementation) Lint(
2626
dir *dagger.Directory,
2727
// +optional
2828
// +default=false
29-
pass bool,
29+
pass bool,
3030
) *dagger.Directory {
3131
return dag.Container().
3232
From("ruby:latest").
3333
WithMountedDirectory("/mnt", dir).
3434
WithWorkdir("/mnt").
3535
WithExec([]string{"gem", "install", "haml-lint"}).
36-
WithExec([]string{"sh", "-c", "mkdir -p /mnt/lint"}).
36+
WithExec([]string{"sh", "-c", "mkdir -p /mnt/lint"}).
3737
WithExec(m.lintCommand(pass)).
3838
Directory("/mnt/lint")
3939
}
@@ -47,7 +47,7 @@ func (m *Implementation) lintCommand(pass bool) []string {
4747
}
4848

4949
func (m *Implementation) Test(
50-
dir *dagger.Directory,
50+
dir *dagger.Directory,
5151
) *dagger.Directory {
5252
return m.BaseTestContainer(dir).
5353
WithServiceBinding("postgresql", m.Postgres("11")).
@@ -56,11 +56,11 @@ func (m *Implementation) Test(
5656
WithExec([]string{"bundle", "exec", "rails", "db:migrate"}).
5757
WithExec([]string{"bundle", "exec", "rails", "assets:precompile"}).
5858
WithExec([]string{"sh", "-c", "bundle exec rails test test/controllers test/domain test/fabricators test/fixtures test/helpers test/mailers test/models test/presenters test/support test/tarantula"}).
59-
Directory("/mnt/test/reports")
59+
Directory("/mnt/test/reports")
6060
}
6161

6262
func (m *Implementation) IntegrationTest(
63-
dir *dagger.Directory,
63+
dir *dagger.Directory,
6464
) *dagger.Directory {
6565
return m.BaseTestContainer(dir).
6666
WithServiceBinding("postgresql", m.Postgres("11")).
@@ -69,12 +69,12 @@ func (m *Implementation) IntegrationTest(
6969
WithExec([]string{"bundle", "exec", "rails", "db:migrate"}).
7070
WithExec([]string{"bundle", "exec", "rails", "assets:precompile"}).
7171
WithExec([]string{"sh", "-c", "bundle exec rails test test/integration"}).
72-
Directory("/mnt/test/reports")
72+
Directory("/mnt/test/reports")
7373
}
7474

7575
// Returns a Container with the base setup for running the rails test suite
7676
func (m *Implementation) BaseTestContainer(
77-
dir *dagger.Directory,
77+
dir *dagger.Directory,
7878
) *dagger.Container {
7979
return dag.Container().
8080
From("registry.puzzle.ch/docker.io/ruby:3.2").
@@ -106,7 +106,7 @@ func (m *Implementation) SecurityScan(dir *dagger.Directory) *dagger.Directory {
106106
From("presidentbeef/brakeman:latest").
107107
WithMountedDirectory("/app", dir).
108108
WithWorkdir("/app").
109-
WithExec([]string{"sh", "-c", "mkdir -p /app/sast"}).
109+
WithExec([]string{"sh", "-c", "mkdir -p /app/sast"}).
110110
WithExec([]string{"sh", "-c", "/usr/src/app/bin/brakeman -o /app/sast/brakeman-output.tabs"}).
111111
Directory("/app/sast")
112112
}

ci/main.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,31 @@ func (m *Ci) CiIntegration(
4444
pass bool,
4545
) *dagger.Directory {
4646
return dag.PitcFlow().Iflex(
47-
// source directory
48-
dir,
49-
dagger.PitcFlowIflexOpts{
50-
LintReports: dag.PitcFlow().Lint(dir, pass, dag.Implementation().AsPitcFlowLinting()),
51-
SecurityReports: dag.PitcFlow().SecurityScan(dir, dag.Implementation().AsPitcFlowSecurityScanning()),
52-
TestReports: dag.PitcFlow().Test(dir, dag.Implementation().AsPitcFlowTesting()),
53-
//IntegrationTestReports: dag.PitcFlow().IntegrationTest(dir, dag.Implementation().AsPitcFlowIntegrationTesting()),
54-
// registry username for publishing the container image
55-
RegistryUsername: registryUsername,
56-
// registry password for publishing the container image
57-
RegistryPassword: registryPassword,
58-
// registry address registry/repository/image:tag
59-
RegistryAddress: registryAddress,
60-
// deptrack address for publishing the SBOM https://deptrack.example.com/api/v1/bom
61-
DtAddress: dtAddress,
62-
// deptrack project UUID
63-
DtProjectUUID: dtProjectUUID,
64-
// deptrack API key
65-
DtAPIKey: dtApiKey},
47+
// source directory
48+
dir,
49+
dagger.PitcFlowIflexOpts{
50+
LintReports: dag.PitcFlow().Lint(dir, pass, dag.Implementation().AsPitcFlowLinting()),
51+
SecurityReports: dag.PitcFlow().SecurityScan(dir, dag.Implementation().AsPitcFlowSecurityScanning()),
52+
TestReports: dag.PitcFlow().Test(dir, dag.Implementation().AsPitcFlowTesting()),
53+
//IntegrationTestReports: dag.PitcFlow().IntegrationTest(dir, dag.Implementation().AsPitcFlowIntegrationTesting()),
54+
// registry username for publishing the container image
55+
RegistryUsername: registryUsername,
56+
// registry password for publishing the container image
57+
RegistryPassword: registryPassword,
58+
// registry address registry/repository/image:tag
59+
RegistryAddress: registryAddress,
60+
// deptrack address for publishing the SBOM https://deptrack.example.com/api/v1/bom
61+
DtAddress: dtAddress,
62+
// deptrack project UUID
63+
DtProjectUUID: dtProjectUUID,
64+
// deptrack API key
65+
DtAPIKey: dtApiKey},
6666
)
6767
}
6868

6969
func (m *Ci) Verify(
70-
ctx context.Context,
71-
file *dagger.File,
70+
ctx context.Context,
71+
file *dagger.File,
7272
) (string, error) {
73-
return dag.PitcFlow().Verify(ctx, file)
73+
return dag.PitcFlow().Verify(ctx, file)
7474
}

0 commit comments

Comments
 (0)