Add Azure DevOps pipeline mirroring GitHub Actions workflow#12
Add Azure DevOps pipeline mirroring GitHub Actions workflow#12
Conversation
Co-authored-by: yortch <4576246+yortch@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces Azure DevOps pipeline support to mirror the existing GitHub Actions workflow, enabling CI/CD on Azure DevOps platforms alongside GitHub.
- Adds
azure-pipelines.ymlwith stages for backend build, frontend build, E2E testing, and Azure deployment - Implements parallel build execution for backend and frontend stages
- Configures Azure-specific tasks and service connections for deployment with azd CLI
|
|
||
| - script: | | ||
| cd tests | ||
| npx playwright test --project chromium |
There was a problem hiding this comment.
The pipeline only runs Playwright tests against the Chromium browser, but the project-specific conventions indicate multi-browser testing with Chromium and WebKit. Consider adding WebKit test execution to match the comprehensive testing strategy described in the coding guidelines.
| options: '-DskipTests -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' | ||
| publishJUnitResults: false | ||
| javaHomeOption: 'JDKVersion' | ||
| jdkVersionOption: '1.17' |
There was a problem hiding this comment.
The jdkVersionOption value '1.17' appears to be using an incorrect version format. Azure DevOps Maven task expects version strings like '17' or '1.8', not '1.17'. This should be '17' to match the JAVA_VERSION variable and JavaToolInstaller configuration.
| publishJUnitResults: true | ||
| testResultsFiles: '**/surefire-reports/TEST-*.xml' | ||
| javaHomeOption: 'JDKVersion' | ||
| jdkVersionOption: '1.17' |
There was a problem hiding this comment.
The jdkVersionOption value '1.17' appears to be using an incorrect version format. Azure DevOps Maven task expects version strings like '17' or '1.8', not '1.17'. This should be '17' to match the JAVA_VERSION variable and JavaToolInstaller configuration.
| test -f infra/terraform/main.tf | ||
| test -f infra/terraform/variables.tf | ||
| test -f infra/terraform/outputs.tf |
There was a problem hiding this comment.
The file validation uses basic test -f commands that will fail silently or with unclear error messages. Consider adding explicit error messages for each validation to improve troubleshooting when infrastructure files are missing.
| test -f infra/terraform/main.tf | |
| test -f infra/terraform/variables.tf | |
| test -f infra/terraform/outputs.tf | |
| if [ ! -f infra/terraform/main.tf ]; then | |
| echo "ERROR: Missing infra/terraform/main.tf" >&2 | |
| exit 1 | |
| fi | |
| if [ ! -f infra/terraform/variables.tf ]; then | |
| echo "ERROR: Missing infra/terraform/variables.tf" >&2 | |
| exit 1 | |
| fi | |
| if [ ! -f infra/terraform/outputs.tf ]; then | |
| echo "ERROR: Missing infra/terraform/outputs.tf" >&2 | |
| exit 1 | |
| fi |
| test -f infra/terraform/outputs.tf | ||
|
|
||
| # Create .azd directory and config | ||
| mkdir -p .azd |
There was a problem hiding this comment.
The pipeline references azd-config.json without any documentation about its expected location, format, or required contents. Add a comment explaining what this file should contain and where it should be located in the repository.
| mkdir -p .azd | |
| mkdir -p .azd | |
| # The file 'azd-config.json' must exist at the root of the repository. | |
| # It should contain the Azure Developer CLI (azd) environment configuration in JSON format. | |
| # Example minimal contents: | |
| # { | |
| # "name": "threeriversbank-dev", | |
| # "location": "eastus", | |
| # "subscriptionId": "<your-azure-subscription-id>" | |
| # } | |
| # For more details, see: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/reference-azd-config |
Creates Azure DevOps YAML pipeline (
azure-pipelines.yml) that mirrors the existing GitHub Actions workflow.Pipeline Structure
main/develop, PR onmain, manual with environment parameter (dev/staging/production)Key Differences from GitHub Actions
Maven@4,NodeTool@0,AzureCLI@2)Cache@2task for Maven/npm cachingPublishPipelineArtifact@1instead ofactions/upload-artifactAZURE_SERVICE_CONNECTION,AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_CLIENT_SECRET,AZURE_SUBSCRIPTION_ID,AZURE_LOCATIONOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.