From 268fe5efe8cd677d7637162e400f349f35aae181 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 11:11:46 +0200 Subject: [PATCH 1/8] Small attempts at making previous build downloads work. --- .ci/azure-pipelines.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index b3389caba9..3a583b409e 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -122,19 +122,14 @@ jobs: displayName: Download the Reference Assembly Build Artifact inputs: buildType: 'specific' # Options: current, specific - project: $(System.TeamProjectId) # Required when buildType == Specific - pipeline: $(System.DefinitionId) # Required when buildType == Specific, not sure if this will take a name too + project: '$(System.TeamProjectId)' # Required when buildType == Specific + pipeline: '$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too #specificBuildWithTriggering: false # Optional buildVersionToDownload: 'latestFromBranch' # Required when buildType == Specific# Options: latest, latestFromBranch, specific - allowPartiallySucceededBuilds: false # Optional - branchName: '$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch - #buildId: # Required when buildType == Specific && BuildVersionToDownload == Specific - #tags: # Optional + branchName: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch downloadType: 'single' # Options: single, specific - artifactName: '$(NugetPackageName)'# Required when downloadType == Single - #itemPattern: '**' # Optional + artifactName: '$(NugetPackageName)' # Required when downloadType == Single downloadPath: '$(System.ArtifactsDirectory)/current-artifacts' - #parallelizationLimit: '8' # Optional - task: CopyFiles@2 displayName: Copy Nuget Assembly to current-release folder From 34621471957a94fb6ab15c6c8b7cd57f2aa38f64 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 11:17:48 +0200 Subject: [PATCH 2/8] Switched to latest ubuntu image and hardcoded definitionId. --- .ci/azure-pipelines.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 3a583b409e..8737a03226 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -16,7 +16,7 @@ jobs: - job: main_build displayName: Main Build pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-latest strategy: matrix: release: @@ -97,9 +97,9 @@ jobs: - job: dotnet_compat displayName: Compatibility Check pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-latest dependsOn: main_build - condition: false #and(succeeded(), variables['System.PullRequest.PullRequestNumber']) # Only execute if the pullrequest numer is defined. (So not for normal CI builds) + condition: and(succeeded(), variables['System.PullRequest.PullRequestNumber']) # Only execute if the pullrequest numer is defined. (So not for normal CI builds) strategy: matrix: Naming: @@ -122,8 +122,8 @@ jobs: displayName: Download the Reference Assembly Build Artifact inputs: buildType: 'specific' # Options: current, specific - project: '$(System.TeamProjectId)' # Required when buildType == Specific - pipeline: '$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too + project: 'jellyfin' #$(System.TeamProjectId)' # Required when buildType == Specific + pipeline: 1 #'$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too #specificBuildWithTriggering: false # Optional buildVersionToDownload: 'latestFromBranch' # Required when buildType == Specific# Options: latest, latestFromBranch, specific branchName: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch From 46623bc9859992ad76f9e63c3a99cbb5e290baa9 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 11:32:25 +0200 Subject: [PATCH 3/8] Try with hardcoded name. --- .ci/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 8737a03226..8242958080 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -123,7 +123,7 @@ jobs: inputs: buildType: 'specific' # Options: current, specific project: 'jellyfin' #$(System.TeamProjectId)' # Required when buildType == Specific - pipeline: 1 #'$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too + pipeline: 'Jellyfin CI' #'$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too #specificBuildWithTriggering: false # Optional buildVersionToDownload: 'latestFromBranch' # Required when buildType == Specific# Options: latest, latestFromBranch, specific branchName: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch From 272691aacd3b5c247ea3fc5a9952a27dbc3e4a30 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 11:37:14 +0200 Subject: [PATCH 4/8] Switched to specific download. --- .ci/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 8242958080..9b276604a2 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -126,8 +126,8 @@ jobs: pipeline: 'Jellyfin CI' #'$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too #specificBuildWithTriggering: false # Optional buildVersionToDownload: 'latestFromBranch' # Required when buildType == Specific# Options: latest, latestFromBranch, specific - branchName: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch - downloadType: 'single' # Options: single, specific + branchName: '$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch + downloadType: 'specific' # Options: single, specific artifactName: '$(NugetPackageName)' # Required when downloadType == Single downloadPath: '$(System.ArtifactsDirectory)/current-artifacts' From ff373621b30412f9c633b207d2fec894f8cbd92e Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 12:02:35 +0200 Subject: [PATCH 5/8] Switch to next gen artifacts. --- .ci/azure-pipelines.yml | 58 +++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 9b276604a2..08de99c4e6 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -66,32 +66,32 @@ jobs: # artifactName: 'jellyfin-build-$(BuildConfiguration)' # zipAfterPublish: true - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact Naming' condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded()) inputs: - PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/Emby.Naming.dll' + targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/Emby.Naming.dll' artifactName: 'Jellyfin.Naming' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact Controller' condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded()) inputs: - PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Controller.dll' + targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Controller.dll' artifactName: 'Jellyfin.Controller' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact Model' condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded()) inputs: - PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Model.dll' + targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Model.dll' artifactName: 'Jellyfin.Model' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact Common' condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded()) inputs: - PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Common.dll' + targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Common.dll' artifactName: 'Jellyfin.Common' - job: dotnet_compat @@ -118,18 +118,20 @@ jobs: steps: - checkout: none - - task: DownloadBuildArtifacts@0 + - task: DownloadPipelineArtifact@2 displayName: Download the Reference Assembly Build Artifact inputs: - buildType: 'specific' # Options: current, specific - project: 'jellyfin' #$(System.TeamProjectId)' # Required when buildType == Specific - pipeline: 'Jellyfin CI' #'$(System.DefinitionId)' # Required when buildType == Specific, not sure if this will take a name too - #specificBuildWithTriggering: false # Optional - buildVersionToDownload: 'latestFromBranch' # Required when buildType == Specific# Options: latest, latestFromBranch, specific - branchName: '$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch - downloadType: 'specific' # Options: single, specific - artifactName: '$(NugetPackageName)' # Required when downloadType == Single - downloadPath: '$(System.ArtifactsDirectory)/current-artifacts' + source: 'specific' # Options: current, specific + #preferTriggeringPipeline: false # Optional + #tags: # Optional + artifact: '$(NugetPackageName)' # Optional + #patterns: '**' # Optional + path: '$(System.ArtifactsDirectory)/current-artifacts' + project: '$(System.TeamProjectId)' # Required when source == Specific + pipeline: '$(System.DefinitionId)' # Required when source == Specific + runVersion: 'latestFromBranch' # Required when source == Specific. Options: latest, latestFromBranch, specific + runBranch: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when source == Specific && runVersion == LatestFromBranch + #runId: # Required when source == Specific && runVersion == Specific - task: CopyFiles@2 displayName: Copy Nuget Assembly to current-release folder @@ -139,16 +141,22 @@ jobs: targetFolder: $(System.ArtifactsDirectory)/current-release cleanTargetFolder: true # Optional overWrite: true # Optional - flattenFolders: true # Optional + flattenFolders: true # Optional - - task: DownloadBuildArtifacts@0 + - task: DownloadPipelineArtifact@2 displayName: Download the New Assembly Build Artifact inputs: - buildType: 'current' # Options: current, specific - allowPartiallySucceededBuilds: false # Optional - downloadType: 'single' # Options: single, specific - artifactName: '$(NugetPackageName)' # Required when downloadType == Single - downloadPath: '$(System.ArtifactsDirectory)/new-artifacts' + source: 'current' # Options: current, specific + #preferTriggeringPipeline: false # Optional + #tags: # Optional + artifact: '$(NugetPackageName)' # Optional + #patterns: '**' # Optional + path: '$(System.ArtifactsDirectory)/new-artifacts' + #project: # Required when source == Specific + #pipeline: # Required when source == Specific + runVersion: 'latest' # Required when source == Specific. Options: latest, latestFromBranch, specific + #runBranch: 'refs/heads/master' # Required when source == Specific && runVersion == LatestFromBranch + #runId: # Required when source == Specific && runVersion == Specific - task: CopyFiles@2 displayName: Copy Artifact Assembly to new-release folder From dc68fa2c8b2663e8e593ef1e9cb7c5e6e42a8d33 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 12:06:01 +0200 Subject: [PATCH 6/8] Disable seperate build and restore. --- .ci/azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 08de99c4e6..2a96bec071 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -35,12 +35,14 @@ jobs: inputs: command: restore projects: '$(RestoreBuildProjects)' + enabled: false - task: DotNetCoreCLI@2 displayName: Build inputs: projects: '$(RestoreBuildProjects)' arguments: '--configuration $(BuildConfiguration)' + enabled: false - task: DotNetCoreCLI@2 displayName: Test From 08421311b969b517889a180c64cdebef09e8c807 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 12:10:57 +0200 Subject: [PATCH 7/8] Switch download order around. --- .ci/azure-pipelines.yml | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 2a96bec071..3ab0aa37b0 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -120,31 +120,6 @@ jobs: steps: - checkout: none - - task: DownloadPipelineArtifact@2 - displayName: Download the Reference Assembly Build Artifact - inputs: - source: 'specific' # Options: current, specific - #preferTriggeringPipeline: false # Optional - #tags: # Optional - artifact: '$(NugetPackageName)' # Optional - #patterns: '**' # Optional - path: '$(System.ArtifactsDirectory)/current-artifacts' - project: '$(System.TeamProjectId)' # Required when source == Specific - pipeline: '$(System.DefinitionId)' # Required when source == Specific - runVersion: 'latestFromBranch' # Required when source == Specific. Options: latest, latestFromBranch, specific - runBranch: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when source == Specific && runVersion == LatestFromBranch - #runId: # Required when source == Specific && runVersion == Specific - - - task: CopyFiles@2 - displayName: Copy Nuget Assembly to current-release folder - inputs: - sourceFolder: $(System.ArtifactsDirectory)/current-artifacts # Optional - contents: '**/*.dll' - targetFolder: $(System.ArtifactsDirectory)/current-release - cleanTargetFolder: true # Optional - overWrite: true # Optional - flattenFolders: true # Optional - - task: DownloadPipelineArtifact@2 displayName: Download the New Assembly Build Artifact inputs: @@ -170,6 +145,31 @@ jobs: overWrite: true # Optional flattenFolders: true # Optional + - task: DownloadPipelineArtifact@2 + displayName: Download the Reference Assembly Build Artifact + inputs: + source: 'specific' # Options: current, specific + #preferTriggeringPipeline: false # Optional + #tags: # Optional + artifact: '$(NugetPackageName)' # Optional + #patterns: '**' # Optional + path: '$(System.ArtifactsDirectory)/current-artifacts' + project: '$(System.TeamProjectId)' # Required when source == Specific + pipeline: '$(System.DefinitionId)' # Required when source == Specific + runVersion: 'latestFromBranch' # Required when source == Specific. Options: latest, latestFromBranch, specific + runBranch: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when source == Specific && runVersion == LatestFromBranch + #runId: # Required when source == Specific && runVersion == Specific + + - task: CopyFiles@2 + displayName: Copy Nuget Assembly to current-release folder + inputs: + sourceFolder: $(System.ArtifactsDirectory)/current-artifacts # Optional + contents: '**/*.dll' + targetFolder: $(System.ArtifactsDirectory)/current-release + cleanTargetFolder: true # Optional + overWrite: true # Optional + flattenFolders: true # Optional + - task: DownloadGitHubRelease@0 displayName: Download ABI compatibility check tool from GitHub inputs: From 2c8df077535f10377dd7bb59a08f94617869721e Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Fri, 5 Jul 2019 13:03:34 +0200 Subject: [PATCH 8/8] Fix some task names. --- .ci/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 3ab0aa37b0..3884765ec1 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -136,7 +136,7 @@ jobs: #runId: # Required when source == Specific && runVersion == Specific - task: CopyFiles@2 - displayName: Copy Artifact Assembly to new-release folder + displayName: Copy New Assembly to new-release folder inputs: sourceFolder: $(System.ArtifactsDirectory)/new-artifacts # Optional contents: '**/*.dll' @@ -161,7 +161,7 @@ jobs: #runId: # Required when source == Specific && runVersion == Specific - task: CopyFiles@2 - displayName: Copy Nuget Assembly to current-release folder + displayName: Copy Reference Assembly to current-release folder inputs: sourceFolder: $(System.ArtifactsDirectory)/current-artifacts # Optional contents: '**/*.dll'