Revamp naming of Docker images and manifests
This is a nicer standardized format using Docker image tags more effectively.
This commit is contained in:
parent
95be2ba211
commit
c4cc669ebf
1 changed files with 15 additions and 23 deletions
|
@ -52,43 +52,35 @@ jobs:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: 'docker build -f deployment/Dockerfile.docker -t jellyfin-web-unstable .'
|
- script: 'docker build -f deployment/Dockerfile.docker -t "jellyfin-web":"unstable-$(Build.BuildNumber)" .'
|
||||||
displayName: 'Build Dockerfile (unstable)'
|
displayName: 'Build Dockerfile (unstable)'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
||||||
|
|
||||||
- script: 'docker build -f deployment/Dockerfile.docker -t jellyfin-web-stable .'
|
- script: 'docker push "jellyfin-web":"unstable-$(Build.BuildNumber)"'
|
||||||
displayName: 'Build Dockerfile (stable)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
||||||
|
|
||||||
- script: 'docker push "jellyfin-web-unstable":"$(Build.BuildNumber)-all"'
|
|
||||||
displayName: 'Push Docker image (unstable)'
|
displayName: 'Push Docker image (unstable)'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
||||||
|
|
||||||
- script: 'docker push "jellyfin-web-stable":"$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )-all"'
|
- script: 'docker manifest create --amend "jellyfin-web":"unstable" "jellyfin-web":"unstable-$(Build.BuildNumber)"'
|
||||||
displayName: 'Push Docker image (stable)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
||||||
|
|
||||||
- script: 'docker manifest create --amend "jellyfin-web-unstable":"$(Build.BuildNumber)" "jellyfin-web-unstable":"$(Build.BuildNumber)"'
|
|
||||||
displayName: 'Create Docker manifest (unstable)'
|
displayName: 'Create Docker manifest (unstable)'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
||||||
|
|
||||||
- script: 'docker manifest create --amend "jellyfin-web-stable":"$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )" "jellyfin-web-stable":"$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )-all"'
|
- script: 'docker manifest push --purge "jellyfin-web":"unstable"'
|
||||||
displayName: 'Create Docker manifest (stable, versioned)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
||||||
|
|
||||||
- script: 'docker manifest create --amend "jellyfin-web-stable":"latest" "jellyfin-web-stable":"$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )-all"'
|
|
||||||
displayName: 'Create Docker manifest (stable, latest)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
|
||||||
|
|
||||||
- script: 'docker manifest push --purge "jellyfin-web-unstable":"$(Build.BuildNumber)"'
|
|
||||||
displayName: 'Push Docker manifest (unstable)'
|
displayName: 'Push Docker manifest (unstable)'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
||||||
|
|
||||||
- script: 'docker manifest push --purge "jellyfin-web-stable":"$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )"'
|
- script: 'docker build -f deployment/Dockerfile.docker -t "jellyfin-web":"stable-$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )" .'
|
||||||
displayName: 'Push Docker manifest (stable, versioned)'
|
displayName: 'Build Dockerfile (stable)'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||||
|
|
||||||
- script: 'docker manifest push --purge "jellyfin-web-stable":"latest"'
|
- script: 'docker push "jellyfin-web":"stable-$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )"'
|
||||||
|
displayName: 'Push Docker image (stable)'
|
||||||
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||||
|
|
||||||
|
- script: 'docker manifest create --amend "jellyfin-web":"stable" "jellyfin-web":"stable-$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )"'
|
||||||
|
displayName: 'Create Docker manifest (stable)'
|
||||||
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||||
|
|
||||||
|
- script: 'docker manifest push --purge "jellyfin-web-stable":"stable"'
|
||||||
displayName: 'Push Docker manifest (stable, latest)'
|
displayName: 'Push Docker manifest (stable, latest)'
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue