@payfit/nx-core 0.0.0-e2e → 0.0.0-semver
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/README.md +10 -163
- package/dist/src/executors/publisher/docker.d.ts +3 -1
- package/dist/src/executors/publisher/docker.js +12 -57
- package/dist/src/executors/publisher/docker.js.map +1 -1
- package/dist/src/executors/publisher/executor.js +12 -9
- package/dist/src/executors/publisher/executor.js.map +1 -1
- package/dist/src/executors/publisher/helm.d.ts +5 -1
- package/dist/src/executors/publisher/helm.js +11 -40
- package/dist/src/executors/publisher/helm.js.map +1 -1
- package/dist/src/executors/publisher/schema.d.ts +5 -0
- package/dist/src/executors/publisher/schema.json +0 -44
- package/dist/src/index.d.ts +1 -24
- package/dist/src/index.js +11 -67
- package/dist/src/index.js.map +1 -1
- package/dist/src/scripts/version-actions.d.ts +20 -3
- package/dist/src/scripts/version-actions.js +41 -23
- package/dist/src/scripts/version-actions.js.map +1 -1
- package/dist/src/utils/{common/aws-auth.d.ts → aws-auth.d.ts} +8 -16
- package/dist/src/utils/aws-auth.js +84 -0
- package/dist/src/utils/aws-auth.js.map +1 -0
- package/dist/src/utils/docker.d.ts +16 -12
- package/dist/src/utils/docker.js +23 -63
- package/dist/src/utils/docker.js.map +1 -1
- package/dist/src/utils/exec.d.ts +7 -0
- package/dist/src/utils/exec.js +25 -0
- package/dist/src/utils/exec.js.map +1 -0
- package/dist/src/utils/get-version.d.ts +6 -0
- package/dist/src/utils/get-version.js +14 -0
- package/dist/src/utils/get-version.js.map +1 -0
- package/dist/src/utils/github.d.ts +4 -0
- package/dist/src/utils/github.js +17 -0
- package/dist/src/utils/github.js.map +1 -0
- package/dist/src/utils/helm.d.ts +16 -32
- package/dist/src/utils/helm.js +15 -83
- package/dist/src/utils/helm.js.map +1 -1
- package/dist/src/utils/import-esm.js.map +1 -0
- package/dist/src/utils/{common/tsh.d.ts → tsh.d.ts} +0 -1
- package/dist/src/utils/{common/tsh.js → tsh.js} +15 -20
- package/dist/src/utils/tsh.js.map +1 -0
- package/executors.json +2 -12
- package/package.json +18 -42
- package/dist/src/codegen.d.ts +0 -3
- package/dist/src/codegen.js +0 -25
- package/dist/src/codegen.js.map +0 -1
- package/dist/src/executors/preview-deploy/README.md +0 -5
- package/dist/src/executors/preview-deploy/argocdOverride.d.ts +0 -4
- package/dist/src/executors/preview-deploy/argocdOverride.js +0 -22
- package/dist/src/executors/preview-deploy/argocdOverride.js.map +0 -1
- package/dist/src/executors/preview-deploy/executor.d.ts +0 -4
- package/dist/src/executors/preview-deploy/executor.js +0 -143
- package/dist/src/executors/preview-deploy/executor.js.map +0 -1
- package/dist/src/executors/preview-deploy/kargoPolicy.d.ts +0 -14
- package/dist/src/executors/preview-deploy/kargoPolicy.js +0 -69
- package/dist/src/executors/preview-deploy/kargoPolicy.js.map +0 -1
- package/dist/src/executors/preview-deploy/schema.json +0 -28
- package/dist/src/executors/publisher/README.md +0 -3
- package/dist/src/executors/publisher/lambda.d.ts +0 -18
- package/dist/src/executors/publisher/lambda.js +0 -86
- package/dist/src/executors/publisher/lambda.js.map +0 -1
- package/dist/src/executors/release/README.md +0 -15
- package/dist/src/executors/release/executor.d.ts +0 -4
- package/dist/src/executors/release/executor.js +0 -104
- package/dist/src/executors/release/executor.js.map +0 -1
- package/dist/src/executors/release/schema.json +0 -37
- package/dist/src/generators/init/README.md +0 -5
- package/dist/src/generators/init/files/.circleci/config.yml.template +0 -232
- package/dist/src/generators/init/files/.circleci/teleport/shared-charts.conf.template +0 -24
- package/dist/src/generators/init/files/.npmrc.template +0 -1
- package/dist/src/generators/init/init.d.ts +0 -13
- package/dist/src/generators/init/init.js +0 -278
- package/dist/src/generators/init/init.js.map +0 -1
- package/dist/src/generators/init/schema.json +0 -7
- package/dist/src/scripts/codegen-with-auth.js +0 -55
- package/dist/src/scripts/version-actions.mock.d.ts +0 -6
- package/dist/src/scripts/version-actions.mock.js +0 -61
- package/dist/src/scripts/version-actions.mock.js.map +0 -1
- package/dist/src/utils/common/aws-auth.js +0 -145
- package/dist/src/utils/common/aws-auth.js.map +0 -1
- package/dist/src/utils/common/circleci.d.ts +0 -2
- package/dist/src/utils/common/circleci.js +0 -20
- package/dist/src/utils/common/circleci.js.map +0 -1
- package/dist/src/utils/common/exec.d.ts +0 -4
- package/dist/src/utils/common/exec.js +0 -52
- package/dist/src/utils/common/exec.js.map +0 -1
- package/dist/src/utils/common/github.d.ts +0 -20
- package/dist/src/utils/common/github.js +0 -60
- package/dist/src/utils/common/github.js.map +0 -1
- package/dist/src/utils/common/import-esm.js.map +0 -1
- package/dist/src/utils/common/logger.d.ts +0 -1
- package/dist/src/utils/common/logger.js +0 -8
- package/dist/src/utils/common/logger.js.map +0 -1
- package/dist/src/utils/common/nx.d.ts +0 -22
- package/dist/src/utils/common/nx.js +0 -174
- package/dist/src/utils/common/nx.js.map +0 -1
- package/dist/src/utils/common/s3.d.ts +0 -1
- package/dist/src/utils/common/s3.js +0 -18
- package/dist/src/utils/common/s3.js.map +0 -1
- package/dist/src/utils/common/tsh.js.map +0 -1
- package/dist/src/utils/datadog.d.ts +0 -1
- package/dist/src/utils/datadog.js +0 -33
- package/dist/src/utils/datadog.js.map +0 -1
- package/dist/src/utils/helm.mock.d.ts +0 -85
- package/dist/src/utils/helm.mock.js +0 -100
- package/dist/src/utils/helm.mock.js.map +0 -1
- package/dist/src/utils/lambda/aws-lambda.d.ts +0 -47
- package/dist/src/utils/lambda/aws-lambda.js +0 -231
- package/dist/src/utils/lambda/aws-lambda.js.map +0 -1
- package/dist/src/utils/lambda/lambda.d.ts +0 -7
- package/dist/src/utils/lambda/lambda.js +0 -20
- package/dist/src/utils/lambda/lambda.js.map +0 -1
- package/dist/src/utils/lambda/oci.d.ts +0 -8
- package/dist/src/utils/lambda/oci.js +0 -22
- package/dist/src/utils/lambda/oci.js.map +0 -1
- package/dist/src/utils/lambda/publish.d.ts +0 -14
- package/dist/src/utils/lambda/publish.js +0 -44
- package/dist/src/utils/lambda/publish.js.map +0 -1
- package/dist/src/utils/lambda/spacelift.d.ts +0 -3
- package/dist/src/utils/lambda/spacelift.js +0 -55
- package/dist/src/utils/lambda/spacelift.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/fragment-masking.d.ts +0 -19
- package/dist/src/utils/spacelift/lib/__generated__/fragment-masking.js +0 -22
- package/dist/src/utils/spacelift/lib/__generated__/fragment-masking.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/gql.d.ts +0 -15
- package/dist/src/utils/spacelift/lib/__generated__/gql.js +0 -8
- package/dist/src/utils/spacelift/lib/__generated__/gql.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/graphql.d.ts +0 -9426
- package/dist/src/utils/spacelift/lib/__generated__/graphql.js +0 -819
- package/dist/src/utils/spacelift/lib/__generated__/graphql.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/index.d.ts +0 -2
- package/dist/src/utils/spacelift/lib/__generated__/index.js +0 -6
- package/dist/src/utils/spacelift/lib/__generated__/index.js.map +0 -1
- package/dist/src/utils/spacelift/lib/graphql.service.d.ts +0 -18
- package/dist/src/utils/spacelift/lib/graphql.service.js +0 -186
- package/dist/src/utils/spacelift/lib/graphql.service.js.map +0 -1
- package/dist/src/utils/spacelift/lib/query/spacelift.queries.d.ts +0 -34
- package/dist/src/utils/spacelift/lib/query/spacelift.queries.js +0 -48
- package/dist/src/utils/spacelift/lib/query/spacelift.queries.js.map +0 -1
- package/dist/src/utils/spacelift/lib/spacelift.error.d.ts +0 -43
- package/dist/src/utils/spacelift/lib/spacelift.error.js +0 -63
- package/dist/src/utils/spacelift/lib/spacelift.error.js.map +0 -1
- package/dist/src/utils/spacelift/lib/spacelift.service.d.ts +0 -16
- package/dist/src/utils/spacelift/lib/spacelift.service.js +0 -58
- package/dist/src/utils/spacelift/lib/spacelift.service.js.map +0 -1
- package/dist/src/utils/spacelift/lib/utils.d.ts +0 -4
- package/dist/src/utils/spacelift/lib/utils.js +0 -32
- package/dist/src/utils/spacelift/lib/utils.js.map +0 -1
- package/generators.json +0 -9
- /package/dist/src/utils/{common/import-esm.d.ts → import-esm.d.ts} +0 -0
- /package/dist/src/utils/{common/import-esm.js → import-esm.js} +0 -0
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ProjectGraph, Tree } from '@nx/devkit';
|
|
2
|
+
import { VersionActions } from 'nx/release';
|
|
3
|
+
import { NxReleaseVersionConfiguration } from 'nx/src/config/nx-json';
|
|
4
|
+
export default class customVersionAction extends VersionActions {
|
|
5
|
+
validManifestFilenames: string[];
|
|
6
|
+
readCurrentVersionFromSourceManifest(tree: Tree): Promise<{
|
|
7
|
+
currentVersion: string;
|
|
8
|
+
manifestPath: string;
|
|
9
|
+
} | null>;
|
|
10
|
+
readCurrentVersionFromRegistry(tree: Tree, currentVersionResolverMetadata: NxReleaseVersionConfiguration['currentVersionResolverMetadata']): Promise<{
|
|
11
|
+
currentVersion: string | null;
|
|
12
|
+
logText: string;
|
|
13
|
+
} | null>;
|
|
14
|
+
readCurrentVersionOfDependency(tree: Tree, projectGraph: ProjectGraph, dependencyProjectName: string): Promise<{
|
|
15
|
+
currentVersion: string | null;
|
|
16
|
+
dependencyCollection: string | null;
|
|
17
|
+
}>;
|
|
18
|
+
isLocalDependencyProtocol(versionSpecifier: string): Promise<boolean>;
|
|
19
|
+
updateProjectVersion(tree: Tree, newVersion: string): Promise<string[]>;
|
|
20
|
+
updateProjectDependencies(tree: Tree, projectGraph: ProjectGraph, dependenciesToUpdate: Record<string, string>): Promise<string[]>;
|
|
3
21
|
calculateNewVersion(currentVersion: string | null, newVersionInput: string, newVersionInputReason: string, newVersionInputReasonData: Record<string, unknown>, preid: string): Promise<{
|
|
4
22
|
newVersion: string;
|
|
5
23
|
logText: string;
|
|
6
24
|
}>;
|
|
7
25
|
}
|
|
8
|
-
export = customVersionAction;
|
|
@@ -1,7 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const release_1 = require("nx/release");
|
|
3
4
|
const semver_1 = require("semver");
|
|
4
|
-
class customVersionAction extends
|
|
5
|
+
class customVersionAction extends release_1.VersionActions {
|
|
6
|
+
async readCurrentVersionFromSourceManifest(tree) {
|
|
7
|
+
return {
|
|
8
|
+
currentVersion: '0.0.0',
|
|
9
|
+
manifestPath: 'apps/my-nest-app/project.json',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
async readCurrentVersionFromRegistry(tree, currentVersionResolverMetadata) {
|
|
13
|
+
return {
|
|
14
|
+
currentVersion: '0.0.0',
|
|
15
|
+
logText: 'Current version from registry',
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
async readCurrentVersionOfDependency(tree, projectGraph, dependencyProjectName) {
|
|
19
|
+
return {
|
|
20
|
+
currentVersion: '0.0.0',
|
|
21
|
+
dependencyCollection: '0.0.0',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
async isLocalDependencyProtocol(versionSpecifier) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
async updateProjectVersion(tree, newVersion) {
|
|
28
|
+
// Update the version in the VERSION file
|
|
29
|
+
const currentProject = this.projectGraphNode.name;
|
|
30
|
+
const versionFilePath = `dist/apps/${currentProject}/VERSION`;
|
|
31
|
+
tree.write(versionFilePath, newVersion);
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
async updateProjectDependencies(tree, projectGraph, dependenciesToUpdate) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
5
37
|
async calculateNewVersion(currentVersion, newVersionInput, newVersionInputReason, newVersionInputReasonData, preid) {
|
|
6
38
|
function formatDate() {
|
|
7
39
|
const date = new Date();
|
|
@@ -10,32 +42,18 @@ class customVersionAction extends version_actions_1.default {
|
|
|
10
42
|
const day = date.getDate();
|
|
11
43
|
return `${year}${month}.${day}.`;
|
|
12
44
|
}
|
|
13
|
-
function getNewVersionFromCurrentVersion(currentVersion
|
|
45
|
+
function getNewVersionFromCurrentVersion(currentVersion) {
|
|
14
46
|
const expectedPattern = formatDate();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// Extract base version and preid
|
|
19
|
-
const versionMatch = currentVersion.match(/^([0-9]{0,6}\.[0-9]{1,2}\.[0-9]*)(?:-([\w.-]+))?$/);
|
|
20
|
-
const matchedCurrentVersion = versionMatch ? versionMatch[1] : null;
|
|
21
|
-
const currentPreid = versionMatch ? versionMatch[2] : null;
|
|
22
|
-
const isMatchingExpectedPattern = matchedCurrentVersion?.startsWith(expectedPattern);
|
|
23
|
-
// making sure currentVersion is containing the current date
|
|
24
|
-
if (!isMatchingExpectedPattern)
|
|
25
|
-
return defaultVersion;
|
|
26
|
-
// If current version has a preid and new preid is empty, release current version
|
|
27
|
-
if (currentPreid && !preid.trim()) {
|
|
28
|
-
return matchedCurrentVersion;
|
|
29
|
-
}
|
|
30
|
-
return (0, semver_1.inc)(matchedCurrentVersion, 'patch');
|
|
47
|
+
return !currentVersion.startsWith(expectedPattern)
|
|
48
|
+
? `${expectedPattern}0`
|
|
49
|
+
: (0, semver_1.inc)(currentVersion, 'patch');
|
|
31
50
|
}
|
|
32
|
-
const
|
|
33
|
-
const finalVersion = `${baseVersion}${preid.trim() ? '-' + preid : ''}`;
|
|
51
|
+
const finalVersion = `${getNewVersionFromCurrentVersion(currentVersion)}${preid.trim() ? '-' + preid : ''}`;
|
|
34
52
|
return {
|
|
35
53
|
newVersion: finalVersion,
|
|
36
|
-
logText:
|
|
54
|
+
logText: `New version: ${finalVersion}`,
|
|
37
55
|
};
|
|
38
56
|
}
|
|
39
57
|
}
|
|
40
|
-
|
|
58
|
+
exports.default = customVersionAction;
|
|
41
59
|
//# sourceMappingURL=version-actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-actions.js","sourceRoot":"","sources":["../../../src/scripts/version-actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version-actions.js","sourceRoot":"","sources":["../../../src/scripts/version-actions.ts"],"names":[],"mappings":";;AACA,wCAA2C;AAE3C,mCAA4B;AAE5B,MAAqB,mBAAoB,SAAQ,wBAAc;IAE7D,KAAK,CAAC,oCAAoC,CACxC,IAAU;QAEV,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,YAAY,EAAE,+BAA+B;SAC9C,CAAA;IACH,CAAC;IACD,KAAK,CAAC,8BAA8B,CAClC,IAAU,EACV,8BAA+F;QAE/F,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,OAAO,EAAE,+BAA+B;SACzC,CAAA;IACH,CAAC;IACD,KAAK,CAAC,8BAA8B,CAClC,IAAU,EACV,YAA0B,EAC1B,qBAA6B;QAK7B,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,oBAAoB,EAAE,OAAO;SAC9B,CAAA;IACH,CAAC;IACD,KAAK,CAAC,yBAAyB,CAAC,gBAAwB;QACtD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,KAAK,CAAC,oBAAoB,CACxB,IAAU,EACV,UAAkB;QAElB,yCAAyC;QACzC,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAA;QACjD,MAAM,eAAe,GAAG,aAAa,cAAc,UAAU,CAAA;QAC7D,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;QACvC,OAAO,EAAE,CAAA;IACX,CAAC;IACD,KAAK,CAAC,yBAAyB,CAC7B,IAAU,EACV,YAA0B,EAC1B,oBAA4C;QAE5C,OAAO,EAAE,CAAA;IACX,CAAC;IACD,KAAK,CAAC,mBAAmB,CACvB,cAA6B,EAC7B,eAAuB,EACvB,qBAA6B,EAC7B,yBAAkD,EAClD,KAAa;QAKb,SAAS,UAAU;YACjB,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;YAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA,CAAC,0BAA0B;YACrF,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;YAE1B,OAAO,GAAG,IAAI,GAAG,KAAK,IAAI,GAAG,GAAG,CAAA;QAClC,CAAC;QAED,SAAS,+BAA+B,CAAC,cAAsB;YAC7D,MAAM,eAAe,GAAG,UAAU,EAAE,CAAA;YACpC,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,eAAe,CAAC;gBAChD,CAAC,CAAC,GAAG,eAAe,GAAG;gBACvB,CAAC,CAAC,IAAA,YAAG,EAAC,cAAc,EAAE,OAAO,CAAC,CAAA;QAClC,CAAC;QAED,MAAM,YAAY,GAAG,GAAG,+BAA+B,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;QAE3G,OAAO;YACL,UAAU,EAAE,YAAY;YACxB,OAAO,EAAE,gBAAgB,YAAY,EAAE;SACxC,CAAA;IACH,CAAC;CACF;AArFD,sCAqFC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Result } from 'tinyexec';
|
|
2
1
|
/**
|
|
3
2
|
* Return the AWS profile name to use in AWS cli commands
|
|
4
3
|
*/
|
|
@@ -25,23 +24,16 @@ export declare function getAwsCredentialsSet(): {
|
|
|
25
24
|
* @return {Promise<string | boolean>} The authentication details if the profile exists, or false if the profile does not exist.
|
|
26
25
|
*/
|
|
27
26
|
export declare function getAuthWithOidcProfile(): Promise<string | boolean>;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* @returns A promise that resolves to the result of the login command
|
|
34
|
-
*/
|
|
35
|
-
export declare function loginToEcr(registry: string, isPublicRegistry?: boolean): Promise<Result>;
|
|
36
|
-
/**
|
|
37
|
-
* Verify that we have valid ECR credentials by checking the Docker config file
|
|
38
|
-
*
|
|
39
|
-
* @param registry The ECR registry to verify credentials for
|
|
40
|
-
* @returns A promise that resolves to true if credentials are valid, false otherwise
|
|
41
|
-
*/
|
|
42
|
-
export declare function verifyEcrCredentials(registry: string): Promise<boolean>;
|
|
27
|
+
export declare function loginToEcr(): Promise<{
|
|
28
|
+
success: boolean;
|
|
29
|
+
stdout: string;
|
|
30
|
+
stderr: string;
|
|
31
|
+
}>;
|
|
43
32
|
/**
|
|
44
33
|
* Check AWS CLI with the OIDC profile otherwise use the default credentials
|
|
45
34
|
* @returns {string} the profile's name
|
|
46
35
|
*/
|
|
47
36
|
export declare function checkAwsAuth(): Promise<string>;
|
|
37
|
+
export declare function pushImageToEcr(repositoryName: string, version: string): Promise<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProfileName = getProfileName;
|
|
4
|
+
exports.getAwsCredentialsSet = getAwsCredentialsSet;
|
|
5
|
+
exports.getAuthWithOidcProfile = getAuthWithOidcProfile;
|
|
6
|
+
exports.loginToEcr = loginToEcr;
|
|
7
|
+
exports.checkAwsAuth = checkAwsAuth;
|
|
8
|
+
exports.pushImageToEcr = pushImageToEcr;
|
|
9
|
+
const docker_1 = require("./docker");
|
|
10
|
+
const exec_1 = require("./exec");
|
|
11
|
+
let profileName = 'OIDC-PROFILE';
|
|
12
|
+
/**
|
|
13
|
+
* Return the AWS profile name to use in AWS cli commands
|
|
14
|
+
*/
|
|
15
|
+
function getProfileName() {
|
|
16
|
+
return profileName;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the AWS credentials from environment variables.
|
|
20
|
+
* Ensures that `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_DEFAULT_REGION` are properly set.
|
|
21
|
+
* Throws an error if credentials or region are missing.
|
|
22
|
+
*
|
|
23
|
+
* @return {Object} An object containing AWS credentials.
|
|
24
|
+
* @return {string} return.accessKeyId The AWS Access Key ID.
|
|
25
|
+
* @return {string} return.secretAccessKey The AWS Secret Access Key.
|
|
26
|
+
* @return {string} return.region The AWS Region.
|
|
27
|
+
*/
|
|
28
|
+
function getAwsCredentialsSet() {
|
|
29
|
+
const accessKeyId = process.env.AWS_ACCESS_KEY_ID;
|
|
30
|
+
const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY;
|
|
31
|
+
const region = process.env.AWS_DEFAULT_REGION;
|
|
32
|
+
if (!accessKeyId || !secretAccessKey) {
|
|
33
|
+
throw new Error('AWS credentials not found, please set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables (or attach GLOBAL_ORG context if you are using CircleCI)');
|
|
34
|
+
}
|
|
35
|
+
if (!region) {
|
|
36
|
+
throw new Error('AWS region not found, please set AWS_DEFAULT_REGION environment variable (or attach GLOBAL_ORG context if you are using CircleCI)');
|
|
37
|
+
}
|
|
38
|
+
return { accessKeyId, secretAccessKey, region };
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves the authentication information for a given OIDC profile.
|
|
42
|
+
* If the specified profile exists, it fetches the configuration; otherwise, it returns false.
|
|
43
|
+
*
|
|
44
|
+
* @return {Promise<string | boolean>} The authentication details if the profile exists, or false if the profile does not exist.
|
|
45
|
+
*/
|
|
46
|
+
async function getAuthWithOidcProfile() {
|
|
47
|
+
try {
|
|
48
|
+
const profileExist = await (0, exec_1.exec_command)(`aws configure list-profiles | grep ${profileName}`);
|
|
49
|
+
if (profileExist.success) {
|
|
50
|
+
return profileExist.stdout;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
console.error(e);
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function loginToEcr() {
|
|
60
|
+
return (0, exec_1.exec_command)(`aws ecr get-login-password --profile ${profileName} --region eu-west-3 | ${await (0, docker_1.getDockerOrPodman)()} login --username AWS --password-stdin ${process.env.AWS_ECR_REGISTRY}`);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check AWS CLI with the OIDC profile otherwise use the default credentials
|
|
64
|
+
* @returns {string} the profile's name
|
|
65
|
+
*/
|
|
66
|
+
async function checkAwsAuth() {
|
|
67
|
+
const profileExist = await getAuthWithOidcProfile();
|
|
68
|
+
if (profileExist) {
|
|
69
|
+
console.log('OIDC profile found, using it');
|
|
70
|
+
profileName = 'OIDC-PROFILE';
|
|
71
|
+
}
|
|
72
|
+
else if (getAwsCredentialsSet()) {
|
|
73
|
+
console.log('OIDC profile not found, using AWS_KEY_ID and AWS_SECRET_ACCESS_KEY');
|
|
74
|
+
profileName = 'default';
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error('AWS credentials not found, please attach CORE-PLATFORM_SHARED_ENV context if you are using CircleCI or export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables');
|
|
78
|
+
}
|
|
79
|
+
return profileName;
|
|
80
|
+
}
|
|
81
|
+
function pushImageToEcr(repositoryName, version) {
|
|
82
|
+
return (0, exec_1.exec_command)(`docker push ${process.env.AWS_ECR_REGISTRY}/${repositoryName}:${version}`);
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=aws-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-auth.js","sourceRoot":"","sources":["../../../src/utils/aws-auth.ts"],"names":[],"mappings":";;AAQA,wCAEC;AAYD,oDAmBC;AAQD,wDAaC;AAED,gCAIC;AAMD,oCAgBC;AAED,wCAOC;AAnGD,qCAA4C;AAC5C,iCAAqC;AAErC,IAAI,WAAW,GAAG,cAAc,CAAA;AAEhC;;GAEG;AACH,SAAgB,cAAc;IAC5B,OAAO,WAAW,CAAA;AACpB,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,oBAAoB;IAKlC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAA;IACjD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAA;IACzD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAA;IAC7C,IAAI,CAAC,WAAW,IAAI,CAAC,eAAe,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,kKAAkK,CACnK,CAAA;IACH,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,mIAAmI,CACpI,CAAA;IACH,CAAC;IACD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,CAAA;AACjD,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB;IAC1C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,IAAA,mBAAY,EACrC,sCAAsC,WAAW,EAAE,CACpD,CAAA;QACD,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO,YAAY,CAAC,MAAM,CAAA;QAC5B,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAChB,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,UAAU;IAC9B,OAAO,IAAA,mBAAY,EACjB,wCAAwC,WAAW,yBAAyB,MAAM,IAAA,0BAAiB,GAAE,0CAA0C,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAC9K,CAAA;AACH,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,YAAY;IAChC,MAAM,YAAY,GAAG,MAAM,sBAAsB,EAAE,CAAA;IACnD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;QAC3C,WAAW,GAAG,cAAc,CAAA;IAC9B,CAAC;SAAM,IAAI,oBAAoB,EAAE,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CACT,oEAAoE,CACrE,CAAA;QACD,WAAW,GAAG,SAAS,CAAA;IACzB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CACb,iLAAiL,CAClL,CAAA;IACH,CAAC;IACD,OAAO,WAAW,CAAA;AACpB,CAAC;AAED,SAAgB,cAAc,CAC5B,cAAsB,EACtB,OAAe;IAEf,OAAO,IAAA,mBAAY,EACjB,eAAe,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,cAAc,IAAI,OAAO,EAAE,CAC3E,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { Result } from 'tinyexec';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* Determines the available container management tool by checking for Docker and fallback to Podman if Docker is unavailable.
|
|
4
3
|
*
|
|
5
|
-
* @
|
|
6
|
-
* @param dockerfilePath - Path to the Dockerfile
|
|
7
|
-
* @param version - Version tag for the image
|
|
8
|
-
* @param gitRepoUrl - Git repository URL for annotations
|
|
9
|
-
* @param commitSha - Git commit SHA for annotations
|
|
10
|
-
* @param registry - Docker registry URL
|
|
11
|
-
* @param extraTags - Optional additional tags for the image
|
|
12
|
-
* @param appName
|
|
13
|
-
* @return {Promise<Result>}
|
|
4
|
+
* @return {Promise<string>} A promise that resolves to the string 'docker' if Docker is available, or 'podman' if Podman is used as a fallback.
|
|
14
5
|
*/
|
|
15
|
-
export declare function
|
|
6
|
+
export declare function getDockerOrPodman(): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Builds a Docker image using the provided Dockerfile.
|
|
9
|
+
*
|
|
10
|
+
* @param imageName The name of the image to build.
|
|
11
|
+
* @param dockerfilePath The path to the Dockerfile.
|
|
12
|
+
* @param version The version of the image to build.
|
|
13
|
+
* @return {Promise<{success: boolean, stdout: string, stderr: string}>} A promise that resolves to an object containing the success status, stdout, and stderr of the command.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildDockerImage(imageName: string, dockerfilePath: string, version: string): Promise<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
stdout: string;
|
|
18
|
+
stderr: string;
|
|
19
|
+
}>;
|
package/dist/src/utils/docker.js
CHANGED
|
@@ -1,73 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (!hasBuildkitBuilder) {
|
|
16
|
-
// Create new buildkit builder
|
|
17
|
-
logger_1.consola.log(`Creating new buildkit builder...`);
|
|
18
|
-
await (0, exec_1.exec)(`docker buildx create \
|
|
19
|
-
--name ${BUILDKIT_BUILDER_NAME} \
|
|
20
|
-
--driver=docker-container \
|
|
21
|
-
--use`, {
|
|
22
|
-
throwOnError: true,
|
|
23
|
-
});
|
|
3
|
+
exports.getDockerOrPodman = getDockerOrPodman;
|
|
4
|
+
exports.buildDockerImage = buildDockerImage;
|
|
5
|
+
const exec_1 = require("./exec");
|
|
6
|
+
/**
|
|
7
|
+
* Determines the available container management tool by checking for Docker and fallback to Podman if Docker is unavailable.
|
|
8
|
+
*
|
|
9
|
+
* @return {Promise<string>} A promise that resolves to the string 'docker' if Docker is available, or 'podman' if Podman is used as a fallback.
|
|
10
|
+
*/
|
|
11
|
+
async function getDockerOrPodman() {
|
|
12
|
+
try {
|
|
13
|
+
await (0, exec_1.exec_command)('docker --version');
|
|
14
|
+
return 'docker';
|
|
24
15
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
await (0, exec_1.exec)(`docker buildx use ${BUILDKIT_BUILDER_NAME}`, {
|
|
29
|
-
throwOnError: true,
|
|
30
|
-
});
|
|
16
|
+
catch (e) {
|
|
17
|
+
console.log('docker not found, trying podman');
|
|
18
|
+
return 'podman';
|
|
31
19
|
}
|
|
32
|
-
logger_1.consola.info(`Buildx context is set to ${BUILDKIT_BUILDER_NAME}`);
|
|
33
|
-
return BUILDKIT_BUILDER_NAME;
|
|
34
20
|
}
|
|
35
21
|
/**
|
|
36
|
-
* Builds
|
|
22
|
+
* Builds a Docker image using the provided Dockerfile.
|
|
37
23
|
*
|
|
38
|
-
* @param imageName
|
|
39
|
-
* @param dockerfilePath
|
|
40
|
-
* @param version
|
|
41
|
-
* @
|
|
42
|
-
* @param commitSha - Git commit SHA for annotations
|
|
43
|
-
* @param registry - Docker registry URL
|
|
44
|
-
* @param extraTags - Optional additional tags for the image
|
|
45
|
-
* @param appName
|
|
46
|
-
* @return {Promise<Result>}
|
|
24
|
+
* @param imageName The name of the image to build.
|
|
25
|
+
* @param dockerfilePath The path to the Dockerfile.
|
|
26
|
+
* @param version The version of the image to build.
|
|
27
|
+
* @return {Promise<{success: boolean, stdout: string, stderr: string}>} A promise that resolves to an object containing the success status, stdout, and stderr of the command.
|
|
47
28
|
*/
|
|
48
|
-
async function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// Build all tags including base version and extra tags
|
|
52
|
-
const tagArgs = [`${version}`, ...extraTags]
|
|
53
|
-
.map(tag => `-t ${registry}/${imageName}:${tag}`)
|
|
54
|
-
.join(' ');
|
|
55
|
-
const runCmd = `docker buildx build ${tagArgs} \
|
|
56
|
-
--builder ${buildContextName} \
|
|
57
|
-
-f ${dockerfilePath} \
|
|
58
|
-
--secret id=NPM_TOKEN \
|
|
59
|
-
--push \
|
|
60
|
-
--provenance=false \
|
|
61
|
-
--annotation org.opencontainers.image.source=${gitRepoUrl} \
|
|
62
|
-
--annotation org.opencontainers.image.revision=${commitSha} \
|
|
63
|
-
--build-arg DD_GIT_REPOSITORY_URL=${gitRepoUrl} \
|
|
64
|
-
--build-arg DD_GIT_COMMIT_SHA=${commitSha} \
|
|
65
|
-
.`;
|
|
66
|
-
return (0, exec_1.exec)(runCmd, {
|
|
67
|
-
throwOnError: true,
|
|
68
|
-
nodeOptions: {
|
|
69
|
-
stdio: 'inherit',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
29
|
+
async function buildDockerImage(imageName, dockerfilePath, version) {
|
|
30
|
+
const dockerOrPodman = await getDockerOrPodman();
|
|
31
|
+
return (0, exec_1.exec_command)(`${dockerOrPodman} buildx build -t ${process.env.AWS_ECR_REGISTRY}/${imageName}:${version} -f ${dockerfilePath} --secret id=NPM_TOKEN .`);
|
|
72
32
|
}
|
|
73
33
|
//# sourceMappingURL=docker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../../../src/utils/docker.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../../../src/utils/docker.ts"],"names":[],"mappings":";;AAOA,8CAQC;AAUD,4CASC;AAlCD,iCAAqC;AAErC;;;;GAIG;AACI,KAAK,UAAU,iBAAiB;IACrC,IAAI,CAAC;QACH,MAAM,IAAA,mBAAY,EAAC,kBAAkB,CAAC,CAAA;QACtC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;QAC9C,OAAO,QAAQ,CAAA;IACjB,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,gBAAgB,CACpC,SAAiB,EACjB,cAAsB,EACtB,OAAe;IAEf,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAChD,OAAO,IAAA,mBAAY,EACjB,GAAG,cAAc,oBAAoB,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,SAAS,IAAI,OAAO,OAAO,cAAc,2BAA2B,CAC1I,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execTiny = void 0;
|
|
4
|
+
exports.exec_command = exec_command;
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
const util_1 = require("util");
|
|
7
|
+
const tinyexec_1 = require("tinyexec");
|
|
8
|
+
async function exec_command(command) {
|
|
9
|
+
const { stdout, stderr } = await (0, util_1.promisify)(child_process_1.exec)(command);
|
|
10
|
+
console.log(stdout);
|
|
11
|
+
console.error(stderr);
|
|
12
|
+
const success = !stderr;
|
|
13
|
+
return { success, stdout, stderr };
|
|
14
|
+
}
|
|
15
|
+
function createLoggingExecWrapper(execFn) {
|
|
16
|
+
return (command, args = [], options = {}) => {
|
|
17
|
+
console.log(`Running '${command} ${args.join(' ')}'...`);
|
|
18
|
+
return execFn(command, args, {
|
|
19
|
+
throwOnError: true,
|
|
20
|
+
...options,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
exports.execTiny = createLoggingExecWrapper(tinyexec_1.x);
|
|
25
|
+
//# sourceMappingURL=exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../../src/utils/exec.ts"],"names":[],"mappings":";;;AAOA,oCAOC;AAdD,iDAAoC;AACpC,+BAAgC;AAIhC,uCAA4B;AAErB,KAAK,UAAU,YAAY,CAAC,OAAe;IAChD,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,gBAAS,EAAC,oBAAI,CAAC,CAAC,OAAO,CAAC,CAAA;IACzD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAErB,MAAM,OAAO,GAAG,CAAC,MAAM,CAAA;IACvB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AACpC,CAAC;AAED,SAAS,wBAAwB,CAAC,MAAgB;IAChD,OAAO,CACL,OAAe,EACf,OAAiB,EAAE,EACnB,UAA4B,EAAE,EAC9B,EAAE;QACF,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACxD,OAAO,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE;YAC3B,YAAY,EAAE,IAAI;YAClB,GAAG,OAAO;SACX,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC;AAEY,QAAA,QAAQ,GAAG,wBAAwB,CAAC,YAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getVersion = getVersion;
|
|
4
|
+
const fs = require("node:fs");
|
|
5
|
+
/**
|
|
6
|
+
* Get the version of a project
|
|
7
|
+
* @param projectName
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
function getVersion(projectName) {
|
|
11
|
+
const versionFilePath = `dist/apps/${projectName}/VERSION`;
|
|
12
|
+
return fs.readFileSync(versionFilePath, 'utf8');
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=get-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-version.js","sourceRoot":"","sources":["../../../src/utils/get-version.ts"],"names":[],"mappings":";;AAOA,gCAGC;AAVD,8BAA6B;AAE7B;;;;GAIG;AACH,SAAgB,UAAU,CAAC,WAAmB;IAC5C,MAAM,eAAe,GAAG,aAAa,WAAW,UAAU,CAAA;IAC1D,OAAO,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSanitizedCurrentGitBranch = getSanitizedCurrentGitBranch;
|
|
4
|
+
const exec_1 = require("./exec");
|
|
5
|
+
/**
|
|
6
|
+
* Get sanitized current git branch name
|
|
7
|
+
*/
|
|
8
|
+
async function getSanitizedCurrentGitBranch() {
|
|
9
|
+
const branchName = await (0, exec_1.exec_command)(`git branch --show-current`);
|
|
10
|
+
return branchName.success
|
|
11
|
+
? branchName.stdout
|
|
12
|
+
.trim()
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/[^a-z0-9]/g, '')
|
|
15
|
+
: '';
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../../src/utils/github.ts"],"names":[],"mappings":";;AAKA,oEAQC;AAbD,iCAAqC;AAErC;;GAEG;AACI,KAAK,UAAU,4BAA4B;IAChD,MAAM,UAAU,GAAG,MAAM,IAAA,mBAAY,EAAC,2BAA2B,CAAC,CAAA;IAClE,OAAO,UAAU,CAAC,OAAO;QACvB,CAAC,CAAC,UAAU,CAAC,MAAM;aACd,IAAI,EAAE;aACN,WAAW,EAAE;aACb,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;QAC9B,CAAC,CAAC,EAAE,CAAA;AACR,CAAC"}
|
package/dist/src/utils/helm.d.ts
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
interface ChartConfig {
|
|
2
|
-
name: string;
|
|
3
|
-
description: string;
|
|
4
|
-
type: string;
|
|
5
|
-
version: string;
|
|
6
|
-
dependencies?: ChartDependency[];
|
|
7
|
-
}
|
|
8
|
-
interface ChartDependency {
|
|
9
|
-
name: string;
|
|
10
|
-
alias?: string;
|
|
11
|
-
repository: string;
|
|
12
|
-
version: string;
|
|
13
|
-
}
|
|
14
1
|
/**
|
|
15
2
|
* Read & parse the Helm chart.yaml file
|
|
16
3
|
* @param helmFolderPath
|
|
17
4
|
*/
|
|
18
|
-
export declare function getHelmChartFile(helmFolderPath: string): Promise<
|
|
5
|
+
export declare function getHelmChartFile(helmFolderPath: string): Promise<any>;
|
|
19
6
|
/**
|
|
20
7
|
* Prepare the Chart.yaml config file for the Tsh proxy
|
|
21
8
|
* @param helmFolderPath
|
|
@@ -32,33 +19,30 @@ export declare function resetTeleportProxyHelmChartFile(helmFolderPath: string,
|
|
|
32
19
|
* Install all the helm repositories defined in the Chart config
|
|
33
20
|
* @param helmFolderPath
|
|
34
21
|
*/
|
|
35
|
-
export declare function installHelmRepo(helmFolderPath: string): Promise<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* @param version
|
|
41
|
-
*/
|
|
42
|
-
export declare function patchImageTag(valuesConfigPath: string, chartConfigPath: string, version: string): Promise<void>;
|
|
22
|
+
export declare function installHelmRepo(helmFolderPath: string): Promise<{
|
|
23
|
+
success: boolean;
|
|
24
|
+
stdout: string;
|
|
25
|
+
stderr: string;
|
|
26
|
+
}>;
|
|
43
27
|
/**
|
|
44
28
|
* Package the Helm chart
|
|
45
29
|
* @param helmFolderPath
|
|
46
30
|
* @param version
|
|
47
31
|
* @param destinationPath
|
|
48
32
|
*/
|
|
49
|
-
export declare function packageHelm(helmFolderPath: string, version: string, destinationPath: string): Promise<
|
|
33
|
+
export declare function packageHelm(helmFolderPath: string, version: string, destinationPath: string): Promise<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
stdout: string;
|
|
36
|
+
stderr: string;
|
|
37
|
+
}>;
|
|
50
38
|
/**
|
|
51
39
|
* Push the packaged Helm chart in the chartmuseum
|
|
52
40
|
* @param packagedHelmChartFilePath
|
|
53
|
-
* @param packagedHelmChartName
|
|
54
41
|
* @param projectName
|
|
55
42
|
* @param branch
|
|
56
43
|
*/
|
|
57
|
-
export declare function pushPackagedHelm(packagedHelmChartFilePath: string,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*/
|
|
63
|
-
export declare function pushOciPackagedHelm(packagedHelmChartFilePath: string, ecrRegistry: string): Promise<import("tinyexec").Output>;
|
|
64
|
-
export {};
|
|
44
|
+
export declare function pushPackagedHelm(packagedHelmChartFilePath: string, projectName: string, branch: string): Promise<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
stdout: string;
|
|
47
|
+
stderr: string;
|
|
48
|
+
}>;
|