@firestartr/cli 2.11.0-snapshot-gh-pages-public-https-2 → 2.11.0-snapshot-orgsettings-binding-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1055 -94
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +458 -18
- package/build/packages/cdk8s_renderer/src/charts/github/index.d.ts +1 -0
- package/build/packages/cdk8s_renderer/src/charts/github/orgSecretSectionChart.d.ts +8 -0
- package/build/packages/cdk8s_renderer/src/charts/index.d.ts +2 -1
- package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +88 -27
- package/build/packages/cdk8s_renderer/src/claims/github/component.schema.d.ts +23 -1
- package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +88 -27
- package/build/packages/cdk8s_renderer/src/claims/github/orgSecrets.schema.d.ts +67 -0
- package/build/packages/cdk8s_renderer/src/claims/github/orgSettings.d.ts +20 -0
- package/build/packages/cdk8s_renderer/src/claims/github/orgsettings.schema.d.ts +24 -0
- package/build/packages/cdk8s_renderer/src/claims/github/repository.d.ts +9 -2
- package/build/packages/cdk8s_renderer/src/renderer/claims-render.d.ts +1 -1
- package/build/packages/cdk8s_renderer/src/validations/githubOrgSecretSection.d.ts +4 -0
- package/build/packages/gh_provisioner/src/entities/ghorgsecretsection/index.d.ts +7 -0
- package/build/packages/gh_provisioner/src/entities/ghorgsecretsection/secrets.d.ts +16 -0
- package/build/packages/gh_provisioner/src/entities/ghrepo/index.d.ts +6 -1
- package/build/packages/github/index.d.ts +7 -1
- package/build/packages/github/src/orgSecrets.d.ts +10 -0
- package/package.json +1 -1
- package/build/packages/cdk8s_renderer/src/claims/github/pages.d.ts +0 -11
- package/build/packages/cdk8s_renderer/src/claims/github/pages.schema.d.ts +0 -52
|
@@ -137,7 +137,29 @@ declare const _default: {
|
|
|
137
137
|
type: string;
|
|
138
138
|
};
|
|
139
139
|
pages: {
|
|
140
|
-
|
|
140
|
+
type: string;
|
|
141
|
+
properties: {
|
|
142
|
+
cname: {
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
buildType: {
|
|
146
|
+
type: string;
|
|
147
|
+
enum: string[];
|
|
148
|
+
};
|
|
149
|
+
source: {
|
|
150
|
+
type: string;
|
|
151
|
+
properties: {
|
|
152
|
+
branch: {
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
path: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
additionalProperties: boolean;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
additionalProperties: boolean;
|
|
141
163
|
};
|
|
142
164
|
additionalRules: {
|
|
143
165
|
type: string;
|
|
@@ -264,7 +264,29 @@ export declare const GithubSchemas: ({
|
|
|
264
264
|
type: string;
|
|
265
265
|
};
|
|
266
266
|
pages: {
|
|
267
|
-
|
|
267
|
+
type: string;
|
|
268
|
+
properties: {
|
|
269
|
+
cname: {
|
|
270
|
+
type: string;
|
|
271
|
+
};
|
|
272
|
+
buildType: {
|
|
273
|
+
type: string;
|
|
274
|
+
enum: string[];
|
|
275
|
+
};
|
|
276
|
+
source: {
|
|
277
|
+
type: string;
|
|
278
|
+
properties: {
|
|
279
|
+
branch: {
|
|
280
|
+
type: string;
|
|
281
|
+
};
|
|
282
|
+
path: {
|
|
283
|
+
type: string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
additionalProperties: boolean;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
additionalProperties: boolean;
|
|
268
290
|
};
|
|
269
291
|
additionalRules: {
|
|
270
292
|
type: string;
|
|
@@ -529,6 +551,30 @@ export declare const GithubSchemas: ({
|
|
|
529
551
|
}[];
|
|
530
552
|
};
|
|
531
553
|
};
|
|
554
|
+
org_secrets: {
|
|
555
|
+
type: string;
|
|
556
|
+
properties: {
|
|
557
|
+
actions: {
|
|
558
|
+
type: string;
|
|
559
|
+
items: {
|
|
560
|
+
$ref: string;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
codespaces: {
|
|
564
|
+
type: string;
|
|
565
|
+
items: {
|
|
566
|
+
$ref: string;
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
dependabot: {
|
|
570
|
+
type: string;
|
|
571
|
+
items: {
|
|
572
|
+
$ref: string;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
additionalProperties: boolean;
|
|
577
|
+
};
|
|
532
578
|
};
|
|
533
579
|
additionalProperties: boolean;
|
|
534
580
|
required: string[];
|
|
@@ -652,50 +698,65 @@ export declare const GithubSchemas: ({
|
|
|
652
698
|
$schema: string;
|
|
653
699
|
$id: string;
|
|
654
700
|
definitions: {
|
|
655
|
-
|
|
701
|
+
GithubOrgClaimSecrets: {
|
|
656
702
|
$id: string;
|
|
657
703
|
type: string;
|
|
658
704
|
description: string;
|
|
659
705
|
properties: {
|
|
660
|
-
|
|
706
|
+
actions: {
|
|
707
|
+
type: string;
|
|
708
|
+
items: {
|
|
709
|
+
$ref: string;
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
codespaces: {
|
|
661
713
|
type: string;
|
|
714
|
+
items: {
|
|
715
|
+
$ref: string;
|
|
716
|
+
};
|
|
662
717
|
};
|
|
663
|
-
|
|
718
|
+
dependabot: {
|
|
664
719
|
type: string;
|
|
720
|
+
items: {
|
|
721
|
+
$ref: string;
|
|
722
|
+
};
|
|
665
723
|
};
|
|
666
|
-
|
|
724
|
+
};
|
|
725
|
+
additionalProperties: boolean;
|
|
726
|
+
};
|
|
727
|
+
GithubOrgClaimSecretRef: {
|
|
728
|
+
$id: string;
|
|
729
|
+
type: string;
|
|
730
|
+
description: string;
|
|
731
|
+
pattern: string;
|
|
732
|
+
};
|
|
733
|
+
GithubOrgClaimSecret: {
|
|
734
|
+
$id: string;
|
|
735
|
+
type: string;
|
|
736
|
+
description: string;
|
|
737
|
+
properties: {
|
|
738
|
+
name: {
|
|
667
739
|
type: string;
|
|
740
|
+
description: string;
|
|
741
|
+
};
|
|
742
|
+
value: {
|
|
743
|
+
$ref: string;
|
|
668
744
|
};
|
|
669
|
-
|
|
745
|
+
visibility: {
|
|
670
746
|
type: string;
|
|
671
747
|
enum: string[];
|
|
748
|
+
description: string;
|
|
672
749
|
};
|
|
673
|
-
|
|
750
|
+
selected_repositories: {
|
|
674
751
|
type: string;
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
type: string;
|
|
678
|
-
};
|
|
679
|
-
path: {
|
|
680
|
-
type: string;
|
|
681
|
-
enum: string[];
|
|
682
|
-
};
|
|
752
|
+
items: {
|
|
753
|
+
type: string;
|
|
683
754
|
};
|
|
684
|
-
|
|
755
|
+
description: string;
|
|
685
756
|
};
|
|
686
757
|
};
|
|
758
|
+
required: string[];
|
|
687
759
|
additionalProperties: boolean;
|
|
688
|
-
if: {
|
|
689
|
-
required: string[];
|
|
690
|
-
properties: {
|
|
691
|
-
https_enforced: {
|
|
692
|
-
const: boolean;
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
};
|
|
696
|
-
then: {
|
|
697
|
-
required: string[];
|
|
698
|
-
};
|
|
699
760
|
};
|
|
700
761
|
};
|
|
701
762
|
})[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$schema: string;
|
|
3
|
+
$id: string;
|
|
4
|
+
definitions: {
|
|
5
|
+
GithubOrgClaimSecrets: {
|
|
6
|
+
$id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
description: string;
|
|
9
|
+
properties: {
|
|
10
|
+
actions: {
|
|
11
|
+
type: string;
|
|
12
|
+
items: {
|
|
13
|
+
$ref: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
codespaces: {
|
|
17
|
+
type: string;
|
|
18
|
+
items: {
|
|
19
|
+
$ref: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
dependabot: {
|
|
23
|
+
type: string;
|
|
24
|
+
items: {
|
|
25
|
+
$ref: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
additionalProperties: boolean;
|
|
30
|
+
};
|
|
31
|
+
GithubOrgClaimSecretRef: {
|
|
32
|
+
$id: string;
|
|
33
|
+
type: string;
|
|
34
|
+
description: string;
|
|
35
|
+
pattern: string;
|
|
36
|
+
};
|
|
37
|
+
GithubOrgClaimSecret: {
|
|
38
|
+
$id: string;
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
properties: {
|
|
42
|
+
name: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
value: {
|
|
47
|
+
$ref: string;
|
|
48
|
+
};
|
|
49
|
+
visibility: {
|
|
50
|
+
type: string;
|
|
51
|
+
enum: string[];
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
selected_repositories: {
|
|
55
|
+
type: string;
|
|
56
|
+
items: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
required: string[];
|
|
63
|
+
additionalProperties: boolean;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default _default;
|
|
@@ -35,6 +35,26 @@ export interface IGithubOrgSettingsClaim extends IOrgSettingsClaim {
|
|
|
35
35
|
visibility: 'all' | 'private' | 'selected';
|
|
36
36
|
selected_repositories?: string[];
|
|
37
37
|
}[];
|
|
38
|
+
org_secrets?: {
|
|
39
|
+
actions?: {
|
|
40
|
+
name: string;
|
|
41
|
+
value: string;
|
|
42
|
+
visibility?: 'all' | 'private' | 'selected';
|
|
43
|
+
selected_repositories?: string[];
|
|
44
|
+
}[];
|
|
45
|
+
codespaces?: {
|
|
46
|
+
name: string;
|
|
47
|
+
value: string;
|
|
48
|
+
visibility?: 'all' | 'private' | 'selected';
|
|
49
|
+
selected_repositories?: string[];
|
|
50
|
+
}[];
|
|
51
|
+
dependabot?: {
|
|
52
|
+
name: string;
|
|
53
|
+
value: string;
|
|
54
|
+
visibility?: 'all' | 'private' | 'selected';
|
|
55
|
+
selected_repositories?: string[];
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
38
58
|
};
|
|
39
59
|
};
|
|
40
60
|
}
|
|
@@ -146,6 +146,30 @@ declare const _default: {
|
|
|
146
146
|
}[];
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
+
org_secrets: {
|
|
150
|
+
type: string;
|
|
151
|
+
properties: {
|
|
152
|
+
actions: {
|
|
153
|
+
type: string;
|
|
154
|
+
items: {
|
|
155
|
+
$ref: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
codespaces: {
|
|
159
|
+
type: string;
|
|
160
|
+
items: {
|
|
161
|
+
$ref: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
dependabot: {
|
|
165
|
+
type: string;
|
|
166
|
+
items: {
|
|
167
|
+
$ref: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
additionalProperties: boolean;
|
|
172
|
+
};
|
|
149
173
|
};
|
|
150
174
|
additionalProperties: boolean;
|
|
151
175
|
required: string[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BranchStrategy } from 'catalog_common';
|
|
2
|
-
import { FirestartrGithubRepositorySpecRepoVisibility } from '../../../imports/firestartr.dev';
|
|
2
|
+
import { FirestartrGithubRepositorySpecPagesBuildType, FirestartrGithubRepositorySpecRepoVisibility } from '../../../imports/firestartr.dev';
|
|
3
3
|
import { IClaimInstalledFeature } from '../base';
|
|
4
4
|
import { IComponentClaim } from '../base/component';
|
|
5
|
-
import { IRepositoryPage } from './pages';
|
|
6
5
|
export interface IGithubRepositoryClaim extends IComponentClaim {
|
|
7
6
|
providers: {
|
|
8
7
|
github: {
|
|
@@ -50,6 +49,14 @@ interface IComponentClaimActions {
|
|
|
50
49
|
includeClaimKeys: string[];
|
|
51
50
|
};
|
|
52
51
|
}
|
|
52
|
+
interface IRepositoryPage {
|
|
53
|
+
cname?: string;
|
|
54
|
+
source?: {
|
|
55
|
+
branch: string;
|
|
56
|
+
path: string;
|
|
57
|
+
};
|
|
58
|
+
buildType?: FirestartrGithubRepositorySpecPagesBuildType;
|
|
59
|
+
}
|
|
53
60
|
interface IComponentClaimLabel {
|
|
54
61
|
name: string;
|
|
55
62
|
color: string;
|
|
@@ -8,5 +8,5 @@ export declare function renderClaims(catalogScope: Construct, firestartrScope: C
|
|
|
8
8
|
crs: any;
|
|
9
9
|
renames?: IRenameResult[];
|
|
10
10
|
}): Promise<RenderedCrMap>;
|
|
11
|
-
export declare function renderClaim(catalogScope: Construct, firestartrScope: Construct, claim: any, patches: ICustomResourcePatch[], previousCR?: any | null, claimPath?: string, variableSectionPreviousCR?: any | false, variableSectionPatches?: ICustomResourcePatch[]): Promise<IRenderClaimResult>;
|
|
11
|
+
export declare function renderClaim(catalogScope: Construct, firestartrScope: Construct, claim: any, patches: ICustomResourcePatch[], previousCR?: any | null, claimPath?: string, variableSectionPreviousCR?: any | false, variableSectionPatches?: ICustomResourcePatch[], secretSectionPreviousCR?: any | false, secretSectionPatches?: ICustomResourcePatch[]): Promise<IRenderClaimResult>;
|
|
12
12
|
export declare function renameVariantCrFiles(outputDir: string, renderedMap: RenderedCrMap): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RenderClaims, RenderedCrMap } from '../renderer/types';
|
|
2
|
+
export declare function validateGithubOrgSecretSectionSingleton(crs: RenderedCrMap): void;
|
|
3
|
+
export declare function validateSecretNamesUniqueness(crs: RenderedCrMap): void;
|
|
4
|
+
export declare function validateOrgSecretsCrossReferences(renderClaims: RenderClaims): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EntityGHOrgSecretSection } from '.';
|
|
2
|
+
import { type OrgSecretsSection } from 'github';
|
|
3
|
+
export type SecretEntry = {
|
|
4
|
+
name: string;
|
|
5
|
+
ref: {
|
|
6
|
+
kind: string;
|
|
7
|
+
name: string;
|
|
8
|
+
key: string;
|
|
9
|
+
};
|
|
10
|
+
visibility: string;
|
|
11
|
+
selectedRepositories?: string[];
|
|
12
|
+
};
|
|
13
|
+
declare const SECTIONS: OrgSecretsSection[];
|
|
14
|
+
export { SECTIONS };
|
|
15
|
+
export declare function provisionOrgSecrets(entity: EntityGHOrgSecretSection, secrets: Record<string, SecretEntry[]>): Promise<void>;
|
|
16
|
+
export declare function adoptSecretsIfNeeded(entity: EntityGHOrgSecretSection, secrets: Record<string, SecretEntry[]>): Promise<void>;
|
|
@@ -2,7 +2,12 @@ import { Entity } from '../base';
|
|
|
2
2
|
export declare class EntityGHRepo extends Entity {
|
|
3
3
|
private escapeTerraformBranchName;
|
|
4
4
|
constructor(artifact: any);
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Validation logic for GitHub Pages branch settings:
|
|
7
|
+
* - On create: If pages branch is set, it must equal the default branch.
|
|
8
|
+
* - On update: If pages branch is set and is not the default, it must exist in remote.
|
|
9
|
+
*/
|
|
10
|
+
private validatePagesBranch;
|
|
6
11
|
loadResources(tfOp: string): Promise<void>;
|
|
7
12
|
postProvision(tfOp: string): Promise<void>;
|
|
8
13
|
loadAddressesToImport(): Promise<void>;
|
|
@@ -2,7 +2,9 @@ import { createCheckRun } from './src/check_run';
|
|
|
2
2
|
import { upsertMultiPartStickyComments } from './src/sticky_comment';
|
|
3
3
|
import { getOctokitForOrg, getGithubAppToken, getOctokitFromPat } from './src/auth';
|
|
4
4
|
import { encryptRepoSecret, getRepoPublicKey } from './src/encrypt';
|
|
5
|
+
import { getOrgPublicKey, encryptOrgSecret, getOrgSecret } from './src/orgSecrets';
|
|
5
6
|
import type { RepoSecretsSection } from './src/encrypt';
|
|
7
|
+
import type { OrgSecretsSection } from './src/orgSecrets';
|
|
6
8
|
import type { WorkflowCompletionResult, WorkflowDispatchInputs, WorkflowRunConclusion, WorkflowRunStatus, WorkflowRunStatusFilter, WorkflowRunSummary } from './src/workflow';
|
|
7
9
|
import { withProfile } from './src/with_profile';
|
|
8
10
|
import { createProfile } from './src/profile';
|
|
@@ -103,10 +105,14 @@ declare const _default: {
|
|
|
103
105
|
encryption: {
|
|
104
106
|
encryptRepoSecret: typeof encryptRepoSecret;
|
|
105
107
|
getRepoPublicKey: typeof getRepoPublicKey;
|
|
108
|
+
getOrgPublicKey: typeof getOrgPublicKey;
|
|
109
|
+
encryptOrgSecret: typeof encryptOrgSecret;
|
|
110
|
+
getOrgSecret: typeof getOrgSecret;
|
|
106
111
|
};
|
|
107
112
|
withProfile: typeof withProfile;
|
|
108
113
|
createProfile: typeof createProfile;
|
|
109
114
|
};
|
|
110
115
|
export default _default;
|
|
111
|
-
export {
|
|
116
|
+
export { createProfile };
|
|
117
|
+
export type { RepoSecretsSection, OrgSecretsSection };
|
|
112
118
|
export type { WorkflowCompletionResult, WorkflowDispatchInputs, WorkflowRunConclusion, WorkflowRunStatus, WorkflowRunStatusFilter, WorkflowRunSummary, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type OrgSecretsSection = 'actions' | 'dependabot' | 'codespaces';
|
|
2
|
+
export declare function getOrgPublicKey(org: string, section: OrgSecretsSection, octokit?: any): Promise<any>;
|
|
3
|
+
export declare function encryptOrgSecret(org: string, section: OrgSecretsSection, plaintextValue: string, preFetchedKey?: {
|
|
4
|
+
key_id: string;
|
|
5
|
+
key: string;
|
|
6
|
+
}, octokit?: any): Promise<{
|
|
7
|
+
key_id: any;
|
|
8
|
+
encrypted_value: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function getOrgSecret(org: string, section: OrgSecretsSection, name: string, octokit?: any): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FirestartrGithubRepositorySpecPagesBuildType, FirestartrGithubRepositorySpecPagesSourcePath } from '../../../imports/firestartr.dev';
|
|
2
|
-
export interface IRepositoryPage {
|
|
3
|
-
cname?: string;
|
|
4
|
-
public?: boolean;
|
|
5
|
-
https_enforced?: boolean;
|
|
6
|
-
source?: {
|
|
7
|
-
branch: string;
|
|
8
|
-
path: FirestartrGithubRepositorySpecPagesSourcePath;
|
|
9
|
-
};
|
|
10
|
-
buildType?: FirestartrGithubRepositorySpecPagesBuildType;
|
|
11
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
$schema: string;
|
|
3
|
-
$id: string;
|
|
4
|
-
definitions: {
|
|
5
|
-
GithubPages: {
|
|
6
|
-
$id: string;
|
|
7
|
-
type: string;
|
|
8
|
-
description: string;
|
|
9
|
-
properties: {
|
|
10
|
-
cname: {
|
|
11
|
-
type: string;
|
|
12
|
-
};
|
|
13
|
-
public: {
|
|
14
|
-
type: string;
|
|
15
|
-
};
|
|
16
|
-
https_enforced: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
buildType: {
|
|
20
|
-
type: string;
|
|
21
|
-
enum: string[];
|
|
22
|
-
};
|
|
23
|
-
source: {
|
|
24
|
-
type: string;
|
|
25
|
-
properties: {
|
|
26
|
-
branch: {
|
|
27
|
-
type: string;
|
|
28
|
-
};
|
|
29
|
-
path: {
|
|
30
|
-
type: string;
|
|
31
|
-
enum: string[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
additionalProperties: boolean;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
additionalProperties: boolean;
|
|
38
|
-
if: {
|
|
39
|
-
required: string[];
|
|
40
|
-
properties: {
|
|
41
|
-
https_enforced: {
|
|
42
|
-
const: boolean;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
then: {
|
|
47
|
-
required: string[];
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export default _default;
|