docker-backuppc/.azure-pipelines/templates/release-jobs.yml

45 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2020-08-13 18:37:02 +02:00
jobs:
- job: docker
pool:
vmImage: ubuntu-20.04
2020-08-13 18:37:02 +02:00
steps:
- task: Docker@2
inputs:
command: login
containerRegistry: docker-hub
displayName: Login to DockerHub
- script: |
2021-10-10 16:57:50 +02:00
set -e
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --use
2020-08-13 18:37:02 +02:00
VERSION=`cat VERSION`
echo "Docker tag is: ${VERSION}"
2021-10-10 16:57:50 +02:00
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --tag adferrand/backuppc:${VERSION} --tag adferrand/backuppc:4 --tag adferrand/backuppc --push .
2020-08-13 18:37:02 +02:00
displayName: Tag and push Docker images to DockerHub
- job: github
pool:
vmImage: ubuntu-20.04
2021-10-10 16:57:50 +02:00
dependsOn: docker
2020-08-13 18:37:02 +02:00
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: 3.8
addToPath: true
displayName: Install Python
- script: |
set -e
2020-08-13 18:37:02 +02:00
VERSION=`cat VERSION`
echo "Version is: $version"
echo "##vso[task.setvariable variable=ReleaseVersion;]${VERSION}"
2020-11-06 14:21:09 +01:00
displayName: Get version
2020-08-13 18:37:02 +02:00
- script: |
set -e
2020-08-13 18:37:02 +02:00
python utils/extract_changelog.py $(ReleaseVersion) > release_$(ReleaseVersion).md
- task: GithubRelease@0
inputs:
gitHubConnection: github.com_adferrand
title: Docker BackupPC $(ReleaseVersion)
releaseNotesFile: $(Build.SourcesDirectory)/release_$(ReleaseVersion).md
addChangeLog: false
displayName: Create GitHub Release