Skip to content

Add Azure DevOps pipeline mirroring GitHub Actions workflow#12

Draft
Copilot wants to merge 2 commits intoiacfrom
copilot/ado-pipeline
Draft

Add Azure DevOps pipeline mirroring GitHub Actions workflow#12
Copilot wants to merge 2 commits intoiacfrom
copilot/ado-pipeline

Conversation

Copy link

Copilot AI commented Dec 16, 2025

Creates Azure DevOps YAML pipeline (azure-pipelines.yml) that mirrors the existing GitHub Actions workflow.

Pipeline Structure

  • Triggers: CI on main/develop, PR on main, manual with environment parameter (dev/staging/production)
  • BuildBackend: Java 17, Maven build & test, publishes JAR artifact
  • BuildFrontend: Node.js 20, npm build (parallel with backend), publishes dist artifact
  • TestE2E: Playwright tests (depends on both builds), publishes test results
  • DeployAzure: azd CLI deployment (main branch only), outputs application URLs

Key Differences from GitHub Actions

  • Uses Azure DevOps native tasks (Maven@4, NodeTool@0, AzureCLI@2)
  • Stages instead of jobs for better pipeline visualization
  • Cache@2 task for Maven/npm caching
  • PublishPipelineArtifact@1 instead of actions/upload-artifact
  • Variables configured for AZURE_SERVICE_CONNECTION, AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID, AZURE_LOCATION
Original prompt

I need to additionally support AzureDevOps pipeline (yaml). Please create yaml pipelines that mirror the Github Actions pipeline and commit changes into a branch named ado-pipeline


💡 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.

Co-authored-by: yortch <4576246+yortch@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Azure DevOps pipeline to mirror GitHub Actions Add Azure DevOps pipeline mirroring GitHub Actions workflow Dec 16, 2025
Copilot AI requested a review from yortch December 16, 2025 14:02
@yortch yortch requested a review from Copilot December 16, 2025 15:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml with 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
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
options: '-DskipTests -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.17'
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.17'
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +227 to +229
test -f infra/terraform/main.tf
test -f infra/terraform/variables.tf
test -f infra/terraform/outputs.tf
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
test -f infra/terraform/outputs.tf

# Create .azd directory and config
mkdir -p .azd
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants