dotnet / dotnet/arcade-services

PushMetadataToBuildAssetRegistry should get no merged manifest properties from the environment

Open
#2,373 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
86
Forks
86
Avg merge
1d 8h
Merged PRs (30d)
35

Description

The merged manifest is somewhat generated off of the input manifests, but also generates some items off of the environment.

The merged manifest should be generated solely off of the input manifests. So basically, remove:
If the input manifests are missing those properties, they should be added in the source repo.

```
private string GetAzDevAccount()
{
var uri = new Uri(GetEnv("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"));
if (uri.Host == "dev.azure.com")
{
return uri.AbsolutePath.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries).First();
}

return uri.Host.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries).First();
}

private string GetAzDevProject()
{
return GetEnv("SYSTEM_TEAMPROJECT");
}

private string GetAzDevBuildNumber()
{
return GetEnv("BUILD_BUILDNUMBER");
}

private string GetAzDevRepository()
{
return GetEnv("BUILD_REPOSITORY_URI");
}

private string GetAzDevRepositoryName()
{
return GetEnv("BUILD_REPOSITORY_NAME");
}

private string GetAzDevBranch()
{
return GetEnv("BUILD_SOURCEBRANCH");
}

private int GetAzDevBuildId()
{
return int.Parse(GetEnv("BUILD_BUILDID"));
}

private int GetAzDevBuildDefinitionId()
{
return int.Parse(GetEnv("SYSTEM_DEFINITIONID"));
}

private string GetAzDevCommit()
{
return GetEnv("BUILD_SOURCEVERSION");
}
```

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.