1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Attempt to use inbuilt Docker tasks

This commit is contained in:
Joshua M. Boniface 2020-06-14 19:59:32 -04:00
parent c4cc669ebf
commit cbae2f577e
2 changed files with 24 additions and 29 deletions

View file

@ -52,37 +52,31 @@ jobs:
vmImage: 'ubuntu-latest'
steps:
- script: 'docker build -f deployment/Dockerfile.docker -t "jellyfin-web":"unstable-$(Build.BuildNumber)" .'
displayName: 'Build Dockerfile (unstable)'
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
- task: Docker@2
displayName: "Build and Push Docker image (unstable)"
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
repository: "jellyfin/jellyfin-web"
command: buildAndPush
buildContext: '.'
Dockerfile: "deployment/Dockerfile.docker"
containerRegistry: Docker Hub
tags: |
unstable-$(Build.BuildNumber)
unstable
- script: 'docker push "jellyfin-web":"unstable-$(Build.BuildNumber)"'
displayName: 'Push Docker image (unstable)'
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
- script: 'docker manifest create --amend "jellyfin-web":"unstable" "jellyfin-web":"unstable-$(Build.BuildNumber)"'
displayName: 'Create Docker manifest (unstable)'
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
- script: 'docker manifest push --purge "jellyfin-web":"unstable"'
displayName: 'Push Docker manifest (unstable)'
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
- script: 'docker build -f deployment/Dockerfile.docker -t "jellyfin-web":"stable-$( sed "s|^refs/tags/v||g" <<<"$(Build.SourceBranch)" )" .'
displayName: 'Build Dockerfile (stable)'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
- 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)'
- task: Docker@2
displayName: "Build and Push Docker image (stable)"
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
inputs:
repository: "jellyfin/jellyfin-web"
command: buildAndPush
buildContext: '.'
Dockerfile: "deployment/Dockerfile.docker"
containerRegistry: Docker Hub
tags: |
stable-$(Build.BuildNumber)
stable
- job: Collect
displayName: 'Collect Artifacts'

View file

@ -7,5 +7,6 @@ RUN apk add autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool ma
WORKDIR ${SOURCE_DIR}/
COPY . .
RUN ls -al .
RUN yarn install && mv dist ${ARTIFACT_DIR}