dotnet / dotnet/docker-tools

image-info.json's `commitUrl` is incorrect when manifest is not in repo root

Open
#2,165 0 comments 0 reactions 1 assignee Claimed by @lbussell View on GitHub
area-infrastructure
Dominant language
C#
Stars
181
Forks
67
Avg merge
2d 15h
Merged PRs (30d)
10

Description

Example: https://github.com/dotnet/versions/blob/ff091bf000d8cbdd8aa8822b2122f536b6f9a562/build-info/docker/image-info.dotnet-docker-tools-main-imagebuilder.json#L29

https://github.com/dotnet/dotnet-docker/blob/30a3bfe0a3bbe1baae8ed261081f97147fc6c275/Dockerfile.linux is not a valid location. It should be https://github.com/dotnet/docker-tools/blob/30a3bfe0a3bbe1baae8ed261081f97147fc6c275/src/Dockerfile.linux instead.

(Unrelated to this issue, it looks like this repo has the git repo URL set incorrectly as well)

The calculation for `commitUrl` computes the path relative to the manifest file, but the git URL calculation assumes that it is relative to the root of the repo.

**Suggested fix**: Update Dockerfile path calculation to be relative to the root of the repo.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.