Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to start pushing packages to blob Feed and to BAR #361

Merged
merged 2 commits into from Apr 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 32 additions & 1 deletion .vsts-ci.yml
Expand Up @@ -175,6 +175,7 @@ jobs:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
enableMicrobuild: true
enablePublishBuildAssets: true
steps:
- task: DownloadBuildArtifacts@0
displayName: Download Built Managed Assets
Expand All @@ -189,11 +190,13 @@ jobs:
- script: build.cmd -ci -sign
-configuration $(_BuildConfig)
-prepareMachine
-publish
/p:ProductBuild=false
/p:ToolsBuild=false
/p:SampleBuild=false
/p:BuildTests=false
/p:BuildPackages=true
$(_InternalBuildArgs)
name: Build
displayName: Build
condition: succeeded()
Expand All @@ -209,6 +212,29 @@ jobs:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- _TeamName: DotNetCore
- _SignType: real
- _DotNetPublishToBlobFeed : true
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: DotNet-Blob-Feed
- group: Publish-Build-Assets
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-iot/index.json
- _InternalBuildArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
dependsOn:
- BuildPackages
agentOs: Windows_NT
name: PublishToBlobFeed
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
pool:
name: NetCoreInternal-Int-Pool
queue: buildpool.windows.10.amd64.vs2017

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/job.yml
Expand All @@ -217,9 +243,14 @@ jobs:
- BuildPackages
agentOs: Windows_NT
name: PublishToMyGet
displayName: Publish To MyGet
enableTelemetry: $(_enableTelemetry)
enablePublishBuildArtifacts: true
helixRepo: dotnet/iot
strategy:
matrix:
release_configuration:
_BuildConfig: Release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could also just set this as

variables:
- _BuildConfig: Release

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true in this case since we only build the one configuration but I leave as is if that's ok for consistency with the other jobs which do have more than one configuration.

pool:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCoreInternal-Int-Pool
Expand All @@ -239,7 +270,7 @@ jobs:
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnet-myget-org-api-key'
- script: powershell -ExecutionPolicy ByPass -NoProfile -command "& """$(Build.SourcesDirectory)\eng\common\Build.ps1""" -restore" &&
for /f %%x in ('dir /s /b $(Build.SourcesDirectory)\artifacts\packages\pushToMyGet\*.nupkg') do $(Build.SourcesDirectory)\.dotnet\dotnet.exe nuget push %%x -k $(dotnet-myget-org-api-key) -s https://dotnet.myget.org/F/dotnet-core/
for /f %%x in ('dir /s /b $(Build.SourcesDirectory)\artifacts\packages\pushToMyGet\*.nupkg') do dotnet nuget push %%x -k $(dotnet-myget-org-api-key) -s https://dotnet.myget.org/F/dotnet-core/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Arcade really not provide support for publishing to myget?

Rather than using the AzureKeyVault task above, I'd suggest you use the "DotNet-MyGet-Publish" variable group.

variables:
  - group: DotNet-MyGet-Publish

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might support it, but at least it didn't back when I initially added this since we were moving away from it. I'll switch to use the group as you suggest.

name: PublishPackages
displayName: Publishing Packages to MyGet
condition: succeeded()