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

Add Docker update pipeline/yml, build asset JSON generation command #3

Merged
merged 4 commits into from
Sep 27, 2021

Conversation

dagood
Copy link
Member

@dagood dagood commented Sep 16, 2021

  • Add a build asset JSON generation command.

    • I'm trying to avoid calling this a "manifest" so it's hard to confuse it vs. the dockermanifest model. I call it a "summary" in a couple places.
  • Add a yaml pipeline that triggers on microsoft/go build completion and submits an auto-update PR to microsoft/go-docker. If a PR already exists, adds the commit to the end of the PR branch.

  • This PR doesn't include much error handling or retries, so updates running at the same time will race. I filed Add error handling/retries to Go -> Docker auto-update infra go#209 to track fixing that up.

  • Fix some assumptions about the branch model that I ran into while testing. Mostly, remove assumption that the PR will use a fork.

  • Simplify the update commands into just the one for update PRs. It always runs from this repo now, with a temp Git dir to clone go-docker.


Here's a testing PR: microsoft/go-images#7
I set up two microsoft/go dev branches to produce build asset JSON files and ran the update build once for each:

Here's what the dev branches did: https://github.com/microsoft/go/compare/dev/dagood/manifest?expand=1
I used go mod vendor on top of those changes to generate branches that would run in CI, because go-infra is private and I haven't set up auth. I want to set this repo public and use that when I submit the PR to microsoft/go.

@dagood dagood self-assigned this Sep 16, 2021
@dagood dagood requested a review from a team September 16, 2021 16:41
@dagood dagood marked this pull request as ready for review September 16, 2021 16:43
@dagood
Copy link
Member Author

dagood commented Sep 16, 2021

@microsoft/golang-compiler PTAL, this is most of the work remaining to get Go build -> Docker updates flowing. Significant chunk of Go util code, here.

eng/init-pwsh.sh Show resolved Hide resolved
buildmodel/buildassets/buildassets.go Outdated Show resolved Hide resolved
buildmodel/buildassets/buildassets.go Outdated Show resolved Hide resolved
buildmodel/buildassets/buildassets.go Outdated Show resolved Hide resolved
buildmodel/buildassets/buildassets.go Outdated Show resolved Hide resolved
buildmodel/buildassets/buildassets.go Show resolved Hide resolved
buildmodel/commands.go Outdated Show resolved Hide resolved
NewFromBuildResults -> CreateFromBuildResultsDirectory

Move "errors.Is" within the nil check

Use make for empty map rather than an empty initializer

In build output JSON, sort arch entries by URL for stable order

Rename "CreateBound*" -> "Bind*" for flags structs, and add more to comment
@RikkiGibson RikkiGibson self-assigned this Sep 27, 2021
@dagood dagood merged commit 36ab28c into main Sep 27, 2021
@dagood dagood deleted the dev/dagood/update branch September 27, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants