Files
Zerto_Exporter/azure-pipelines.yml
T
justin e70110d2ca Fix Azure pipeline tags: replace build ID with stable tag
Swap $(Build.BuildId) for stable so the pipeline pushes three
meaningful tags: {semver}, stable, latest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 12:47:19 -05:00

43 lines
1.0 KiB
YAML

# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: Bash@3
displayName: Read version from version.py
inputs:
targetType: inline
script: |
VERSION=$(python3 -c "import re; content=open('app/version.py').read(); print(re.search(r'VERSION\s*=\s*[\"\'](.*?)[\"\']', content).group(1))")
echo "##vso[task.setvariable variable=semanticVersion]$VERSION"
echo "Image version: $VERSION"
- task: Docker@2
displayName: Build and Push Image
inputs:
containerRegistry: 'recklessop-docker-hub'
repository: 'recklessop/zerto-exporter'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
tags: |
$(semanticVersion)
stable
latest