Azure Pipeline (master branch)
masterThis is an Azure DevOps pipeline responsible for branch pushing and PR builds. After the build, it performs static analysis with SonarQube, and if successful, pushes 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 ← 각 모듈 진입점
│ ├── worker-pipeline.yml
│ └── frontend-pipeline.yml
└── templates/
├── build-java.yml ← Gradle 빌드 템플릿
├── sonar-scan.yml ← SonarQube 분석 템플릿
└── docker-push.yml ← Docker 빌드 & ACR 푸시 템플릿
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 | Purpose |
|---|---|---|
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 Gates + Manual Deployment | Not implemented |
| path trigger | Build only the modified modules with monorepo path filter | Not implemented |