Goal
Use the prebuilt PawSQL connector to review SQL and enforce a quality gate in a BlueKing pipeline.Before you begin
- Confirm that PawSQL supports the BlueKing version and pipeline engine in use.
- Prepare the PawSQL project, workspace, and review policy.
- Issue a least-privilege identity for the connector.
- Identify the SQL locations, database type, and pipeline stage where review runs.
- Ensure the pipeline agent can reach the PawSQL endpoint.
Configuration
1
Install or add the connector
Add the PawSQL pipeline connector to the BlueKing pipeline as a stage or plugin step.
2
Configure the connector
Provide the PawSQL endpoint, identity, project, workspace, policy, and report settings.
3
Set the SQL scope
Point to the SQL directories and file patterns changed in the build.
4
Define the gate
Choose the failure criteria, thresholds, and behavior on service error or timeout.
5
Configure feedback
Publish the summary, finding counts, and report link to the pipeline result.
6
Run acceptance tests
Exercise pass, block, no-SQL, parse-error, and service-failure cases.
Gate behavior
The connector reads the review result and maps the decision to the pipeline. See SQL Quality Gates and Feedback for the recommended decision table and status mapping.Acceptance criteria
- The pipeline references the current build revision.
- The correct workspace and policy are applied.
- Only SQL within the declared scope is collected.
- A blocking finding fails the stage with an explanatory message.
- A system failure follows the configured failure policy and leaves an audit record.
- The report link is accessible to authorized pipeline viewers.
Verification
Confirm the pipeline references the current revision and that a blocking finding fails the stage with an explanatory message.For pipelines other than BlueKing that are not covered by a prebuilt connector, evaluate the OpenAPI pipeline pattern.