Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion .dagger/buildDev.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import (
)

// Create build of Harbor CLI for local testing and development
func (m *HarborCli) BuildDev(ctx context.Context, platform string, source *dagger.Directory) *dagger.File {
func (m *HarborCli) BuildDev(ctx context.Context, platform string,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) *dagger.File {
err := m.init(ctx, source)
if err != nil {
return nil
Expand Down
5 changes: 4 additions & 1 deletion .dagger/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import (
)

// Generate CLI Documentation and return the directory containing the generated files
func (m *HarborCli) RunDoc(ctx context.Context, source *dagger.Directory) (*dagger.Directory, error) {
func (m *HarborCli) RunDoc(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (*dagger.Directory, error) {
err := m.init(ctx, source)
if err != nil {
return nil, err
Expand Down
10 changes: 8 additions & 2 deletions .dagger/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import (
)

// Runs golangci-lint and generates outputs the report as a file
func (m *HarborCli) LintReport(ctx context.Context, source *dagger.Directory) (*dagger.File, error) {
func (m *HarborCli) LintReport(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (*dagger.File, error) {
err := m.init(ctx, source)
if err != nil {
return nil, err
Expand All @@ -23,7 +26,10 @@ func (m *HarborCli) LintReport(ctx context.Context, source *dagger.Directory) (*
}

// Runs golangci-lint and generates outputs the report as a string to stdout
func (m *HarborCli) Lint(ctx context.Context, source *dagger.Directory) (string, error) {
func (m *HarborCli) Lint(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (string, error) {
err := m.init(ctx, source)
if err != nil {
return "", err
Expand Down
20 changes: 16 additions & 4 deletions .dagger/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import (
)

// Executes Go tests
func (m *HarborCli) Test(ctx context.Context, source *dagger.Directory) (string, error) {
func (m *HarborCli) Test(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (string, error) {
err := m.init(ctx, source)
if err != nil {
return "", err
Expand All @@ -27,7 +30,10 @@ func (m *HarborCli) Test(ctx context.Context, source *dagger.Directory) (string,

// Executes Go tests and returns TestReport in json file
// TestReport executes Go tests and returns only the JSON report file
func (m *HarborCli) TestReport(ctx context.Context, source *dagger.Directory) (*dagger.File, error) {
func (m *HarborCli) TestReport(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (*dagger.File, error) {
err := m.init(ctx, source)
if err != nil {
return nil, err
Expand All @@ -49,7 +55,10 @@ func (m *HarborCli) TestReport(ctx context.Context, source *dagger.Directory) (*
}

// Tests Coverage of code base
func (m *HarborCli) TestCoverage(ctx context.Context, source *dagger.Directory) (*dagger.File, error) {
func (m *HarborCli) TestCoverage(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (*dagger.File, error) {
err := m.init(ctx, source)
if err != nil {
return nil, err
Expand All @@ -70,7 +79,10 @@ func (m *HarborCli) TestCoverage(ctx context.Context, source *dagger.Directory)
}

// TestCoverageReport processes coverage data and returns a formatted markdown report
func (m *HarborCli) TestCoverageReport(ctx context.Context, source *dagger.Directory) (*dagger.File, error) {
func (m *HarborCli) TestCoverageReport(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (*dagger.File, error) {
err := m.init(ctx, source)
if err != nil {
return nil, err
Expand Down
10 changes: 8 additions & 2 deletions .dagger/vuln.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ func (m *HarborCli) vulnerabilityCheck(ctx context.Context) *dagger.Container {
}

// Runs a vulnerability check using govulncheck
func (m *HarborCli) VulnerabilityCheck(ctx context.Context, source *dagger.Directory) (string, error) {
func (m *HarborCli) VulnerabilityCheck(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (string, error) {
err := m.init(ctx, source)
if err != nil {
return "", err
Expand All @@ -32,7 +35,10 @@ func (m *HarborCli) VulnerabilityCheck(ctx context.Context, source *dagger.Direc
}

// Runs a vulnerability check using govulncheck and writes results to vulnerability-check.report
func (m *HarborCli) VulnerabilityCheckReport(ctx context.Context, source *dagger.Directory) (*dagger.File, error) {
func (m *HarborCli) VulnerabilityCheckReport(ctx context.Context,
// +ignore=[".gitignore"]
// +defaultPath="."
source *dagger.Directory) (*dagger.File, error) {
err := m.init(ctx, source)
if err != nil {
return nil, err
Expand Down
Loading