Azure Pipeline (master branch)
masterThis is an Azure DevOps pipeline responsible for branch pushes and PR builds.
After the build, perform static analysis with SonarQube, and if it passes, push the image to ACR.
Pipeline List
| Pipeline | YAML file | trigger |
|---|---|---|
infolineage-api | infra/azure-pipelines/pipelines/api-pipeline.yml | master push / PR |
infolineage-worker | infra/azure-pipelines/pipelines/worker-pipeline.yml | master push / PR |
infolineage-frontend | infra/azure-pipelines/pipelines/frontend-pipeline.yml | master push / PR |
YAML Structure
infra/azure-pipelines/
├── pipelines/
│ ├── api-pipeline.yml ← Entry point for each module
│ ├── worker-pipeline.yml
│ └── frontend-pipeline.yml
└── templates/
├── build-java.yml ← Gradle build template
├── sonar-scan.yml ← SonarQube analysis template
└── docker-push.yml ← Docker build & ACR push template
Pipeline YAML istemplates/totemplateReused as a reference.
# 예시: api-pipeline.yml
stages:
- stage: Build
jobs:
- template: ../templates/build-java.yml
parameters:
module: infolineage-api
- stage: SonarQube
jobs:
- template: ../templates/sonar-scan.yml
parameters:
projectKey: infolineage-api
- stage: Docker
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- template: ../templates/docker-push.yml
parameters:
module: api
Trigger Strategy
trigger:
branches:
include:
- master
pr:
branches:
include:
- master
- master push: Execute all 3 steps (Build → SonarQube → Docker)
- PR Build: Run Build + SonarQube only, skip Docker push (
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master'))
Step 3 Flow
Stage 1: Build
- task: Gradle@3
inputs:
gradleWrapperFile: 'backend/gradlew'
workingDirectory: 'backend'
tasks: ':infolineage-api:bootJar -x test --build-cache'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '25'
options: '-Dorg.gradle.jvmargs="--enable-preview -Xmx2g"'
Stage 2: SonarQube
- task: SonarQubePrepare@5
inputs:
SonarQube: 'SonarQube' # Service Connection 이름
scannerMode: 'Other'
extraProperties: |
sonar.projectKey=infolineage-api
sonar.sources=backend/infolineage-api/src/main
sonar.tests=backend/infolineage-api/src/test
sonar.java.binaries=backend/infolineage-api/build/classes
sonar.java.source=25
- task: SonarQubeAnalyze@5
- task: SonarQubePublish@5
inputs:
pollingTimeoutSec: '300'
Stage 3: Docker → ACR
- task: Docker@2
inputs:
containerRegistry: 'AzureContainerRegistry'
repository: 'infolineage/api'
command: 'buildAndPush'
Dockerfile: 'backend/infolineage-api/Dockerfile'
buildContext: 'backend'
tags: 'latest'
Service Connection List
| name | Type | Usage |
|---|---|---|
SonarQube | SonarQube | Connecting to SonarQube Analysis Server |
AzureContainerRegistry | Docker Registry | ACR Image Push |
Manage in Azure DevOps → Project Settings → Service Connections.
Future Plans
| step | Content | status |
|---|---|---|
| Staging Automatic Deployment | Automatic Rollout of K8s Staging After Docker Stage | Not implemented |
| Production Manual Approval | Azure DevOps Approval Gate + Manual Deployment | Not implemented |
| path trigger | Build only the changed modules with monorepo path filter | Not implemented |