Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ public ContentSourceMatch Match(ILoggerFactory logFactory, string repository, st
var current = r.GetBranch(ContentSource.Current);
var next = r.GetBranch(ContentSource.Next);
var edge = r.GetBranch(ContentSource.Edge);
logger.LogInformation("Active content-sources for {Repository}. current: {Current}, next: {Next}, edge: {Edge}' ", repository, current, next, edge);
var isCdWorkflow = current == next && next == edge;
logger.LogInformation("Active content-sources for {Repository}. current: {Current}, next: {Next}, edge: {Edge} (branching strategy: {Strategy})",
repository, current, next, edge, isCdWorkflow ? "cd/continuous-deployment" : "tagged-release");
if (current == branchOrTag)
{
logger.LogInformation("Content-Source current: {Current} matches: {Branch}", current, branchOrTag);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ public async Task<bool> ShouldBuild(IDiagnosticsCollector collector, string? rep
if (string.IsNullOrEmpty(refName))
throw new ArgumentNullException(nameof(branchOrTag));

// the link registry uses short repository names (e.g. "kibana"), not full names (e.g. "elastic/kibana")
var repoTokens = repo.Split('/');
var repositoryName = repoTokens.Last();

// environment does not matter to check the configuration, defaulting to dev
var linkIndexProvider = Aws3LinkIndexReader.CreateAnonymous();
var linkRegistry = await GetRegistryWithRetry(linkIndexProvider, ctx);
var alreadyPublishing = linkRegistry.Repositories.ContainsKey(repo);
_logger.LogInformation("'{Repository}' publishing to link registry: {PublishState} ", repo, alreadyPublishing);
var alreadyPublishing = linkRegistry.Repositories.ContainsKey(repositoryName);
_logger.LogInformation("'{Repository}' (registry key: '{RepositoryName}') publishing to link registry: {PublishState} ", repo, repositoryName, alreadyPublishing);
var assembleContext = new AssembleContext(configuration, configurationContext, "dev", collector, fileSystem, fileSystem, null, null);
var product = assembleContext.ProductsConfiguration.GetProductByRepositoryName(repo);
var matches = assembleContext.Configuration.Match(logFactory, repo, refName, product, alreadyPublishing);
Expand Down
Loading