@cloudsnorkel/cdk-github-runners 0.5.7 → 0.6.0
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/.jsii +1501 -327
- package/API.md +836 -186
- package/README.md +11 -11
- package/lib/index.d.ts +5 -2
- package/lib/index.js +7 -2
- package/lib/lambdas/delete-ami/index.js +130 -0
- package/lib/lambdas/setup/index.html +1 -1
- package/lib/lambdas/status/index.js +11 -1
- package/lib/lambdas/update-lambda/index.js +2420 -429
- package/lib/providers/codebuild.d.ts +6 -4
- package/lib/providers/codebuild.js +20 -3
- package/lib/providers/common.d.ts +137 -9
- package/lib/providers/common.js +53 -4
- package/lib/providers/docker-images/codebuild/linux-arm64/Dockerfile +1 -0
- package/lib/providers/docker-images/codebuild/linux-x64/Dockerfile +1 -0
- package/lib/providers/docker-images/fargate/linux-arm64/Dockerfile +1 -0
- package/lib/providers/docker-images/fargate/linux-x64/Dockerfile +1 -0
- package/lib/providers/docker-images/lambda/linux-arm64/runner.sh +2 -0
- package/lib/providers/docker-images/lambda/linux-x64/runner.sh +2 -0
- package/lib/providers/ec2.d.ts +106 -0
- package/lib/providers/ec2.js +252 -0
- package/lib/providers/fargate.d.ts +5 -3
- package/lib/providers/fargate.js +26 -5
- package/lib/providers/image-builders/ami.d.ts +131 -0
- package/lib/providers/image-builders/ami.js +274 -0
- package/lib/providers/image-builders/codebuild.js +3 -2
- package/lib/providers/image-builders/common.d.ts +196 -0
- package/lib/providers/image-builders/common.js +288 -0
- package/lib/providers/image-builders/container.d.ts +6 -100
- package/lib/providers/image-builders/container.js +41 -304
- package/lib/providers/image-builders/linux-components.d.ts +15 -0
- package/lib/providers/image-builders/linux-components.js +156 -0
- package/lib/providers/image-builders/static.js +3 -2
- package/lib/providers/image-builders/windows-components.d.ts +14 -0
- package/lib/providers/image-builders/windows-components.js +119 -0
- package/lib/providers/lambda.d.ts +5 -3
- package/lib/providers/lambda.js +20 -3
- package/lib/runner.js +8 -18
- package/lib/secrets.js +1 -1
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -32,17 +32,17 @@ The best way to browse API documentation is on [Constructs Hub][13]. It is avail
|
|
|
32
32
|
|
|
33
33
|
A runner provider creates compute resources on-demand and uses [actions/runner][5] to start a runner.
|
|
34
34
|
|
|
35
|
-
| | CodeBuild | Fargate | Lambda |
|
|
36
|
-
|
|
37
|
-
| **Time limit** | 8 hours | Unlimited | 15 minutes |
|
|
38
|
-
| **vCPUs** | 2, 4, 8, or 72 | 0.25 to 4 | 1 to 6 |
|
|
39
|
-
| **RAM** | 3gb, 7gb, 15gb, or 145gb | 512mb to 30gb | 128mb to 10gb |
|
|
40
|
-
| **Storage** | 50gb to 824gb | 20gb to 200gb | Up to 10gb |
|
|
41
|
-
| **Architecture** | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 |
|
|
42
|
-
| **sudo** | ✔ | ✔ | ❌ |
|
|
43
|
-
| **Docker** | ✔ (Linux only) | ❌ | ❌ |
|
|
44
|
-
| **Spot pricing** | ❌ | ✔ | ❌ |
|
|
45
|
-
| **OS** | Linux, Windows | Linux, Windows | Linux |
|
|
35
|
+
| | EC2 | CodeBuild | Fargate | Lambda |
|
|
36
|
+
|------------------|-------------------|----------------------------|----------------|---------------|
|
|
37
|
+
| **Time limit** | Unlimited | 8 hours | Unlimited | 15 minutes |
|
|
38
|
+
| **vCPUs** | Unlimited | 2, 4, 8, or 72 | 0.25 to 4 | 1 to 6 |
|
|
39
|
+
| **RAM** | Unlimited | 3gb, 7gb, 15gb, or 145gb | 512mb to 30gb | 128mb to 10gb |
|
|
40
|
+
| **Storage** | Unlimited | 50gb to 824gb | 20gb to 200gb | Up to 10gb |
|
|
41
|
+
| **Architecture** | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 |
|
|
42
|
+
| **sudo** | ✔ | ✔ | ✔ | ❌ |
|
|
43
|
+
| **Docker** | ✔ | ✔ (Linux only) | ❌ | ❌ |
|
|
44
|
+
| **Spot pricing** | ✔ | ❌ | ✔ | ❌ |
|
|
45
|
+
| **OS** | Linux, Windows | Linux, Windows | Linux, Windows | Linux |
|
|
46
46
|
|
|
47
47
|
The best provider to use mostly depends on your current infrastructure. When in doubt, CodeBuild is always a good choice. Execution history and logs are easy to view, and it has no restrictive limits unless you need to run for more than 8 hours.
|
|
48
48
|
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ export { GitHubRunners, GitHubRunnersProps } from './runner';
|
|
|
3
3
|
export { CodeBuildRunner, CodeBuildRunnerProps } from './providers/codebuild';
|
|
4
4
|
export { LambdaRunner, LambdaRunnerProps } from './providers/lambda';
|
|
5
5
|
export { FargateRunner, FargateRunnerProps } from './providers/fargate';
|
|
6
|
-
export { IRunnerProvider, RunnerProviderProps, RunnerVersion, RunnerRuntimeParameters, RunnerImage, IImageBuilder, IRunnerImageStatus, Architecture, Os } from './providers/common';
|
|
6
|
+
export { IRunnerProvider, RunnerProviderProps, RunnerVersion, RunnerRuntimeParameters, RunnerImage, IImageBuilder, IRunnerProviderStatus, IRunnerImageStatus, IRunnerAmiStatus, Architecture, Os } from './providers/common';
|
|
7
7
|
export { CodeBuildImageBuilder, CodeBuildImageBuilderProps } from './providers/image-builders/codebuild';
|
|
8
|
-
export {
|
|
8
|
+
export { ImageBuilderComponent, ImageBuilderComponentProperties, ImageBuilderAsset } from './providers/image-builders/common';
|
|
9
|
+
export { ContainerImageBuilder, ContainerImageBuilderProps } from './providers/image-builders/container';
|
|
10
|
+
export { WindowsComponents } from './providers/image-builders/windows-components';
|
|
11
|
+
export { LinuxUbuntuComponents } from './providers/image-builders/linux-components';
|
|
9
12
|
export { StaticRunnerImage } from './providers/image-builders/static';
|
package/lib/index.js
CHANGED
|
@@ -16,9 +16,14 @@ Object.defineProperty(exports, "Architecture", { enumerable: true, get: function
|
|
|
16
16
|
Object.defineProperty(exports, "Os", { enumerable: true, get: function () { return common_1.Os; } });
|
|
17
17
|
var codebuild_2 = require("./providers/image-builders/codebuild");
|
|
18
18
|
Object.defineProperty(exports, "CodeBuildImageBuilder", { enumerable: true, get: function () { return codebuild_2.CodeBuildImageBuilder; } });
|
|
19
|
+
var common_2 = require("./providers/image-builders/common");
|
|
20
|
+
Object.defineProperty(exports, "ImageBuilderComponent", { enumerable: true, get: function () { return common_2.ImageBuilderComponent; } });
|
|
19
21
|
var container_1 = require("./providers/image-builders/container");
|
|
20
22
|
Object.defineProperty(exports, "ContainerImageBuilder", { enumerable: true, get: function () { return container_1.ContainerImageBuilder; } });
|
|
21
|
-
|
|
23
|
+
var windows_components_1 = require("./providers/image-builders/windows-components");
|
|
24
|
+
Object.defineProperty(exports, "WindowsComponents", { enumerable: true, get: function () { return windows_components_1.WindowsComponents; } });
|
|
25
|
+
var linux_components_1 = require("./providers/image-builders/linux-components");
|
|
26
|
+
Object.defineProperty(exports, "LinuxUbuntuComponents", { enumerable: true, get: function () { return linux_components_1.LinuxUbuntuComponents; } });
|
|
22
27
|
var static_1 = require("./providers/image-builders/static");
|
|
23
28
|
Object.defineProperty(exports, "StaticRunnerImage", { enumerable: true, get: function () { return static_1.StaticRunnerImage; } });
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxQ0FBb0M7QUFBM0Isa0dBQUEsT0FBTyxPQUFBO0FBQ2hCLG1DQUE2RDtBQUFwRCx1R0FBQSxhQUFhLE9BQUE7QUFDdEIsbURBQThFO0FBQXJFLDRHQUFBLGVBQWUsT0FBQTtBQUN4Qiw2Q0FBcUU7QUFBNUQsc0dBQUEsWUFBWSxPQUFBO0FBQ3JCLCtDQUF3RTtBQUEvRCx3R0FBQSxhQUFhLE9BQUE7QUFDdEIsNkNBQTZOO0FBQTlLLHVHQUFBLGFBQWEsT0FBQTtBQUFvSCxzR0FBQSxZQUFZLE9BQUE7QUFBRSw0RkFBQSxFQUFFLE9BQUE7QUFDaE0sa0VBQXlHO0FBQWhHLGtIQUFBLHFCQUFxQixPQUFBO0FBQzlCLDREQUE4SDtBQUFySCwrR0FBQSxxQkFBcUIsT0FBQTtBQUM5QixrRUFBeUc7QUFBaEcsa0hBQUEscUJBQXFCLE9BQUE7QUFDOUIsb0ZBQWtGO0FBQXpFLHVIQUFBLGlCQUFpQixPQUFBO0FBQzFCLGdGQUFvRjtBQUEzRSx5SEFBQSxxQkFBcUIsT0FBQTtBQUM5Qiw0REFBc0U7QUFBN0QsMkdBQUEsaUJBQWlCLE9BQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBTZWNyZXRzIH0gZnJvbSAnLi9zZWNyZXRzJztcbmV4cG9ydCB7IEdpdEh1YlJ1bm5lcnMsIEdpdEh1YlJ1bm5lcnNQcm9wcyB9IGZyb20gJy4vcnVubmVyJztcbmV4cG9ydCB7IENvZGVCdWlsZFJ1bm5lciwgQ29kZUJ1aWxkUnVubmVyUHJvcHMgfSBmcm9tICcuL3Byb3ZpZGVycy9jb2RlYnVpbGQnO1xuZXhwb3J0IHsgTGFtYmRhUnVubmVyLCBMYW1iZGFSdW5uZXJQcm9wcyB9IGZyb20gJy4vcHJvdmlkZXJzL2xhbWJkYSc7XG5leHBvcnQgeyBGYXJnYXRlUnVubmVyLCBGYXJnYXRlUnVubmVyUHJvcHMgfSBmcm9tICcuL3Byb3ZpZGVycy9mYXJnYXRlJztcbmV4cG9ydCB7IElSdW5uZXJQcm92aWRlciwgUnVubmVyUHJvdmlkZXJQcm9wcywgUnVubmVyVmVyc2lvbiwgUnVubmVyUnVudGltZVBhcmFtZXRlcnMsIFJ1bm5lckltYWdlLCBJSW1hZ2VCdWlsZGVyLCBJUnVubmVyUHJvdmlkZXJTdGF0dXMsIElSdW5uZXJJbWFnZVN0YXR1cywgSVJ1bm5lckFtaVN0YXR1cywgQXJjaGl0ZWN0dXJlLCBPcyB9IGZyb20gJy4vcHJvdmlkZXJzL2NvbW1vbic7XG5leHBvcnQgeyBDb2RlQnVpbGRJbWFnZUJ1aWxkZXIsIENvZGVCdWlsZEltYWdlQnVpbGRlclByb3BzIH0gZnJvbSAnLi9wcm92aWRlcnMvaW1hZ2UtYnVpbGRlcnMvY29kZWJ1aWxkJztcbmV4cG9ydCB7IEltYWdlQnVpbGRlckNvbXBvbmVudCwgSW1hZ2VCdWlsZGVyQ29tcG9uZW50UHJvcGVydGllcywgSW1hZ2VCdWlsZGVyQXNzZXQgfSBmcm9tICcuL3Byb3ZpZGVycy9pbWFnZS1idWlsZGVycy9jb21tb24nO1xuZXhwb3J0IHsgQ29udGFpbmVySW1hZ2VCdWlsZGVyLCBDb250YWluZXJJbWFnZUJ1aWxkZXJQcm9wcyB9IGZyb20gJy4vcHJvdmlkZXJzL2ltYWdlLWJ1aWxkZXJzL2NvbnRhaW5lcic7XG5leHBvcnQgeyBXaW5kb3dzQ29tcG9uZW50cyB9IGZyb20gJy4vcHJvdmlkZXJzL2ltYWdlLWJ1aWxkZXJzL3dpbmRvd3MtY29tcG9uZW50cyc7XG5leHBvcnQgeyBMaW51eFVidW50dUNvbXBvbmVudHMgfSBmcm9tICcuL3Byb3ZpZGVycy9pbWFnZS1idWlsZGVycy9saW51eC1jb21wb25lbnRzJztcbmV4cG9ydCB7IFN0YXRpY1J1bm5lckltYWdlIH0gZnJvbSAnLi9wcm92aWRlcnMvaW1hZ2UtYnVpbGRlcnMvc3RhdGljJztcbiJdfQ==
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
|
+
mod
|
|
19
|
+
));
|
|
20
|
+
|
|
21
|
+
// src/lambdas/delete-ami/index.ts
|
|
22
|
+
var AWS2 = __toESM(require("aws-sdk"));
|
|
23
|
+
|
|
24
|
+
// src/lambdas/helpers.ts
|
|
25
|
+
var AWS = __toESM(require("aws-sdk"));
|
|
26
|
+
var sm = new AWS.SecretsManager();
|
|
27
|
+
async function customResourceRespond(event, responseStatus, reason, physicalResourceId, data) {
|
|
28
|
+
const responseBody = JSON.stringify({
|
|
29
|
+
Status: responseStatus,
|
|
30
|
+
Reason: reason,
|
|
31
|
+
PhysicalResourceId: physicalResourceId,
|
|
32
|
+
StackId: event.StackId,
|
|
33
|
+
RequestId: event.RequestId,
|
|
34
|
+
LogicalResourceId: event.LogicalResourceId,
|
|
35
|
+
NoEcho: false,
|
|
36
|
+
Data: data
|
|
37
|
+
});
|
|
38
|
+
console.log("Responding", responseBody);
|
|
39
|
+
const parsedUrl = require("url").parse(event.ResponseURL);
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
hostname: parsedUrl.hostname,
|
|
42
|
+
path: parsedUrl.path,
|
|
43
|
+
method: "PUT",
|
|
44
|
+
headers: {
|
|
45
|
+
"content-type": "",
|
|
46
|
+
"content-length": responseBody.length
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
try {
|
|
51
|
+
const request = require("https").request(requestOptions, resolve);
|
|
52
|
+
request.on("error", reject);
|
|
53
|
+
request.write(responseBody);
|
|
54
|
+
request.end();
|
|
55
|
+
} catch (e) {
|
|
56
|
+
reject(e);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/lambdas/delete-ami/index.ts
|
|
62
|
+
var ec2 = new AWS2.EC2();
|
|
63
|
+
async function deleteAmis(launchTemplateId, stackName, builderName, deleteAll) {
|
|
64
|
+
const images = await ec2.describeImages({
|
|
65
|
+
Owners: ["self"],
|
|
66
|
+
Filters: [
|
|
67
|
+
{
|
|
68
|
+
Name: "tag:GitHubRunners:Stack",
|
|
69
|
+
Values: [stackName]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
Name: "tag:GitHubRunners:Builder",
|
|
73
|
+
Values: [builderName]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}).promise();
|
|
77
|
+
let imagesToDelete = images.Images ?? [];
|
|
78
|
+
console.log(`Found ${imagesToDelete.length} AMIs`);
|
|
79
|
+
console.log(JSON.stringify(imagesToDelete.map((i) => i.ImageId)));
|
|
80
|
+
if (!deleteAll) {
|
|
81
|
+
const launchTemplates = await ec2.describeLaunchTemplateVersions({
|
|
82
|
+
LaunchTemplateId: launchTemplateId,
|
|
83
|
+
Versions: ["$Default"]
|
|
84
|
+
}).promise();
|
|
85
|
+
if (!launchTemplates.LaunchTemplateVersions) {
|
|
86
|
+
console.error(`Unable to describe launch template ${launchTemplateId}`);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const launchTemplate = launchTemplates.LaunchTemplateVersions[0];
|
|
90
|
+
imagesToDelete = imagesToDelete.filter((i) => {
|
|
91
|
+
var _a;
|
|
92
|
+
return i.ImageId != ((_a = launchTemplate.LaunchTemplateData) == null ? void 0 : _a.ImageId);
|
|
93
|
+
});
|
|
94
|
+
imagesToDelete = imagesToDelete.filter((i) => i.CreationDate && Date.parse(i.CreationDate) < Date.now() - 1e3 * 60 * 60 * 48);
|
|
95
|
+
console.log(`${imagesToDelete.length} AMIs left after filtering by date and excluding AMI used by launch template`);
|
|
96
|
+
}
|
|
97
|
+
for (const image of imagesToDelete) {
|
|
98
|
+
if (!image.ImageId) {
|
|
99
|
+
console.warn(`No image id? ${JSON.stringify(image)}`);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
console.log(`Deregistering ${image.ImageId}`);
|
|
103
|
+
await ec2.deregisterImage({
|
|
104
|
+
ImageId: image.ImageId
|
|
105
|
+
}).promise();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.handler = async function(event, context) {
|
|
109
|
+
try {
|
|
110
|
+
console.log(JSON.stringify({ ...event, ResponseURL: "..." }));
|
|
111
|
+
switch (event.RequestType) {
|
|
112
|
+
case "Scheduled":
|
|
113
|
+
await deleteAmis(event.LaunchTemplateId, event.StackName, event.BuilderName, false);
|
|
114
|
+
return;
|
|
115
|
+
case "Create":
|
|
116
|
+
case "Update":
|
|
117
|
+
await customResourceRespond(event, "SUCCESS", "OK", "DeleteAmis", {});
|
|
118
|
+
break;
|
|
119
|
+
case "Delete":
|
|
120
|
+
await deleteAmis("", event.ResourceProperties.StackName, event.ResourceProperties.BuilderName, true);
|
|
121
|
+
await customResourceRespond(event, "SUCCESS", "OK", event.PhysicalResourceId, {});
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
} catch (e) {
|
|
125
|
+
console.error(e);
|
|
126
|
+
if (event.RequestType != "Scheduled") {
|
|
127
|
+
await customResourceRespond(event, "FAILED", e.message || "Internal Error", context.logStreamName, {});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Setup GitHub Runners</title>
|
|
7
7
|
<script type="module" crossorigin>
|
|
8
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const p of n)if(p.type==="childList")for(const c of p.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function o(n){const p={};return n.integrity&&(p.integrity=n.integrity),n.referrerpolicy&&(p.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?p.credentials="include":n.crossorigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function i(n){if(n.ep)return;n.ep=!0;const p=o(n);fetch(n.href,p)}})();function Y(){}function Le(e){return e()}function Ce(){return Object.create(null)}function j(e){e.forEach(Le)}function Ue(e){return typeof e=="function"}function Be(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function De(e){return Object.keys(e).length===0}function l(e,t){e.appendChild(t)}function H(e,t,o){e.insertBefore(t,o||null)}function T(e){e.parentNode.removeChild(e)}function r(e){return document.createElement(e)}function I(e){return document.createTextNode(e)}function b(){return I(" ")}function Me(){return I("")}function $(e,t,o,i){return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function s(e,t,o){o==null?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function $e(e){return e===""?null:+e}function je(e){return Array.from(e.childNodes)}function ce(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function M(e,t){e.value=t==null?"":t}let ke;function ee(e){ke=e}const x=[],Se=[],ae=[],Te=[],qe=Promise.resolve();let be=!1;function Je(){be||(be=!0,qe.then(ze))}function ve(e){ae.push(e)}const he=new Set;let ue=0;function ze(){const e=ke;do{for(;ue<x.length;){const t=x[ue];ue++,ee(t),Ke(t.$$)}for(ee(null),x.length=0,ue=0;Se.length;)Se.pop()();for(let t=0;t<ae.length;t+=1){const o=ae[t];he.has(o)||(he.add(o),o())}ae.length=0}while(x.length);for(;Te.length;)Te.pop()();be=!1,he.clear(),ee(e)}function Ke(e){if(e.fragment!==null){e.update(),j(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ve)}}const We=new Set;function Fe(e,t){e&&e.i&&(We.delete(e),e.i(t))}function Ye(e,t,o,i){const{fragment:n,after_update:p}=e.$$;n&&n.m(t,o),i||ve(()=>{const c=e.$$.on_mount.map(Le).filter(Ue);e.$$.on_destroy?e.$$.on_destroy.push(...c):j(c),e.$$.on_mount=[]}),p.forEach(ve)}function Ze(e,t){const o=e.$$;o.fragment!==null&&(j(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function Qe(e,t){e.$$.dirty[0]===-1&&(x.push(e),Je(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ve(e,t,o,i,n,p,c,u=[-1]){const v=ke;ee(e);const a=e.$$={fragment:null,ctx:[],props:p,update:Y,not_equal:n,bound:Ce(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(v?v.$$.context:[])),callbacks:Ce(),dirty:u,skip_bound:!1,root:t.target||v.$$.root};c&&c(a.root);let h=!1;if(a.ctx=o?o(e,t.props||{},(g,f,...O)=>{const k=O.length?O[0]:f;return a.ctx&&n(a.ctx[g],a.ctx[g]=k)&&(!a.skip_bound&&a.bound[g]&&a.bound[g](k),h&&Qe(e,g)),f}):[],a.update(),h=!0,j(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const g=je(t.target);a.fragment&&a.fragment.l(g),g.forEach(T)}else a.fragment&&a.fragment.c();t.intro&&Fe(e.$$.fragment),Ye(e,t.target,t.anchor,t.customElement),ze()}ee(v)}class Xe{$destroy(){Ze(this,1),this.$destroy=Y}$on(t,o){if(!Ue(o))return Y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(o),()=>{const n=i.indexOf(o);n!==-1&&i.splice(n,1)}}$set(t){this.$$set&&!De(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Oe(e){let t,o,i,n,p,c,u,v;return{c(){t=r("h3"),t.textContent="GitHub Enterprise Server Domain",o=b(),i=r("div"),n=r("p"),n.innerHTML=`Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code>
|
|
8
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const p of n)if(p.type==="childList")for(const c of p.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function o(n){const p={};return n.integrity&&(p.integrity=n.integrity),n.referrerpolicy&&(p.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?p.credentials="include":n.crossorigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function i(n){if(n.ep)return;n.ep=!0;const p=o(n);fetch(n.href,p)}})();function Y(){}function Le(e){return e()}function Ce(){return Object.create(null)}function j(e){e.forEach(Le)}function Ue(e){return typeof e=="function"}function Be(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function De(e){return Object.keys(e).length===0}function l(e,t){e.appendChild(t)}function H(e,t,o){e.insertBefore(t,o||null)}function T(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){return document.createElement(e)}function I(e){return document.createTextNode(e)}function b(){return I(" ")}function Me(){return I("")}function $(e,t,o,i){return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function s(e,t,o){o==null?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function $e(e){return e===""?null:+e}function je(e){return Array.from(e.childNodes)}function ce(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function M(e,t){e.value=t==null?"":t}let ke;function ee(e){ke=e}const x=[],Se=[],ae=[],Te=[],qe=Promise.resolve();let be=!1;function Je(){be||(be=!0,qe.then(ze))}function ve(e){ae.push(e)}const he=new Set;let ue=0;function ze(){const e=ke;do{for(;ue<x.length;){const t=x[ue];ue++,ee(t),Ke(t.$$)}for(ee(null),x.length=0,ue=0;Se.length;)Se.pop()();for(let t=0;t<ae.length;t+=1){const o=ae[t];he.has(o)||(he.add(o),o())}ae.length=0}while(x.length);for(;Te.length;)Te.pop()();be=!1,he.clear(),ee(e)}function Ke(e){if(e.fragment!==null){e.update(),j(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ve)}}const We=new Set;function Fe(e,t){e&&e.i&&(We.delete(e),e.i(t))}function Ye(e,t,o,i){const{fragment:n,after_update:p}=e.$$;n&&n.m(t,o),i||ve(()=>{const c=e.$$.on_mount.map(Le).filter(Ue);e.$$.on_destroy?e.$$.on_destroy.push(...c):j(c),e.$$.on_mount=[]}),p.forEach(ve)}function Ze(e,t){const o=e.$$;o.fragment!==null&&(j(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function Qe(e,t){e.$$.dirty[0]===-1&&(x.push(e),Je(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ve(e,t,o,i,n,p,c,u=[-1]){const v=ke;ee(e);const a=e.$$={fragment:null,ctx:[],props:p,update:Y,not_equal:n,bound:Ce(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(v?v.$$.context:[])),callbacks:Ce(),dirty:u,skip_bound:!1,root:t.target||v.$$.root};c&&c(a.root);let h=!1;if(a.ctx=o?o(e,t.props||{},(g,f,...O)=>{const k=O.length?O[0]:f;return a.ctx&&n(a.ctx[g],a.ctx[g]=k)&&(!a.skip_bound&&a.bound[g]&&a.bound[g](k),h&&Qe(e,g)),f}):[],a.update(),h=!0,j(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const g=je(t.target);a.fragment&&a.fragment.l(g),g.forEach(T)}else a.fragment&&a.fragment.c();t.intro&&Fe(e.$$.fragment),Ye(e,t.target,t.anchor,t.customElement),ze()}ee(v)}class Xe{$destroy(){Ze(this,1),this.$destroy=Y}$on(t,o){if(!Ue(o))return Y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(o),()=>{const n=i.indexOf(o);n!==-1&&i.splice(n,1)}}$set(t){this.$$set&&!De(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Oe(e){let t,o,i,n,p,c,u,v;return{c(){t=r("h3"),t.textContent="GitHub Enterprise Server Domain",o=b(),i=r("div"),n=r("p"),n.innerHTML=`Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code>
|
|
9
9
|
and without any path. It should look something like <code>github.mycompany.com</code>.`,p=b(),c=r("input"),s(c,"class","form-control"),s(i,"class","px-3 py-3")},m(a,h){H(a,t,h),H(a,o,h),H(a,i,h),l(i,n),l(i,p),l(i,c),M(c,e[1]),u||(v=$(c,"input",e[15]),u=!0)},p(a,h){h&2&&c.value!==a[1]&&M(c,a[1])},d(a){a&&T(t),a&&T(o),a&&T(i),u=!1,v()}}}function He(e){let t,o,i,n,p,c,u,v,a,h,g,f,O,k,S,C,d,_,A,E,N;return{c(){t=r("h3"),t.textContent="Authentication Type",o=b(),i=r("div"),n=r("p"),n.textContent=`You can choose between creating a new app that will provide authentication for specific
|
|
10
10
|
repositories, or a personal access token that will provide access to all repositories
|
|
11
11
|
available to you. Apps are easier to set up and provide more fine-grained access control. If
|
|
@@ -14665,6 +14665,7 @@ function baseUrlFromDomain(domain) {
|
|
|
14665
14665
|
|
|
14666
14666
|
// src/lambdas/status/index.ts
|
|
14667
14667
|
var cfn = new AWS2.CloudFormation();
|
|
14668
|
+
var ec2 = new AWS2.EC2();
|
|
14668
14669
|
var ecr = new AWS2.ECR();
|
|
14669
14670
|
var sf = new AWS2.StepFunctions();
|
|
14670
14671
|
function secretArnToUrl(arn) {
|
|
@@ -14693,7 +14694,7 @@ async function generateProvidersStatus(stack, logicalId) {
|
|
|
14693
14694
|
return {};
|
|
14694
14695
|
}
|
|
14695
14696
|
return Promise.all(providers.map(async (p) => {
|
|
14696
|
-
var _a2, _b, _c;
|
|
14697
|
+
var _a2, _b, _c, _d, _e;
|
|
14697
14698
|
if ((_b = (_a2 = p.image) == null ? void 0 : _a2.imageRepository) == null ? void 0 : _b.match(/[0-9]+\.dkr\.ecr\.[a-z0-9\-]+\.amazonaws\.com\/.+/)) {
|
|
14698
14699
|
const tags = await ecr.describeImages({
|
|
14699
14700
|
repositoryName: p.image.imageRepository.split("/")[1],
|
|
@@ -14710,6 +14711,15 @@ async function generateProvidersStatus(stack, logicalId) {
|
|
|
14710
14711
|
};
|
|
14711
14712
|
}
|
|
14712
14713
|
}
|
|
14714
|
+
if ((_d = p.ami) == null ? void 0 : _d.launchTemplate) {
|
|
14715
|
+
const versions = await ec2.describeLaunchTemplateVersions({
|
|
14716
|
+
LaunchTemplateId: p.ami.launchTemplate,
|
|
14717
|
+
Versions: ["$Default"]
|
|
14718
|
+
}).promise();
|
|
14719
|
+
if (((_e = versions.LaunchTemplateVersions) == null ? void 0 : _e.length) >= 1) {
|
|
14720
|
+
p.ami.latestAmi = versions.LaunchTemplateVersions[0].LaunchTemplateData.ImageId;
|
|
14721
|
+
}
|
|
14722
|
+
}
|
|
14713
14723
|
return p;
|
|
14714
14724
|
}));
|
|
14715
14725
|
}
|