CI/CD Pipeline Setup for SQL Server: Ensuring Accessibility Compliance in Database Scripts
I'm upgrading from an older version and This might be a silly question, but I'm stuck on something that should probably be simple. I've looked through the documentation and I'm still confused about Setting up a CI/CD pipeline for deploying SQL Server changes while improving accessibility compliance has been a bit complex. The objective is to ensure all database scripts adhere to WCAG guidelines before deployment. To start, I've integrated Azure DevOps and created a build pipeline that triggers on pull requests. The initial configuration included steps for running SQL scripts against a staging database, but I've realized this needs to incorporate accessibility checks. Iโve been using a combination of SQL Server Data Tools (SSDT) and custom scripts to validate accessibility within the database schema. Hereโs a sample of the SQL validation script I've created: ```sql SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME NOT IN (SELECT OBJECT_NAME(object_id) FROM sys.objects WHERE type='U') AND (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = TABLE_NAME AND IS_NULLABLE = 'NO') < 1; ``` This script checks for tables without mandatory fields, but I need it to be part of the pipeline. The goal is to fail the build if accessibility criteria aren't met. I've tried adding a new task in Azure DevOps that runs this SQL check after the build but before deployment. However, I'm not sure how to properly configure this step, especially in terms of capturing the output and failing the pipeline when conditions arenโt satisfied. Additionally, I'm exploring whether integrating tools like a11y-html-validator to run alongside my SQL checks would provide a more holistic approach. Any insights on how to effectively structure these checks in the pipeline would be greatly appreciated. Looking for both configuration guidance and best practices in this context. My development environment is Linux. Thanks for taking the time to read this! For reference, this is a production application. I appreciate any insights! For context: I'm using Sql on Linux.