pitc-flow
Secure and compliant software delivery with trust and integrity. 🚀This module contains ready to use pipelines.
They build and deliver your software / project with security and compliance out of the box.
Installation
dagger install github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4
Entrypoint
Return Type
PitcFlow
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
func (m *MyModule) Example() *dagger.PitcFlow {
return dag.
PitcFlow()
}
@function
def example() -> dagger.PitcFlow:
return (
dag.pitc_flow()
)
@func()
example(): PitcFlow {
return dag
.pitcFlow()
}
Types
PitcFlow 🔗
flex() 🔗
Executes only the desired steps and returns a directory with the results
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | source directory |
lintContainer | Container | - | lint container |
lintReportDir | String | - | lint report folder name e.g. "lint.json" |
sastContainer | Container | - | sast container |
sastReportDir | String | - | security scan report folder name e.g. "/app/brakeman-output.tabs" |
testContainer | Container | - | test container |
testReportDir | String | - | test report folder name e.g. "/mnt/test/reports" |
integrationTestContainer | Container | - | integration test container |
integrationTestReportDir | String | - | integration test report folder name e.g. "/mnt/int-test/reports" |
registryUsername | String | - | registry username for publishing the container image |
registryPassword | Secret | - | registry password for publishing the container image |
registryAddress | String | - | registry address registry/repository/image:tag |
dtAddress | String | - | deptrack address for publishing the SBOM https://deptrack.example.com/api/v1/bom |
dtProjectUuid | String | - | deptrack project UUID |
dtApiKey | Secret | - | deptrack API key |
appContainer | Container | - | pre built app container |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
flex --dir DIR_PATH
func (m *MyModule) Example(dir *dagger.Directory) *dagger.Directory {
return dag.
PitcFlow().
Flex(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.Directory:
return (
dag.pitc_flow()
.flex(dir)
)
@func()
example(dir: Directory): Directory {
return dag
.pitcFlow()
.flex(dir)
}
full() 🔗
Executes all the steps and returns a directory with the results
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | source directory |
lintContainer | Container ! | - | lint container |
lintReportDir | String ! | - | lint report folder name e.g. "lint.json" |
sastContainer | Container ! | - | sast container |
sastReportDir | String ! | - | security scan report folder name e.g. "/app/brakeman-output.tabs" |
testContainer | Container ! | - | test container |
testReportDir | String ! | - | test report folder name e.g. "/mnt/test/reports" |
integrationTestContainer | Container ! | - | integration test container |
integrationTestReportDir | String ! | - | integration test report folder name e.g. "/mnt/int-test/reports" |
registryUsername | String ! | - | registry username for publishing the container image |
registryPassword | Secret ! | - | registry password for publishing the container image |
registryAddress | String ! | - | registry address registry/repository/image:tag |
dtAddress | String ! | - | deptrack address for publishing the SBOM https://deptrack.example.com/api/v1/bom |
dtProjectUuid | String ! | - | deptrack project UUID |
dtApiKey | Secret ! | - | deptrack API key |
appContainer | Container | - | pre built app container |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
full --dir DIR_PATH --lint-container IMAGE:TAG --lint-report-dir string --sast-container IMAGE:TAG --sast-report-dir string --test-container IMAGE:TAG --test-report-dir string --integration-test-container IMAGE:TAG --integration-test-report-dir string --registry-username string --registry-password env:MYSECRET --registry-address string --dt-address string --dt-project-uuid string --dt-api-key env:MYSECRET
func (m *MyModule) Example(dir *dagger.Directory, lintContainer *dagger.Container, lintReportDir string, sastContainer *dagger.Container, sastReportDir string, testContainer *dagger.Container, testReportDir string, integrationTestContainer *dagger.Container, integrationTestReportDir string, registryUsername string, registryPassword *dagger.Secret, registryAddress string, dtAddress string, dtProjectUuid string, dtApiKey *dagger.Secret) *dagger.Directory {
return dag.
PitcFlow().
Full(dir, lintContainer, lintReportDir, sastContainer, sastReportDir, testContainer, testReportDir, integrationTestContainer, integrationTestReportDir, registryUsername, registryPassword, registryAddress, dtAddress, dtProjectUuid, dtApiKey)
}
@function
def example(dir: dagger.Directory, lint_container: dagger.Container, lint_report_dir: str, sast_container: dagger.Container, sast_report_dir: str, test_container: dagger.Container, test_report_dir: str, integration_test_container: dagger.Container, integration_test_report_dir: str, registry_username: str, registry_password: dagger.Secret, registry_address: str, dt_address: str, dt_project_uuid: str, dt_api_key: dagger.Secret) -> dagger.Directory:
return (
dag.pitc_flow()
.full(dir, lint_container, lint_report_dir, sast_container, sast_report_dir, test_container, test_report_dir, integration_test_container, integration_test_report_dir, registry_username, registry_password, registry_address, dt_address, dt_project_uuid, dt_api_key)
)
@func()
example(dir: Directory, lintContainer: Container, lintReportDir: string, sastContainer: Container, sastReportDir: string, testContainer: Container, testReportDir: string, integrationTestContainer: Container, integrationTestReportDir: string, registryUsername: string, registryPassword: Secret, registryAddress: string, dtAddress: string, dtProjectUuid: string, dtApiKey: Secret): Directory {
return dag
.pitcFlow()
.full(dir, lintContainer, lintReportDir, sastContainer, sastReportDir, testContainer, testReportDir, integrationTestContainer, integrationTestReportDir, registryUsername, registryPassword, registryAddress, dtAddress, dtProjectUuid, dtApiKey)
}
ci() 🔗
Executes all the CI steps (no publishing) and returns a directory with the results
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | source directory |
lintContainer | Container ! | - | lint container |
lintReportDir | String ! | - | lint report folder name e.g. "lint.json" |
sastContainer | Container ! | - | sast container |
sastReportDir | String ! | - | security scan report folder name e.g. "/app/brakeman-output.tabs" |
testContainer | Container ! | - | test container |
testReportDir | String ! | - | test report folder name e.g. "/mnt/test/reports" |
integrationTestContainer | Container ! | - | integration test container |
integrationTestReportDir | String ! | - | integration test report folder name e.g. "/mnt/int-test/reports" |
appContainer | Container | - | pre built app container |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
ci --dir DIR_PATH --lint-container IMAGE:TAG --lint-report-dir string --sast-container IMAGE:TAG --sast-report-dir string --test-container IMAGE:TAG --test-report-dir string --integration-test-container IMAGE:TAG --integration-test-report-dir string
func (m *MyModule) Example(dir *dagger.Directory, lintContainer *dagger.Container, lintReportDir string, sastContainer *dagger.Container, sastReportDir string, testContainer *dagger.Container, testReportDir string, integrationTestContainer *dagger.Container, integrationTestReportDir string) *dagger.Directory {
return dag.
PitcFlow().
Ci(dir, lintContainer, lintReportDir, sastContainer, sastReportDir, testContainer, testReportDir, integrationTestContainer, integrationTestReportDir)
}
@function
def example(dir: dagger.Directory, lint_container: dagger.Container, lint_report_dir: str, sast_container: dagger.Container, sast_report_dir: str, test_container: dagger.Container, test_report_dir: str, integration_test_container: dagger.Container, integration_test_report_dir: str) -> dagger.Directory:
return (
dag.pitc_flow()
.ci(dir, lint_container, lint_report_dir, sast_container, sast_report_dir, test_container, test_report_dir, integration_test_container, integration_test_report_dir)
)
@func()
example(dir: Directory, lintContainer: Container, lintReportDir: string, sastContainer: Container, sastReportDir: string, testContainer: Container, testReportDir: string, integrationTestContainer: Container, integrationTestReportDir: string): Directory {
return dag
.pitcFlow()
.ci(dir, lintContainer, lintReportDir, sastContainer, sastReportDir, testContainer, testReportDir, integrationTestContainer, integrationTestReportDir)
}
iflex() 🔗
Executes only the desired steps and returns a directory with the results (interface variant)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | source directory |
lintReports | Directory | - | directory containing the lint results |
securityReports | Directory | - | directory containing the security scan results |
testReports | Directory | - | diredctory containing the test results |
integrationTestReports | Directory | - | directory containing the integration test results |
registryUsername | String | - | registry username for publishing the container image |
registryPassword | Secret | - | registry password for publishing the container image |
registryAddress | String | - | registry address registry/repository/image:tag |
dtAddress | String | - | deptrack address for publishing the SBOM https://deptrack.example.com/api/v1/bom |
dtProjectUuid | String | - | deptrack project UUID |
dtApiKey | Secret | - | deptrack API key |
appContainer | Container | - | pre built app container |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
iflex --dir DIR_PATH
func (m *MyModule) Example(dir *dagger.Directory) *dagger.Directory {
return dag.
PitcFlow().
Iflex(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.Directory:
return (
dag.pitc_flow()
.iflex(dir)
)
@func()
example(dir: Directory): Directory {
return dag
.pitcFlow()
.iflex(dir)
}
ifull() 🔗
Executes all the steps and returns a directory with the results (interface variant)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | source directory |
lintReports | Directory ! | - | lint container |
securityReports | Directory ! | - | directory containing the security scan results |
testReports | Directory ! | - | diredctory containing the test results |
integrationTestReports | Directory ! | - | directory containing the integration test results |
registryUsername | String ! | - | registry username for publishing the container image |
registryPassword | Secret ! | - | registry password for publishing the container image |
registryAddress | String ! | - | registry address registry/repository/image:tag |
dtAddress | String ! | - | deptrack address for publishing the SBOM https://deptrack.example.com/api/v1/bom |
dtProjectUuid | String ! | - | deptrack project UUID |
dtApiKey | Secret ! | - | deptrack API key |
appContainer | Container | - | pre built app container |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
ifull --dir DIR_PATH --lint-reports DIR_PATH --security-reports DIR_PATH --test-reports DIR_PATH --integration-test-reports DIR_PATH --registry-username string --registry-password env:MYSECRET --registry-address string --dt-address string --dt-project-uuid string --dt-api-key env:MYSECRET
func (m *MyModule) Example(dir *dagger.Directory, lintReports *dagger.Directory, securityReports *dagger.Directory, testReports *dagger.Directory, integrationTestReports *dagger.Directory, registryUsername string, registryPassword *dagger.Secret, registryAddress string, dtAddress string, dtProjectUuid string, dtApiKey *dagger.Secret) *dagger.Directory {
return dag.
PitcFlow().
Ifull(dir, lintReports, securityReports, testReports, integrationTestReports, registryUsername, registryPassword, registryAddress, dtAddress, dtProjectUuid, dtApiKey)
}
@function
def example(dir: dagger.Directory, lint_reports: dagger.Directory, security_reports: dagger.Directory, test_reports: dagger.Directory, integration_test_reports: dagger.Directory, registry_username: str, registry_password: dagger.Secret, registry_address: str, dt_address: str, dt_project_uuid: str, dt_api_key: dagger.Secret) -> dagger.Directory:
return (
dag.pitc_flow()
.ifull(dir, lint_reports, security_reports, test_reports, integration_test_reports, registry_username, registry_password, registry_address, dt_address, dt_project_uuid, dt_api_key)
)
@func()
example(dir: Directory, lintReports: Directory, securityReports: Directory, testReports: Directory, integrationTestReports: Directory, registryUsername: string, registryPassword: Secret, registryAddress: string, dtAddress: string, dtProjectUuid: string, dtApiKey: Secret): Directory {
return dag
.pitcFlow()
.ifull(dir, lintReports, securityReports, testReports, integrationTestReports, registryUsername, registryPassword, registryAddress, dtAddress, dtProjectUuid, dtApiKey)
}
ici() 🔗
Executes all the CI steps (no publishing) and returns a directory with the results (interface variant)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | source directory |
lintReports | Directory ! | - | directory containing the lint results |
securityReports | Directory ! | - | directory containing the security scan results |
testReports | Directory ! | - | diredctory containing the test results |
integrationTestReports | Directory ! | - | directory containing the integration test results |
appContainer | Container | - | pre built app container |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
ici --dir DIR_PATH --lint-reports DIR_PATH --security-reports DIR_PATH --test-reports DIR_PATH --integration-test-reports DIR_PATH
func (m *MyModule) Example(dir *dagger.Directory, lintReports *dagger.Directory, securityReports *dagger.Directory, testReports *dagger.Directory, integrationTestReports *dagger.Directory) *dagger.Directory {
return dag.
PitcFlow().
Ici(dir, lintReports, securityReports, testReports, integrationTestReports)
}
@function
def example(dir: dagger.Directory, lint_reports: dagger.Directory, security_reports: dagger.Directory, test_reports: dagger.Directory, integration_test_reports: dagger.Directory) -> dagger.Directory:
return (
dag.pitc_flow()
.ici(dir, lint_reports, security_reports, test_reports, integration_test_reports)
)
@func()
example(dir: Directory, lintReports: Directory, securityReports: Directory, testReports: Directory, integrationTestReports: Directory): Directory {
return dag
.pitcFlow()
.ici(dir, lintReports, securityReports, testReports, integrationTestReports)
}
verify() 🔗
Verifies if the run was succesful and returns the error messages
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
status | File ! | - | status.txt file to be verified |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
verify --status file:path
func (m *MyModule) Example(ctx context.Context, status *dagger.File) string {
return dag.
PitcFlow().
Verify(ctx, status)
}
@function
async def example(status: dagger.File) -> str:
return await (
dag.pitc_flow()
.verify(status)
)
@func()
async example(status: File): Promise<string> {
return dag
.pitcFlow()
.verify(status)
}
lint() 🔗
Lints the sources in the provided directory and returns a directory with the results (default implementation)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | No description provided |
pass | Boolean ! | - | must not be optional here! |
face | Interface ! | - | No description provided |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
lint --dir DIR_PATH --pass boolean
func (m *MyModule) Example(dir *dagger.Directory, pass bool, face ) *dagger.Directory {
return dag.
PitcFlow().
Lint(dir, pass, face)
}
@function
def example(dir: dagger.Directory, pass_: bool, face: ) -> dagger.Directory:
return (
dag.pitc_flow()
.lint(dir, pass_, face)
)
@func()
example(dir: Directory, pass: boolean, face: ): Directory {
return dag
.pitcFlow()
.lint(dir, pass, face)
}
securityScan() 🔗
Runs a security scan in the provided directory and returns a directory with the results (default implementation)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | No description provided |
face | Interface ! | - | No description provided |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
security-scan --dir DIR_PATH
func (m *MyModule) Example(dir *dagger.Directory, face ) *dagger.Directory {
return dag.
PitcFlow().
SecurityScan(dir, face)
}
@function
def example(dir: dagger.Directory, face: ) -> dagger.Directory:
return (
dag.pitc_flow()
.security_scan(dir, face)
)
@func()
example(dir: Directory, face: ): Directory {
return dag
.pitcFlow()
.securityScan(dir, face)
}
test() 🔗
Runs unit tests in the provided directory and returns a directory with the results (default implementation)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | No description provided |
face | Interface ! | - | No description provided |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
test --dir DIR_PATH
func (m *MyModule) Example(dir *dagger.Directory, face ) *dagger.Directory {
return dag.
PitcFlow().
Test(dir, face)
}
@function
def example(dir: dagger.Directory, face: ) -> dagger.Directory:
return (
dag.pitc_flow()
.test(dir, face)
)
@func()
example(dir: Directory, face: ): Directory {
return dag
.pitcFlow()
.test(dir, face)
}
integrationTest() 🔗
Runs integration tests in the provided directory and returns a directory with the results (default implementation)
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | No description provided |
face | Interface ! | - | No description provided |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@64f67c15b08c0074e8837b9b86ed16a186ae1dc4 call \
integration-test --dir DIR_PATH
func (m *MyModule) Example(dir *dagger.Directory, face ) *dagger.Directory {
return dag.
PitcFlow().
IntegrationTest(dir, face)
}
@function
def example(dir: dagger.Directory, face: ) -> dagger.Directory:
return (
dag.pitc_flow()
.integration_test(dir, face)
)
@func()
example(dir: Directory, face: ): Directory {
return dag
.pitcFlow()
.integrationTest(dir, face)
}