Skip to content

Commit 94a21e2

Browse files
committed
remove named_git_references for shared_configuration
1 parent 244146f commit 94a21e2

File tree

4 files changed

+19
-27
lines changed

4 files changed

+19
-27
lines changed

config/assembler.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ environments:
3030
content_source: edge
3131
path_prefix: docs
3232

33-
named_git_references:
34-
stack:
35-
current: &stack_current 9.0
36-
next: &stack_next 9.1
37-
edge: &stack_edge main
38-
39-
cloud-hosted: ms-120
33+
shared_configuration:
34+
stack: &stack
35+
current: 9.0
36+
next: 9.1
37+
edge: main
4038

4139
###
4240
# 'narrative' shares the same keys as keys in 'references' (<repository_config>)
@@ -71,10 +69,7 @@ references:
7169
apm-agent-rum-js:
7270
apm-aws-lambda:
7371
apm-k8s-attacher:
74-
beats:
75-
current: *stack_current
76-
next: *stack_next
77-
edge: *stack_edge
72+
beats: *stack
7873
ecs-dotnet:
7974
ecs-logging-go-logrus:
8075
ecs-logging-go-zap:
@@ -85,10 +80,7 @@ references:
8580
ecs-logging-python:
8681
ecs-logging-ruby:
8782
ecs-logging:
88-
ecs:
89-
current: *stack_current
90-
next: *stack_next
91-
edge: *stack_edge
83+
ecs: *stack
9284
elastic-otel-dotnet:
9385
elastic-otel-java:
9486
elastic-otel-node:
@@ -98,10 +90,7 @@ references:
9890
integration-docs:
9991
integrations:
10092
logstash-docs-md:
101-
logstash:
102-
current: *stack_current
103-
next: *stack_next
104-
edge: *stack_edge
93+
logstash: *stack
10594
opentelemetry:
10695

10796
# @elastic/admin-docs

src/Elastic.Documentation.Configuration/Assembler/AssemblyConfiguration.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System.Text.RegularExpressions;
66
using Elastic.Documentation.Extensions;
7+
using YamlDotNet.RepresentationModel;
78
using YamlDotNet.Serialization;
89
using YamlStaticContext = Elastic.Documentation.Configuration.Serialization.YamlStaticContext;
910

@@ -82,8 +83,8 @@ private static TRepository RepositoryDefaults<TRepository>(TRepository r, string
8283
[YamlMember(Alias = "environments")]
8384
public Dictionary<string, PublishEnvironment> Environments { get; set; } = [];
8485

85-
[YamlMember(Alias = "named_git_references")]
86-
public Dictionary<string, string> NamedGitReferences { get; set; } = [];
86+
[YamlMember(Alias = "shared_configuration")]
87+
public Dictionary<string, Repository> SharedConfigurations { get; set; } = [];
8788

8889
/// Returns whether the <paramref name="branchOrTag"/> is configured as an integration branch or tag for the given
8990
/// <paramref name="repository"/>.

src/Elastic.Documentation.Configuration/Assembler/Repository.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ public record Repository
2929
[YamlMember(Alias = "repo")]
3030
public string Origin { get; set; } = string.Empty;
3131

32+
[YamlMember(Alias = "checkout_strategy")]
33+
public CheckoutStrategy CheckoutStrategy { get; set; } = CheckoutStrategy.Partial;
34+
35+
[YamlMember(Alias = "skip")]
36+
public bool Skip { get; set; }
37+
3238
[YamlMember(Alias = "current")]
3339
public string GitReferenceCurrent { get; set; } = "main";
3440

@@ -38,17 +44,12 @@ public record Repository
3844
[YamlMember(Alias = "edge")]
3945
public string GitReferenceEdge { get; set; } = "main";
4046

41-
[YamlMember(Alias = "checkout_strategy")]
42-
public CheckoutStrategy CheckoutStrategy { get; set; } = CheckoutStrategy.Partial;
43-
44-
[YamlMember(Alias = "skip")]
45-
public bool Skip { get; set; }
46-
4747
public string GetBranch(ContentSource contentSource) => contentSource switch
4848
{
4949
ContentSource.Current => GitReferenceCurrent,
5050
ContentSource.Next => GitReferenceNext,
5151
ContentSource.Edge => GitReferenceEdge,
5252
_ => throw new ArgumentException($"The content source {contentSource} is not supported.", nameof(contentSource))
5353
};
54+
5455
}

src/Elastic.Documentation.Configuration/Serialization/YamlStaticContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using Elastic.Documentation.Configuration.Assembler;
66
using Elastic.Documentation.Configuration.Versions;
7+
using YamlDotNet.RepresentationModel;
78
using YamlDotNet.Serialization;
89

910
namespace Elastic.Documentation.Configuration.Serialization;

0 commit comments

Comments
 (0)