jellyfin-web/.ci/azure-pipelines-package.yml
2020-06-12 17:24:20 -04:00

60 lines
2.2 KiB
YAML

jobs:
- job: Package
displayName: 'Package'
strategy:
matrix:
CentOS:
BuildConfiguration: centos
Debian:
BuildConfiguration: debian
Fedora:
BuildConfiguration: fedora
Portable:
BuildConfiguration: portable
pool:
vmImage: 'ubuntu-latest'
steps:
- script: 'docker build -f deployment/Dockerfile.$(BuildConfiguration) -t jellyfin-web-$(BuildConfiguration) deployment'
displayName: 'Build Dockerfile'
- script: 'docker image ls -a && docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e IS_UNSTABLE="yes" -e BUILD_ID=$(Build.BuildNumber) jellyfin-web-$(BuildConfiguration)'
displayName: 'Run Dockerfile (unstable)'
condition: eq(variables['Build.SourceBranch'], 'refs/heads/package')
- script: 'docker image ls -a && docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e IS_UNSTABLE="no" -e BUILD_ID=$(Build.BuildNumber) jellyfin-web-$(BuildConfiguration)'
displayName: 'Run Dockerfile (stable)'
condition: ne(variables['Build.SourceBranch'], 'refs/heads/package')
- task: PublishPipelineArtifact@1
displayName: 'Publish Release'
inputs:
targetPath: '$(Build.SourcesDirectory)/deployment/dist'
artifactName: 'jellyfin-web-$(BuildConfiguration)'
- task: CopyFilesOverSSH@0
displayName: 'Upload artifacts to repository server'
inputs:
sshEndpoint: repository
sourceFolder: '$(Build.SourcesDirectory)/deployment/dist'
contents: '**'
targetFolder: '/srv/repository/incoming/azure/$(Build.BuildNumber)/$(BuildConfiguration)'
- task: SSH@0
displayName: 'Collect packages into repositories (unstable)'
condition: eq(variables['Build.SourceBranch'], 'refs/heads/package')
inputs:
sshEndpoint: repository
runOptions: 'inline'
inline: '/srv/repository/collect-server.azure.sh /srv/repository/incoming/azure $(Build.BuildNumber) unstable'
- task: SSH@0
displayName: 'Collect packages into repositories (stable)'
condition: ne(variables['Build.SourceBranch'], 'refs/heads/package')
inputs:
sshEndpoint: repository
runOptions: 'inline'
inline: '/srv/repository/collect-server.azure.sh /srv/repository/incoming/azure $(Build.BuildNumber)'