Attempt to use inbuilt Docker tasks
This commit is contained in:
parent
c4cc669ebf
commit
cbae2f577e
2 changed files with 24 additions and 29 deletions
|
@ -52,37 +52,31 @@ jobs:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: 'docker build -f deployment/Dockerfile.docker -t "jellyfin-web":"unstable-$(Build.BuildNumber)" .'
|
- task: Docker@2
|
||||||
displayName: 'Build Dockerfile (unstable)'
|
displayName: "Build and Push Docker image (unstable)"
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/package')
|
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)"'
|
- task: Docker@2
|
||||||
displayName: 'Push Docker image (unstable)'
|
displayName: "Build and Push Docker image (stable)"
|
||||||
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)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
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
|
- job: Collect
|
||||||
displayName: 'Collect Artifacts'
|
displayName: 'Collect Artifacts'
|
||||||
|
|
|
@ -7,5 +7,6 @@ RUN apk add autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool ma
|
||||||
|
|
||||||
WORKDIR ${SOURCE_DIR}/
|
WORKDIR ${SOURCE_DIR}/
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN ls -al .
|
||||||
|
|
||||||
RUN yarn install && mv dist ${ARTIFACT_DIR}
|
RUN yarn install && mv dist ${ARTIFACT_DIR}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue