diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a9c34b1..414ad1e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,16 +1,20 @@ parameters: - name: runtimeBranch - displayName: Branch for runtime repository + displayName: Tag for runtime repository type: string - default: v5.0.3 + default: v6.0.0-preview.5 - name: aspBranch - displayName: Branch for aspnetcore repository + displayName: Tag for aspnetcore repository type: string - default: v5.0.3 + default: v6.0.0-preview.5 - name: sdkBranch - displayName: Branch for installer repository + displayName: Tag for sdk repository type: string - default: v5.0.103 + default: v6.0.100-preview.5 +- name: installerBranch + displayName: Tag for installer repository + type: string + default: v6.0.100-preview.5 variables: runCounter: $[counter('runNumber', 1)] @@ -27,6 +31,11 @@ resources: endpoint: Servarr name: dotnet/aspnetcore ref: release/5.0 + - repository: sdk + type: github + endpoint: Servarr + name: dotnet/sdk + ref: release/5.0.1xx - repository: installer type: github endpoint: Servarr @@ -43,6 +52,7 @@ pr: stages: - stage: Runtime + dependsOn: [] pool: vmImage: 'ubuntu-20.04' @@ -62,17 +72,57 @@ stages: - checkout: runtime - bash: | set -e - git -C runtime checkout ${{ parameters.runtimeBranch }} + git -C runtime tag | grep ${{ parameters.runtimeBranch }} | xargs git -C runtime checkout + git -C runtime revert -n 6055dfa7ecb7628fdb2570d8897e83520f69f280 sed -i '/\/dnceng\/internal\//d' runtime/NuGet.config displayName: Checkout and patch - bash: | - DOTNET_DOCKER_TAG="mcr.microsoft.com/dotnet-buildtools/prereqs:$(curl -s https://raw.githubusercontent.com/dotnet/versions/master/build-info/docker/image-info.dotnet-dotnet-buildtools-prereqs-docker-main.json | jq -r '.repos[0].images[] | select(.platforms[0].dockerfile | contains("freebsd/11")) | .platforms[0].simpleTags[0]')" + source dotnet-bsd/common.sh + get_runtime_docker echo $DOTNET_DOCKER_TAG - docker run -e ROOTFS_DIR=/crossrootfs/x64 -v ${BUILD_SOURCESDIRECTORY}/runtime:/runtime $DOTNET_DOCKER_TAG /runtime/build.sh -ci -c Release -cross -os freebsd /p:BuildNumberMajor=21102 /p:BuildNumberMinor=12 /p:OfficialBuildId=20210202.12 /p:IsEligibleForNgenOptimization=false + calculate_build_id $(git -C runtime tag --points-at HEAD) + echo $OFFICIALBUILDID + docker run -e ROOTFS_DIR=/crossrootfs/x64 -v ${BUILD_SOURCESDIRECTORY}/runtime:/runtime $DOTNET_DOCKER_TAG /runtime/eng/build.sh -ci -c Release -cross -os freebsd /p:IsEligibleForNgenOptimization=false /p:OfficialBuildId=$OFFICIALBUILDID || true displayName: Build Runtime - publish: '$(Build.SourcesDirectory)/runtime/artifacts/packages/Release/Shipping' artifact: RuntimePackages displayName: Publish Runtime + - publish: '$(Build.SourcesDirectory)/runtime/artifacts/log' + condition: succeededOrFailed() + artifact: RuntimeLogs + displayName: Publish Build Logs + + - stage: Sdk + dependsOn: [] + + pool: + vmImage: 'ubuntu-20.04' + + jobs: + - job: Sdk + timeoutInMinutes: 0 + steps: + - checkout: self + - checkout: sdk + - bash: | + set -e + git -C sdk tag | grep ${{ parameters.sdkBranch }} | xargs git -C sdk checkout + git -C sdk revert -n 9a1e8af8667f9315b5c9a61aae3f5c07d467f37c -m 1 -Xours + displayName: Checkout and patch + - bash: | + source dotnet-bsd/common.sh + calculate_build_id $(git -C sdk tag --points-at HEAD) + echo $OFFICIALBUILDID + sdk/build.sh -c Release -pack -ci /p:OfficialBuildId=$OFFICIALBUILDID + displayName: Build SDK + - publish: '$(Build.SourcesDirectory)/sdk/artifacts/packages/Release/NonShipping/' + artifact: SdkPackages + displayName: Publish SDK + - publish: '$(Build.SourcesDirectory)/sdk/artifacts/log' + condition: succeededOrFailed() + artifact: SdkLogs + displayName: Publish Build Logs + - stage: AspNetCore dependsOn: Runtime @@ -87,12 +137,13 @@ stages: submodules: true - bash: | set -e - git -C aspnetcore checkout ${{ parameters.aspBranch }} + git -C aspnetcore tag | grep ${{ parameters.aspBranch }} | xargs git -C aspnetcore checkout sed -i '/linux-x64;/a \ \ \ \ \ \ freebsd-x64;' aspnetcore/Directory.Build.props sed -i '//a \ \ \ \ ' aspnetcore/eng/Dependencies.props + sed -i 's/