dotnet / dotnet-docker

Docker images for .NET and the .NET Tools.
https://hub.docker.com/_/microsoft-dotnet
MIT License
4.45k stars 1.93k forks source link

Integrate with .NET Core release pipeline #1267

Open mthalman opened 5 years ago

mthalman commented 5 years ago

It would be nice to have an integrated solution for building/testing/publishing the .NET Core Docker images as part of the .NET Core product's release pipeline. Today, it's completely separate with just a manual task placeholder in the current release pipeline representing the task to publish the images. It would be slick to have that task integrate with our current pipeline instead.

MichaelSimons commented 4 years ago

Capturing some thoughts on how this could be implemented.

Release Pipeline (Internal): https://dev.azure.com/dnceng/internal/_release?definitionId=5&view=mine&_a=releases

Required Dependencies:

  1. MCR flow, programmatic ingestion confirmation
  2. Git commit based Dockerfile links

Manual Preconditions:

  1. .NET Core Docker release PR
    1. Prepared by .NET Core Docker devs
    2. Includes all Dockerfile, manifest, readme, etc. changes for the release
    3. Should be reviewed
    4. Green PR Validation

Release Pipeline Integration:

  1. Prepare Docker Images
    1. Dependency: Publish of .NET Core assets to blob storage (Wait For Publish To Complete?)
    2. Merge .NET Core Docker release PR
      1. Input: PR #
      2. Note: PR must be merged prior to building in order to ensure the correct commit shas are included in the readmes
    3. Trigger Build
      1. Queue Build stage
        1. Input: Release version (get transformed into a build filter to only build released versions)
      2. Store BuildId
      3. Note: This may require one stage to queue the build and another to wait for completion
  2. Validate and publish Docker Images
    1. Dependency: NuGet publish (NuGet Push and Validate)
    2. Trigger Build
      1. Queue Test and Publish stages
        1. Input: Release version (get transformed into a build filter to only build released versions)
        2. Input: Build stage build id
      2. Wait on MCR ingestion completion (MCR ingestion confirmation)
      3. Note: This may require one stage to queue the build and another to wait for completion