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@v0.3.1
Entrypoint
Return Type
PitcFlow
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@66afdc72934f332b628e50635d460081763facc7 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 |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@66afdc72934f332b628e50635d460081763facc7 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 |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@66afdc72934f332b628e50635d460081763facc7 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" |
Example
dagger -m github.com/puzzle/dagger-module-pitc-flow/pitc-flow@66afdc72934f332b628e50635d460081763facc7 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)
}
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@66afdc72934f332b628e50635d460081763facc7 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)
}