docker-tools
docker-tools copied to clipboard
publishImageInfo command should not fail if there are no changes to push
When running a build that doesn't build any Dockerfiles due to everything being cached, the publish stage will fail when executing the publishImageInfo command:
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> LibGit2Sharp.EmptyCommitException: No changes; nothing to commit.
at LibGit2Sharp.Repository.Commit(String message, Signature author, Signature committer, CommitOptions options) in /_/LibGit2Sharp/Repository.cs:line 1081
at LibGit2Sharp.RepositoryExtensions.Commit(IRepository repository, String message, Signature author, Signature committer) in /_/LibGit2Sharp/RepositoryExtensions.cs:line 200
at Microsoft.DotNet.ImageBuilder.Commands.PublishImageInfoCommand.UpdateGitRepos(String repoPath, IRepository repo) in /image-builder/src/Commands/PublishImageInfoCommand.cs:line 91
at Microsoft.DotNet.ImageBuilder.Commands.PublishImageInfoCommand.ExecuteAsync() in /image-builder/src/Commands/PublishImageInfoCommand.cs:line 58
at Microsoft.DotNet.ImageBuilder.Commands.Command`2.<GetCliCommand>b__9_0(TOptions options) in /image-builder/src/Commands/Command.TOptions.cs:line 46
Instead, it should just provide a warning.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.