@firestartr/cli 2.7.0-snapshot-7 → 2.7.0-snapshot-9
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 +47 -52
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +4 -0
- package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +4 -0
- package/build/packages/cdk8s_renderer/src/claims/github/component.schema.d.ts +4 -0
- package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +4 -0
- package/build/packages/cdk8s_renderer/src/claims/github/repository.d.ts +2 -0
- package/build/packages/cdk8s_renderer/src/initializers/backstage.d.ts +0 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -280394,6 +280394,7 @@ class BackstageInitializer extends InitializerPatches {
|
|
|
280394
280394
|
return true;
|
|
280395
280395
|
},
|
|
280396
280396
|
apply(cr) {
|
|
280397
|
+
// set annotation
|
|
280397
280398
|
cr.metadata.annotations = cr.metadata.annotations ?? {};
|
|
280398
280399
|
cr.metadata.annotations['backstage.io/kubernetes-id'] = claim.name;
|
|
280399
280400
|
return cr;
|
|
@@ -280412,35 +280413,10 @@ class BackstageInitializer extends InitializerPatches {
|
|
|
280412
280413
|
return true;
|
|
280413
280414
|
},
|
|
280414
280415
|
apply(cr) {
|
|
280415
|
-
|
|
280416
|
-
cr.metadata.
|
|
280417
|
-
|
|
280418
|
-
|
|
280419
|
-
},
|
|
280420
|
-
identify() {
|
|
280421
|
-
return 'initializers/BackstageInitializer';
|
|
280422
|
-
},
|
|
280423
|
-
applicable() {
|
|
280424
|
-
return {
|
|
280425
|
-
applicableProviders: ['catalog'],
|
|
280426
|
-
};
|
|
280427
|
-
},
|
|
280428
|
-
},
|
|
280429
|
-
{
|
|
280430
|
-
validate() {
|
|
280431
|
-
return true;
|
|
280432
|
-
},
|
|
280433
|
-
apply(cr) {
|
|
280434
|
-
const org = claim.providers?.github?.org;
|
|
280435
|
-
const repoName = claim.providers?.github?.name;
|
|
280436
|
-
if (!org || !repoName)
|
|
280437
|
-
return cr;
|
|
280438
|
-
cr.metadata.annotations = cr.metadata.annotations ?? {};
|
|
280439
|
-
if (cr.metadata.annotations['github.com/project-slug'] !== undefined) {
|
|
280440
|
-
return cr;
|
|
280441
|
-
}
|
|
280442
|
-
cr.metadata.annotations['github.com/project-slug'] =
|
|
280443
|
-
`${org}/${repoName}`;
|
|
280416
|
+
// set label
|
|
280417
|
+
cr.metadata.labels = cr.metadata.labels ?? {};
|
|
280418
|
+
cr.metadata.labels['backstage.io/kubernetes-label-selector'] =
|
|
280419
|
+
`backstage.io/kubernetes-id=${claim.name}`;
|
|
280444
280420
|
return cr;
|
|
280445
280421
|
},
|
|
280446
280422
|
identify() {
|
|
@@ -280455,8 +280431,6 @@ class BackstageInitializer extends InitializerPatches {
|
|
|
280455
280431
|
];
|
|
280456
280432
|
}
|
|
280457
280433
|
}
|
|
280458
|
-
BackstageInitializer.applicableKinds = ['ComponentClaim'];
|
|
280459
|
-
|
|
280460
280434
|
|
|
280461
280435
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/initializers/syncer.ts
|
|
280462
280436
|
|
|
@@ -282067,6 +282041,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
282067
282041
|
type: 'object',
|
|
282068
282042
|
properties: {
|
|
282069
282043
|
cname: { type: 'string' },
|
|
282044
|
+
buildType: { type: 'string', enum: ['workflow', 'legacy'] },
|
|
282070
282045
|
source: {
|
|
282071
282046
|
type: 'object',
|
|
282072
282047
|
properties: {
|
|
@@ -286681,6 +286656,7 @@ function toJson_FirestartrGithubRepositorySpecPages(obj) {
|
|
|
286681
286656
|
const result = {
|
|
286682
286657
|
'cname': obj.cname,
|
|
286683
286658
|
'source': toJson_FirestartrGithubRepositorySpecPagesSource(obj.source),
|
|
286659
|
+
'buildType': obj.buildType,
|
|
286684
286660
|
};
|
|
286685
286661
|
// filter undefined values
|
|
286686
286662
|
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
@@ -288784,6 +288760,7 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
288784
288760
|
archiveOnDestroy: claim.providers.github.archiveOnDestroy,
|
|
288785
288761
|
allowUpdateBranch: claim.providers.github.allowUpdateBranch,
|
|
288786
288762
|
hasIssues: claim.providers.github.hasIssues,
|
|
288763
|
+
hasWiki: claim.providers.github.hasWiki,
|
|
288787
288764
|
visibility: claim.providers.github.visibility,
|
|
288788
288765
|
defaultBranch: claim.providers.github?.branchStrategy?.defaultBranch,
|
|
288789
288766
|
codeowners: createCodeOwnersData(claim),
|
|
@@ -291178,13 +291155,24 @@ class RepoGithubDecanter extends GithubDecanter {
|
|
|
291178
291155
|
__decantPages() {
|
|
291179
291156
|
if (this.data.pages) {
|
|
291180
291157
|
if (this.data.pages.build_type === 'workflow') {
|
|
291181
|
-
|
|
291158
|
+
this.__patchClaim({
|
|
291159
|
+
op: 'add',
|
|
291160
|
+
path: '/providers/github/pages',
|
|
291161
|
+
value: {
|
|
291162
|
+
buildType: 'workflow',
|
|
291163
|
+
...(typeof this.data.pages.cname === 'string' &&
|
|
291164
|
+
this.data.pages.cname.length > 0
|
|
291165
|
+
? { cname: this.data.pages.cname }
|
|
291166
|
+
: {}),
|
|
291167
|
+
},
|
|
291168
|
+
});
|
|
291182
291169
|
}
|
|
291183
291170
|
else if (this.data.pages.build_type === 'legacy') {
|
|
291184
291171
|
this.__patchClaim({
|
|
291185
291172
|
op: 'add',
|
|
291186
291173
|
path: '/providers/github/pages',
|
|
291187
291174
|
value: {
|
|
291175
|
+
buildType: 'legacy',
|
|
291188
291176
|
...(typeof this.data.pages.cname === 'string' &&
|
|
291189
291177
|
this.data.pages.cname.length > 0
|
|
291190
291178
|
? { cname: this.data.pages.cname }
|
|
@@ -300872,14 +300860,20 @@ class EntityGHRepo extends base_Entity {
|
|
|
300872
300860
|
provisionPages() {
|
|
300873
300861
|
if (this.cr.spec.pages) {
|
|
300874
300862
|
const source = this.cr.spec.pages.source ?? {};
|
|
300863
|
+
const buildType = this.cr.spec.pages.buildType || 'legacy';
|
|
300875
300864
|
this.patchData({
|
|
300876
300865
|
path: '/config/pages',
|
|
300877
300866
|
op: PatchOperations.add,
|
|
300878
300867
|
value: {
|
|
300879
|
-
|
|
300880
|
-
|
|
300881
|
-
|
|
300882
|
-
|
|
300868
|
+
buildType: buildType,
|
|
300869
|
+
...(buildType === 'legacy'
|
|
300870
|
+
? {
|
|
300871
|
+
source: {
|
|
300872
|
+
branch: source.branch || this.cr.spec.repo.defaultBranch,
|
|
300873
|
+
path: source.path || '/',
|
|
300874
|
+
},
|
|
300875
|
+
}
|
|
300876
|
+
: {}),
|
|
300883
300877
|
cname: this.cr.spec.pages.cname,
|
|
300884
300878
|
},
|
|
300885
300879
|
});
|
|
@@ -301674,7 +301668,10 @@ async function runGhProvisioner(data, opts) {
|
|
|
301674
301668
|
let sessionId = null;
|
|
301675
301669
|
let sessionProjectPath = null;
|
|
301676
301670
|
gh_provisioner_src_logger.debug('[gh-provisioner] runGhProvisioner options keys:', Object.keys(opts || {}));
|
|
301677
|
-
|
|
301671
|
+
let tfOp = inferTFOperation(data.mainCr, opts);
|
|
301672
|
+
if (tfOp === 'nothing' && opts.debug) {
|
|
301673
|
+
tfOp = 'debug';
|
|
301674
|
+
}
|
|
301678
301675
|
gh_provisioner_src_logger.info(`[gh-provisioner] Starting runGhProvisioner with tf op ${tfOp}`);
|
|
301679
301676
|
sendWarnings();
|
|
301680
301677
|
let entity;
|
|
@@ -301801,19 +301798,17 @@ function inferTFOperation(cr, opts) {
|
|
|
301801
301798
|
? 'plan'
|
|
301802
301799
|
: opts.planDestroy
|
|
301803
301800
|
? 'plan-destroy'
|
|
301804
|
-
: opts.
|
|
301805
|
-
? '
|
|
301806
|
-
: opts.
|
|
301807
|
-
?
|
|
301808
|
-
|
|
301809
|
-
|
|
301810
|
-
|
|
301811
|
-
|
|
301812
|
-
|
|
301813
|
-
|
|
301814
|
-
|
|
301815
|
-
? 'import'
|
|
301816
|
-
: 'nothing';
|
|
301801
|
+
: opts.delete
|
|
301802
|
+
? 'destroy'
|
|
301803
|
+
: isImport || opts.import
|
|
301804
|
+
? needsReimport
|
|
301805
|
+
? 'import-with-reimport'
|
|
301806
|
+
: 'import'
|
|
301807
|
+
: opts.create
|
|
301808
|
+
? 'apply'
|
|
301809
|
+
: opts.update
|
|
301810
|
+
? 'apply'
|
|
301811
|
+
: 'nothing';
|
|
301817
301812
|
//opts.import && opts.skipPlan && isImport
|
|
301818
301813
|
// ? 'IMPORT_SKIP_PLAN'
|
|
301819
301814
|
return operation;
|
|
@@ -303584,9 +303579,9 @@ const crs_analyzerSubcommand = {
|
|
|
303584
303579
|
};
|
|
303585
303580
|
|
|
303586
303581
|
;// CONCATENATED MODULE: ./package.json
|
|
303587
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.7.0-snapshot-
|
|
303582
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.7.0-snapshot-9"}');
|
|
303588
303583
|
;// CONCATENATED MODULE: ../../package.json
|
|
303589
|
-
const package_namespaceObject_1 = {"i8":"2.6.
|
|
303584
|
+
const package_namespaceObject_1 = {"i8":"2.6.4"};
|
|
303590
303585
|
;// CONCATENATED MODULE: ./src/subcommands/index.ts
|
|
303591
303586
|
|
|
303592
303587
|
|
|
@@ -1447,6 +1447,10 @@ export interface FirestartrGithubRepositorySpecPages {
|
|
|
1447
1447
|
* @schema FirestartrGithubRepositorySpecPages#source
|
|
1448
1448
|
*/
|
|
1449
1449
|
readonly source?: FirestartrGithubRepositorySpecPagesSource;
|
|
1450
|
+
/**
|
|
1451
|
+
* @schema FirestartrGithubRepositorySpecPages#buildType
|
|
1452
|
+
*/
|
|
1453
|
+
readonly buildType?: string;
|
|
1450
1454
|
}
|
|
1451
1455
|
/**
|
|
1452
1456
|
* Converts an object of type 'FirestartrGithubRepositorySpecPages' to JSON representation.
|
|
@@ -21,6 +21,7 @@ export interface IGithubRepositoryClaim extends IComponentClaim {
|
|
|
21
21
|
archiveOnDestroy: boolean;
|
|
22
22
|
allowUpdateBranch: boolean;
|
|
23
23
|
hasIssues: boolean;
|
|
24
|
+
hasWiki: boolean;
|
|
24
25
|
features: IClaimInstalledFeature[];
|
|
25
26
|
pages: IRepositoryPage;
|
|
26
27
|
branchStrategy: IComponentClaimBranchStrategy;
|
|
@@ -53,6 +54,7 @@ interface IRepositoryPage {
|
|
|
53
54
|
branch: string;
|
|
54
55
|
path: string;
|
|
55
56
|
};
|
|
57
|
+
buildType?: string;
|
|
56
58
|
}
|
|
57
59
|
interface IComponentClaimLabel {
|
|
58
60
|
name: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InitializerPatches } from './base';
|
|
2
2
|
export declare class BackstageInitializer extends InitializerPatches {
|
|
3
3
|
applicableProviders: string[];
|
|
4
|
-
static applicableKinds: string[];
|
|
5
4
|
__validate(): Promise<boolean>;
|
|
6
5
|
__patches(claim: any, _: any): Promise<{
|
|
7
6
|
validate(): boolean;
|