From ebc7fe0d41f73791f4a91addb5b62ce58c1f503d Mon Sep 17 00:00:00 2001 From: Amir Szekely Date: Mon, 15 Dec 2025 18:26:29 -0500 Subject: [PATCH] chore: Use built-in auto-versioning EC2 Image Builder added support for (auto-versioning)[https://aws.amazon.com/about-aws/whats-new/2025/11/ec2-image-builder-auto-versioning-infrastructure/]. We can get rid of our own custom versioner. See also #804 --- .eslintrc.json | 1 - .gitattributes | 1 - .gitignore | 1 - .projen/files.json | 1 - .projen/tasks.json | 21 - package.json | 2 - src/image-builders/aws-image-builder/ami.ts | 13 +- .../aws-image-builder/builder.ts | 9 +- .../aws-image-builder/common.ts | 48 - .../aws-image-builder/container.ts | 13 +- src/image-builders/aws-image-builder/index.ts | 1 - .../aws-image-builder/versioner-function.ts | 26 - .../aws-image-builder/versioner.lambda.ts | 127 - .../aws-image-builder/workflow.ts | 11 +- .../github-runners-test.assets.json | 17 +- .../github-runners-test.template.json | 2886 +---------------- test/versioner.test.ts | 35 - 17 files changed, 187 insertions(+), 3026 deletions(-) delete mode 100644 src/image-builders/aws-image-builder/common.ts delete mode 100644 src/image-builders/aws-image-builder/versioner-function.ts delete mode 100644 src/image-builders/aws-image-builder/versioner.lambda.ts delete mode 100644 test/versioner.test.ts diff --git a/.eslintrc.json b/.eslintrc.json index 3e066d61..2db98bfb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -164,7 +164,6 @@ "src/providers/update-lambda.lambda.ts", "src/image-builders/aws-image-builder/delete-resources.lambda.ts", "src/image-builders/aws-image-builder/filter-failed-builds.lambda.ts", - "src/image-builders/aws-image-builder/versioner.lambda.ts", "src/lambda-helpers.ts", "src/lambda-github.ts", "setup/src/main.ts" diff --git a/.gitattributes b/.gitattributes index bb4dfee1..7f2f1f61 100644 --- a/.gitattributes +++ b/.gitattributes @@ -31,7 +31,6 @@ /src/idle-runner-repear-function.ts linguist-generated /src/image-builders/aws-image-builder/delete-resources-function.ts linguist-generated /src/image-builders/aws-image-builder/filter-failed-builds-function.ts linguist-generated -/src/image-builders/aws-image-builder/versioner-function.ts linguist-generated /src/image-builders/build-image-function.ts linguist-generated /src/providers/ami-root-device-function.ts linguist-generated /src/providers/update-lambda-function.ts linguist-generated diff --git a/.gitignore b/.gitignore index 9ef212a0..92c14a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -66,7 +66,6 @@ tsconfig.json !/src/providers/update-lambda-function.ts !/src/image-builders/aws-image-builder/delete-resources-function.ts !/src/image-builders/aws-image-builder/filter-failed-builds-function.ts -!/src/image-builders/aws-image-builder/versioner-function.ts test/.tmp test/default.integ.snapshot/asset.* test/default.integ.snapshot/**/asset.* diff --git a/.projen/files.json b/.projen/files.json index b5ea4c2e..0f8b70af 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -19,7 +19,6 @@ "src/idle-runner-repear-function.ts", "src/image-builders/aws-image-builder/delete-resources-function.ts", "src/image-builders/aws-image-builder/filter-failed-builds-function.ts", - "src/image-builders/aws-image-builder/versioner-function.ts", "src/image-builders/build-image-function.ts", "src/providers/ami-root-device-function.ts", "src/providers/update-lambda-function.ts", diff --git a/.projen/tasks.json b/.projen/tasks.json index c0ebeb13..295b6aa2 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -82,9 +82,6 @@ { "spawn": "bundle:image-builders/aws-image-builder/filter-failed-builds.lambda" }, - { - "spawn": "bundle:image-builders/aws-image-builder/versioner.lambda" - }, { "exec": "cp -r src/providers/docker-images assets" }, @@ -171,24 +168,6 @@ } ] }, - "bundle:image-builders/aws-image-builder/versioner.lambda": { - "name": "bundle:image-builders/aws-image-builder/versioner.lambda", - "description": "Create a JavaScript bundle from src/image-builders/aws-image-builder/versioner.lambda.ts", - "steps": [ - { - "exec": "esbuild --bundle src/image-builders/aws-image-builder/versioner.lambda.ts --target=\"node22\" --platform=\"node\" --outfile=\"assets/image-builders/aws-image-builder/versioner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:@aws-sdk/*" - } - ] - }, - "bundle:image-builders/aws-image-builder/versioner.lambda:watch": { - "name": "bundle:image-builders/aws-image-builder/versioner.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/image-builders/aws-image-builder/versioner.lambda.ts", - "steps": [ - { - "exec": "esbuild --bundle src/image-builders/aws-image-builder/versioner.lambda.ts --target=\"node22\" --platform=\"node\" --outfile=\"assets/image-builders/aws-image-builder/versioner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:@aws-sdk/* --watch" - } - ] - }, "bundle:image-builders/build-image.lambda": { "name": "bundle:image-builders/build-image.lambda", "description": "Create a JavaScript bundle from src/image-builders/build-image.lambda.ts", diff --git a/package.json b/package.json index 6b9ebe92..5c1702b6 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,6 @@ "bundle:image-builders/aws-image-builder/delete-resources.lambda:watch": "npx projen bundle:image-builders/aws-image-builder/delete-resources.lambda:watch", "bundle:image-builders/aws-image-builder/filter-failed-builds.lambda": "npx projen bundle:image-builders/aws-image-builder/filter-failed-builds.lambda", "bundle:image-builders/aws-image-builder/filter-failed-builds.lambda:watch": "npx projen bundle:image-builders/aws-image-builder/filter-failed-builds.lambda:watch", - "bundle:image-builders/aws-image-builder/versioner.lambda": "npx projen bundle:image-builders/aws-image-builder/versioner.lambda", - "bundle:image-builders/aws-image-builder/versioner.lambda:watch": "npx projen bundle:image-builders/aws-image-builder/versioner.lambda:watch", "bundle:image-builders/build-image.lambda": "npx projen bundle:image-builders/build-image.lambda", "bundle:image-builders/build-image.lambda:watch": "npx projen bundle:image-builders/build-image.lambda:watch", "bundle:providers/ami-root-device.lambda": "npx projen bundle:providers/ami-root-device.lambda", diff --git a/src/image-builders/aws-image-builder/ami.ts b/src/image-builders/aws-image-builder/ami.ts index 656eb898..5742403a 100644 --- a/src/image-builders/aws-image-builder/ami.ts +++ b/src/image-builders/aws-image-builder/ami.ts @@ -2,7 +2,6 @@ import * as cdk from 'aws-cdk-lib'; import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { ImageBuilderComponent } from './builder'; -import { ImageBuilderObjectBase } from './common'; import { amiRootDevice, Architecture, Os } from '../../providers'; import { uniqueImageBuilderName } from '../common'; @@ -48,7 +47,7 @@ interface AmiRecipeProperties { * * @internal */ -export class AmiRecipe extends ImageBuilderObjectBase { +export class AmiRecipe extends cdk.Resource { public readonly arn: string; public readonly name: string; public readonly version: string; @@ -73,13 +72,6 @@ export class AmiRecipe extends ImageBuilderObjectBase { ] : undefined; this.name = uniqueImageBuilderName(this); - this.version = this.generateVersion('ImageRecipe', this.name, { - platform: props.platform, - components, - parentAmi: props.baseAmi, - tags: props.tags, - blockDeviceMappings, - }); let workingDirectory; if (props.platform == 'Linux') { @@ -92,7 +84,7 @@ export class AmiRecipe extends ImageBuilderObjectBase { const recipe = new imagebuilder.CfnImageRecipe(this, 'Recipe', { name: this.name, - version: this.version, + version: '1.0.x', parentImage: props.baseAmi, components, workingDirectory, @@ -101,6 +93,7 @@ export class AmiRecipe extends ImageBuilderObjectBase { }); this.arn = recipe.attrArn; + this.version = recipe.getAtt('Version', cdk.ResolutionTypeHint.STRING).toString(); } } diff --git a/src/image-builders/aws-image-builder/builder.ts b/src/image-builders/aws-image-builder/builder.ts index 56e8bd8e..ef1074d8 100644 --- a/src/image-builders/aws-image-builder/builder.ts +++ b/src/image-builders/aws-image-builder/builder.ts @@ -20,7 +20,6 @@ import { TagMutability } from 'aws-cdk-lib/aws-ecr'; import { RetentionDays } from 'aws-cdk-lib/aws-logs'; import { Construct, IConstruct } from 'constructs'; import { AmiRecipe, defaultBaseAmi } from './ami'; -import { ImageBuilderObjectBase } from './common'; import { ContainerRecipe, defaultBaseDockerImage } from './container'; import { DeleteResourcesFunction } from './delete-resources-function'; import { DeleteResourcesProps } from './delete-resources.lambda'; @@ -164,7 +163,7 @@ export interface ImageBuilderComponentProperties { * * @deprecated Use `RunnerImageComponent` instead as this be internal soon. */ -export class ImageBuilderComponent extends ImageBuilderObjectBase { +export class ImageBuilderComponent extends cdk.Resource { /** * Component ARN. */ @@ -263,11 +262,7 @@ export class ImageBuilderComponent extends ImageBuilderObjectBase { name: name, description: props.description, platform: props.platform, - version: this.generateVersion('Component', name, { - platform: props.platform, - data, - description: props.description, - }), + version: '1.0.0', data: JSON.stringify(data), }); diff --git a/src/image-builders/aws-image-builder/common.ts b/src/image-builders/aws-image-builder/common.ts deleted file mode 100644 index 6af4b1bc..00000000 --- a/src/image-builders/aws-image-builder/common.ts +++ /dev/null @@ -1,48 +0,0 @@ -import * as cdk from 'aws-cdk-lib'; -import { aws_iam as iam, aws_lambda as lambda, CustomResource } from 'aws-cdk-lib'; -import { Construct } from 'constructs'; -import { VersionerFunction } from './versioner-function'; -import { singletonLambda, singletonLogGroup, SingletonLogType } from '../../utils'; - -/** - * @internal - */ -export abstract class ImageBuilderObjectBase extends cdk.Resource { - protected constructor(scope: Construct, id: string) { - super(scope, id); - } - - protected generateVersion(type: 'Component' | 'ImageRecipe' | 'ContainerRecipe' | 'Workflow', name: string, data: any): string { - return new CustomResource(this, 'Version', { - serviceToken: this.versionFunction().functionArn, - resourceType: `Custom::ImageBuilder-${type}-Version`, - removalPolicy: cdk.RemovalPolicy.RETAIN, // no point in deleting as it doesn't even create anything - properties: { - ObjectType: type, - ObjectName: name, - VersionedData: data, // get a new version every time something changes, like Image Builder wants - }, - }).ref; - } - - private versionFunction(): VersionerFunction { - return singletonLambda(VersionerFunction, this, 'aws-image-builder-versioner', { - description: 'Custom resource handler that bumps up Image Builder versions', - initialPolicy: [ - new iam.PolicyStatement({ - actions: [ - 'imagebuilder:ListComponents', - 'imagebuilder:ListContainerRecipes', - 'imagebuilder:ListImageRecipes', - 'imagebuilder:ListWorkflows', - ], - resources: ['*'], - }), - ], - logGroup: singletonLogGroup(this, SingletonLogType.RUNNER_IMAGE_BUILD), - loggingFormat: lambda.LoggingFormat.JSON, - timeout: cdk.Duration.minutes(5), - }); - } -} - diff --git a/src/image-builders/aws-image-builder/container.ts b/src/image-builders/aws-image-builder/container.ts index 8724663c..1baee1d8 100644 --- a/src/image-builders/aws-image-builder/container.ts +++ b/src/image-builders/aws-image-builder/container.ts @@ -1,7 +1,7 @@ +import * as cdk from 'aws-cdk-lib'; import { aws_ecr as ecr, aws_imagebuilder as imagebuilder } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { ImageBuilderComponent } from './builder'; -import { ImageBuilderObjectBase } from './common'; import { Os } from '../../providers'; import { uniqueImageBuilderName } from '../common'; @@ -55,7 +55,7 @@ export interface ContainerRecipeProperties { * * @internal */ -export class ContainerRecipe extends ImageBuilderObjectBase { +export class ContainerRecipe extends cdk.Resource { public readonly arn: string; public readonly name: string; public readonly version: string; @@ -70,16 +70,10 @@ export class ContainerRecipe extends ImageBuilderObjectBase { }); this.name = uniqueImageBuilderName(this); - this.version = this.generateVersion('ContainerRecipe', this.name, { - platform: props.platform, - components, - dockerfileTemplate: props.dockerfileTemplate, - tags: props.tags, - }); const recipe = new imagebuilder.CfnContainerRecipe(this, 'Recipe', { name: this.name, - version: this.version, + version: '1.0.x', parentImage: props.parentImage, platformOverride: props.platform == 'Linux' ? 'Linux' : undefined, components, @@ -93,6 +87,7 @@ export class ContainerRecipe extends ImageBuilderObjectBase { }); this.arn = recipe.attrArn; + this.version = recipe.getAtt('Version', cdk.ResolutionTypeHint.STRING).toString(); } } diff --git a/src/image-builders/aws-image-builder/index.ts b/src/image-builders/aws-image-builder/index.ts index fa4f61be..a54825e0 100644 --- a/src/image-builders/aws-image-builder/index.ts +++ b/src/image-builders/aws-image-builder/index.ts @@ -1,5 +1,4 @@ export * from './ami'; export * from './builder'; -export * from './common'; export * from './container'; export * from './deprecated'; diff --git a/src/image-builders/aws-image-builder/versioner-function.ts b/src/image-builders/aws-image-builder/versioner-function.ts deleted file mode 100644 index 7bfda5d0..00000000 --- a/src/image-builders/aws-image-builder/versioner-function.ts +++ /dev/null @@ -1,26 +0,0 @@ -// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -import * as path from 'path'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; -import { Construct } from 'constructs'; - -/** - * Props for VersionerFunction - */ -export interface VersionerFunctionProps extends lambda.FunctionOptions { -} - -/** - * An AWS Lambda function which executes src/image-builders/aws-image-builder/versioner. - */ -export class VersionerFunction extends lambda.Function { - constructor(scope: Construct, id: string, props?: VersionerFunctionProps) { - super(scope, id, { - description: 'src/image-builders/aws-image-builder/versioner.lambda.ts', - ...props, - runtime: new lambda.Runtime('nodejs22.x', lambda.RuntimeFamily.NODEJS), - handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../../assets/image-builders/aws-image-builder/versioner.lambda')), - }); - this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); - } -} \ No newline at end of file diff --git a/src/image-builders/aws-image-builder/versioner.lambda.ts b/src/image-builders/aws-image-builder/versioner.lambda.ts deleted file mode 100644 index cd09f404..00000000 --- a/src/image-builders/aws-image-builder/versioner.lambda.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { - ImagebuilderClient, - ListComponentsCommand, - ListComponentsResponse, - ListContainerRecipesCommand, - ListContainerRecipesResponse, - ListImageRecipesCommand, - ListImageRecipesResponse, - ListWorkflowsCommand, - ListWorkflowsResponse, -} from '@aws-sdk/client-imagebuilder'; -import * as AWSLambda from 'aws-lambda'; -import { inc, maxSatisfying } from 'semver'; -import { customResourceRespond } from '../../lambda-helpers'; - -const ib = new ImagebuilderClient(); - -/** - * Exported for unit tests. - * @internal - */ -export function increaseVersion(allVersions: string[]) { - let version = maxSatisfying(allVersions, '>=0.0.0'); - if (version === null) { - version = '1.0.0'; - } - console.log(`Found versions ${allVersions} -- latest is ${version}`); - - version = inc(version, 'patch'); - if (version === null) { - throw new Error('Unable to bump version'); - } - - return version; -} - -export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent, context: AWSLambda.Context) { - console.log({ ...event, ResponseURL: '...' }); - - try { - const objectType = event.ResourceProperties.ObjectType; - const objectName = event.ResourceProperties.ObjectName; - - switch (event.RequestType) { - case 'Create': - case 'Update': - let allVersions: string[] = []; - try { - switch (objectType) { - case 'Component': { - let result: ListComponentsResponse = {}; - do { - result = await ib.send(new ListComponentsCommand({ - filters: [{ - name: 'name', - values: [objectName], - }], - nextToken: result.nextToken, - })); - allVersions = allVersions.concat(result.componentVersionList!.map(i => i.version || '1.0.0')); - } while (result.nextToken); - break; - } - case 'ImageRecipe': { - let result: ListImageRecipesResponse = {}; - do { - result = await ib.send(new ListImageRecipesCommand({ - filters: [{ - name: 'name', - values: [objectName], - }], - nextToken: result.nextToken, - })); - allVersions = allVersions.concat(result.imageRecipeSummaryList!.map(i => i.arn?.split('/').pop() || '1.0.0')); - } while (result.nextToken); - break; - } - case 'ContainerRecipe': { - let result: ListContainerRecipesResponse = {}; - do { - result = await ib.send(new ListContainerRecipesCommand({ - filters: [{ - name: 'name', - values: [objectName], - }], - nextToken: result.nextToken, - })); - allVersions = allVersions.concat(result.containerRecipeSummaryList!.map(i => i.arn?.split('/').pop() || '1.0.0')); - } while (result.nextToken); - break; - } - case 'Workflow': { - let result: ListWorkflowsResponse = {}; - do { - result = await ib.send(new ListWorkflowsCommand({ - filters: [{ - name: 'name', - values: [objectName], - }], - nextToken: result.nextToken, - })); - allVersions = allVersions.concat(result.workflowVersionList!.map(i => i.arn?.split('/').pop() || '1.0.0')); - } while (result.nextToken); - break; - } - } - } catch (e) { - if ((e as any).code !== 'ResourceNotFoundException') { - throw e; - } else { - console.log('Resource not found, assuming first version'); - } - } - - const version = increaseVersion(allVersions); - await customResourceRespond(event, 'SUCCESS', 'OK', version, {}); - - break; - case 'Delete': - await customResourceRespond(event, 'SUCCESS', 'OK', event.PhysicalResourceId, {}); - break; - } - } catch (e) { - console.log(e); - await customResourceRespond(event, 'FAILED', (e as Error).message || 'Internal Error', context.logStreamName, {}); - } -} diff --git a/src/image-builders/aws-image-builder/workflow.ts b/src/image-builders/aws-image-builder/workflow.ts index 38856ce3..7fe2b921 100644 --- a/src/image-builders/aws-image-builder/workflow.ts +++ b/src/image-builders/aws-image-builder/workflow.ts @@ -1,6 +1,6 @@ +import * as cdk from 'aws-cdk-lib'; import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib'; import { Construct } from 'constructs'; -import { ImageBuilderObjectBase } from './common'; import { uniqueImageBuilderName } from '../common'; /** @@ -25,23 +25,18 @@ export interface WorkflowProperties { * * @internal */ -export class Workflow extends ImageBuilderObjectBase { +export class Workflow extends cdk.Resource { public readonly arn: string; public readonly name: string; - public readonly version: string; constructor(scope: Construct, id: string, props: WorkflowProperties) { super(scope, id); this.name = uniqueImageBuilderName(this); - this.version = this.generateVersion('Workflow', this.name, { - type: props.type, - data: props.data, - }); const workflow = new imagebuilder.CfnWorkflow(this, 'Workflow', { name: uniqueImageBuilderName(this), - version: this.version, + version: '1.0.0', type: props.type, data: JSON.stringify(props.data), }); diff --git a/test/default.integ.snapshot/github-runners-test.assets.json b/test/default.integ.snapshot/github-runners-test.assets.json index 3cb426e4..242d6e54 100644 --- a/test/default.integ.snapshot/github-runners-test.assets.json +++ b/test/default.integ.snapshot/github-runners-test.assets.json @@ -27,19 +27,6 @@ } } }, - "8fe25f09ced791454f5ebd25cce54fbd76f71ba203f8c4c45b6b209bdabb6a37": { - "source": { - "path": "asset.8fe25f09ced791454f5ebd25cce54fbd76f71ba203f8c4c45b6b209bdabb6a37.lambda", - "packaging": "zip" - }, - "destinations": { - "current_account-current_region": { - "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8fe25f09ced791454f5ebd25cce54fbd76f71ba203f8c4c45b6b209bdabb6a37.zip", - "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - } - }, "b97c8701d090be54cf447e094fd55ece7c99b860476949ee5db7ceca6eeb2f6a": { "source": { "path": "asset.b97c8701d090be54cf447e094fd55ece7c99b860476949ee5db7ceca6eeb2f6a.lambda", @@ -222,7 +209,7 @@ } } }, - "7a8a6107dc18077f979ad3309a1f6c725f527658b37d50e9c42146d0600a372f": { + "c1cc8a76a0c2f6d4666da9179ed5a090d56d771397498e4696cd029da7582913": { "source": { "path": "github-runners-test.template.json", "packaging": "file" @@ -230,7 +217,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7a8a6107dc18077f979ad3309a1f6c725f527658b37d50e9c42146d0600a372f.json", + "objectKey": "c1cc8a76a0c2f6d4666da9179ed5a090d56d771397498e4696cd029da7582913.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/test/default.integ.snapshot/github-runners-test.template.json b/test/default.integ.snapshot/github-runners-test.template.json index bb1b09b9..6ba77e91 100644 --- a/test/default.integ.snapshot/github-runners-test.template.json +++ b/test/default.integ.snapshot/github-runners-test.template.json @@ -2010,41 +2010,6 @@ } } }, - "WindowsImageBuilderComponent0RequiredPackagesVersion54CE1D67": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component0RequiredPackages-1A3E0E7C", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 0 RequiredPackages", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - } - ] - } - ] - }, - "description": "Component 0 RequiredPackages" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent0RequiredPackagesComponent490D1D26": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2052,46 +2017,9 @@ "Description": "Component 0 RequiredPackages", "Name": "github-runners-test-WindowsImageBuilder-Component0RequiredPackages-1A3E0E7C", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent0RequiredPackagesVersion54CE1D67" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent1RunnerUserVersion9DEF18DE": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component1RunnerUser-F040C0BA", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 1 RunnerUser", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - } - ] - } - ] - }, - "description": "Component 1 RunnerUser" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent1RunnerUserComponentCB0163EE": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2099,67 +2027,9 @@ "Description": "Component 1 RunnerUser", "Name": "github-runners-test-WindowsImageBuilder-Component1RunnerUser-F040C0BA", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent1RunnerUserVersion9DEF18DE" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent2GitVersion1AA56A2F": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component2Git-316DB12E", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 2 Git", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/git-for-windows/git/releases/latest > $Env:TEMP\\latest-git", - "$LatestUrl = Get-Content $Env:TEMP\\latest-git", - "$GIT_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "$GIT_VERSION_SHORT = ($GIT_VERSION -Split '.windows.')[0]", - "$GIT_REVISION = ($GIT_VERSION -Split '.windows.')[1]", - "If ($GIT_REVISION -gt 1) {$GIT_VERSION_SHORT = \"$GIT_VERSION_SHORT.$GIT_REVISION\"}", - "Invoke-WebRequest -UseBasicParsing -Uri https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}/Git-${GIT_VERSION_SHORT}-64-bit.exe -OutFile git-setup.exe", - "$p = Start-Process git-setup.exe -PassThru -Wait -ArgumentList '/VERYSILENT'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }", - "del git-setup.exe" - ] - } - } - ] - } - ] - }, - "description": "Component 2 Git" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent2GitComponentD5E90F74": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2167,64 +2037,9 @@ "Description": "Component 2 Git", "Name": "github-runners-test-WindowsImageBuilder-Component2Git-316DB12E", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent2GitVersion1AA56A2F" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent3GithubCliVersionFE27093C": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component3GithubCli-8D855BAC", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 3 GithubCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/cli/cli/releases/latest > $Env:TEMP\\latest-gh", - "$LatestUrl = Get-Content $Env:TEMP\\latest-gh", - "$GH_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_windows_amd64.msi\" -OutFile gh.msi", - "$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i gh.msi /qn'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }", - "del gh.msi" - ] - } - } - ] - } - ] - }, - "description": "Component 3 GithubCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent3GithubCliComponent3D6C7BCE": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2232,59 +2047,9 @@ "Description": "Component 3 GithubCli", "Name": "github-runners-test-WindowsImageBuilder-Component3GithubCli-8D855BAC", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent3GithubCliVersionFE27093C" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent4AwsCliVersion597B7A92": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component4AwsCli-1B2DBBE1", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 4 AwsCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }" - ] - } - } - ] - } - ] - }, - "description": "Component 4 AwsCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent4AwsCliComponentE42A66BF": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2292,76 +2057,9 @@ "Description": "Component 4 AwsCli", "Name": "github-runners-test-WindowsImageBuilder-Component4AwsCli-1B2DBBE1", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent4AwsCliVersion597B7A92" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent5GithubRunnerVersionDA209B9C": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component5GithubRunner-7AC775C5", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 5 GithubRunner", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/actions/runner/releases/latest > $Env:TEMP\\latest-gha", - "$LatestUrl = Get-Content $Env:TEMP\\latest-gha", - "$RUNNER_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "mkdir C:\\hostedtoolcache\\windows", - "mkdir C:\\tools", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/facebook/zstd/releases/latest > $Env:TEMP\\latest-zstd", - "$LatestUrl = Get-Content $Env:TEMP\\latest-zstd", - "$ZSTD_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-v$ZSTD_VERSION-win64.zip\" -OutFile zstd.zip", - "Expand-Archive zstd.zip -DestinationPath C:\\tools", - "Move-Item -Path C:\\tools\\zstd-v$ZSTD_VERSION-win64\\zstd.exe C:\\tools", - "Remove-Item -LiteralPath \"C:\\tools\\zstd-v$ZSTD_VERSION-win64\" -Force -Recurse", - "del zstd.zip", - "$persistedPaths = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)", - "[Environment]::SetEnvironmentVariable(\"PATH\", $persistedPaths + \";C:\\tools\", [EnvironmentVariableTarget]::Machine)", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-win-x64-${RUNNER_VERSION}.zip\" -OutFile actions.zip", - "Expand-Archive actions.zip -DestinationPath C:\\actions", - "del actions.zip", - "echo latest | Out-File -Encoding ASCII -NoNewline C:\\actions\\RUNNER_VERSION" - ] - } - } - ] - } - ] - }, - "description": "Component 5 GithubRunner" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent5GithubRunnerComponent34C12ED4": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2369,67 +2067,9 @@ "Description": "Component 5 GithubRunner", "Name": "github-runners-test-WindowsImageBuilder-Component5GithubRunner-7AC775C5", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent5GithubRunnerVersionDA209B9C" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent6CustomUndefinedVersionB3367BF0": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component6Custom-Undefined-0A739BAE", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 6 Custom-Undefined", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [ - { - "source": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68.yml" - }, - "destination": "FUNDING.yml" - } - ] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "New-Item -ItemType file -Path / -Name custom-file", - "New-Item -ItemType directory -Path / -Name custom-dir", - "Move-Item FUNDING.yml /custom-dir" - ] - } - } - ] - } - ] - }, - "description": "Component 6 Custom-Undefined" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent6CustomUndefinedComponentC1AEB345": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2448,59 +2088,9 @@ "Description": "Component 6 Custom-Undefined", "Name": "github-runners-test-WindowsImageBuilder-Component6Custom-Undefined-0A739BAE", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent6CustomUndefinedVersionB3367BF0" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderComponent7EnvironmentVariablesVersion87D8A6C5": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsImageBuilder-Component7EnvironmentVariables-40E688D7", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 7 EnvironmentVariables", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "Add-Content -Path C:\\actions\\.env -Value 'HELLO=world'", - "Add-Content -Path C:\\actions\\.env -Value 'FOO=bar'" - ] - } - } - ] - } - ] - }, - "description": "Component 7 EnvironmentVariables" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderComponent7EnvironmentVariablesComponentE150D95A": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -2508,100 +2098,9 @@ "Description": "Component 7 EnvironmentVariables", "Name": "github-runners-test-WindowsImageBuilder-Component7EnvironmentVariables-40E688D7", "Platform": "Windows", - "Version": { - "Ref": "WindowsImageBuilderComponent7EnvironmentVariablesVersion87D8A6C5" - } + "Version": "1.0.0" } }, - "WindowsImageBuilderContainerRecipeVersion13A2E3FD": { - "Type": "Custom::ImageBuilder-ContainerRecipe-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "ContainerRecipe", - "ObjectName": "github-runners-test-WindowsImageBuilder-ContainerRecipe-C577A80B", - "VersionedData": { - "platform": "Windows", - "components": [ - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent0RequiredPackagesComponent490D1D26", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent1RunnerUserComponentCB0163EE", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent2GitComponentD5E90F74", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent3GithubCliComponent3D6C7BCE", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent4AwsCliComponentE42A66BF", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent5GithubRunnerComponent34C12ED4", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent6CustomUndefinedComponentC1AEB345", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsImageBuilderComponent7EnvironmentVariablesComponentE150D95A", - "Arn" - ] - } - } - ], - "dockerfileTemplate": "FROM {{{ imagebuilder:parentImage }}}\n{{{ imagebuilder:environments }}}\n{{{ imagebuilder:components }}}\nENV RUNNER_VERSION=latest\n", - "tags": { - "GitHubRunners:Stack": "github-runners-test", - "GitHubRunners:Builder": "github-runners-test/Windows Image Builder" - } - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsImageBuilderContainerRecipeB2A421D7": { "Type": "AWS::ImageBuilder::ContainerRecipe", "Properties": { @@ -2685,9 +2184,7 @@ }, "Service": "ECR" }, - "Version": { - "Ref": "WindowsImageBuilderContainerRecipeVersion13A2E3FD" - } + "Version": "1.0.x" } }, "WindowsImageBuilderDockerLogE660E23E": { @@ -2802,7 +2299,10 @@ }, ":image/github-runners-test-windowsimagebuilder-containerrecipe-c577a80b/", { - "Ref": "WindowsImageBuilderContainerRecipeVersion13A2E3FD" + "Fn::GetAtt": [ + "WindowsImageBuilderContainerRecipeB2A421D7", + "Version" + ] } ] ] @@ -2897,7 +2397,10 @@ { "Name": "github-runners-test-WindowsImageBuilder-ContainerRecipe-C577A80B", "SemanticVersion": { - "Ref": "WindowsImageBuilderContainerRecipeVersion13A2E3FD" + "Fn::GetAtt": [ + "WindowsImageBuilderContainerRecipeB2A421D7", + "Version" + ] } } ] @@ -3134,112 +2637,16 @@ } } }, - "AMILinuxBuilderComponent0RequiredPackagesVersion1DA9F296": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component0RequiredPackages-DD92E049", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 0 RequiredPackages", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get upgrade -y", - "DEBIAN_FRONTEND=noninteractive apt-get install -y curl sudo jq bash zip unzip iptables software-properties-common ca-certificates" - ] - } - } - ] - } - ] - }, - "description": "Component 0 RequiredPackages" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxBuilderComponent0RequiredPackagesComponent6D0029EE": { - "Type": "AWS::ImageBuilder::Component", + "AMILinuxBuilderComponent0RequiredPackagesComponent6D0029EE": { + "Type": "AWS::ImageBuilder::Component", "Properties": { "Data": "{\"name\":\"Component 0 RequiredPackages\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get upgrade -y\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y curl sudo jq bash zip unzip iptables software-properties-common ca-certificates\"]}}]}]}", "Description": "Component 0 RequiredPackages", "Name": "github-runners-test-AMILinuxBuilder-Component0RequiredPackages-DD92E049", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent0RequiredPackagesVersion1DA9F296" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent1CloudWatchAgentVersionF6CE8122": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component1CloudWatchAgent-793897CE", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 1 CloudWatchAgent", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -sfLo /tmp/amazon-cloudwatch-agent.deb https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb", - "dpkg -i -E /tmp/amazon-cloudwatch-agent.deb", - "rm /tmp/amazon-cloudwatch-agent.deb" - ] - } - } - ] - } - ] - }, - "description": "Component 1 CloudWatchAgent" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent1CloudWatchAgentComponentEF606A78": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3247,58 +2654,9 @@ "Description": "Component 1 CloudWatchAgent", "Name": "github-runners-test-AMILinuxBuilder-Component1CloudWatchAgent-793897CE", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent1CloudWatchAgentVersionF6CE8122" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent2RunnerUserVersion7235C1B1": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component2RunnerUser-2C772040", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 2 RunnerUser", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "addgroup runner", - "adduser --system --disabled-password --home /home/runner --ingroup runner runner", - "echo \"%runner ALL=(ALL:ALL) NOPASSWD: ALL\" > /etc/sudoers.d/runner" - ] - } - } - ] - } - ] - }, - "description": "Component 2 RunnerUser" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent2RunnerUserComponentEE2EFAA9": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3306,58 +2664,9 @@ "Description": "Component 2 RunnerUser", "Name": "github-runners-test-AMILinuxBuilder-Component2RunnerUser-2C772040", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent2RunnerUserVersion7235C1B1" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent3GitVersion7B3BEDD6": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component3Git-8C35E49F", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 3 Git", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "add-apt-repository ppa:git-core/ppa", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get install -y git" - ] - } - } - ] - } - ] - }, - "description": "Component 3 Git" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent3GitComponent11319ECE": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3365,59 +2674,9 @@ "Description": "Component 3 Git", "Name": "github-runners-test-AMILinuxBuilder-Component3Git-8C35E49F", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent3GitVersion7B3BEDD6" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent4GithubCliVersionE4F9F8C3": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component4GithubCli-F89A69D6", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 4 GithubCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg", - "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get install -y gh" - ] - } - } - ] - } - ] - }, - "description": "Component 4 GithubCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent4GithubCliComponent21834DCF": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3425,59 +2684,9 @@ "Description": "Component 4 GithubCli", "Name": "github-runners-test-AMILinuxBuilder-Component4GithubCli-F89A69D6", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent4GithubCliVersionE4F9F8C3" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent5AwsCliVersionC6151B91": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component5AwsCli-BE8AC06E", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 5 AwsCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -fsSL \"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip\" -o awscliv2.zip", - "unzip -q awscliv2.zip", - "./aws/install", - "rm -rf awscliv2.zip aws" - ] - } - } - ] - } - ] - }, - "description": "Component 5 AwsCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent5AwsCliComponent3AA64EA2": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3485,61 +2694,9 @@ "Description": "Component 5 AwsCli", "Name": "github-runners-test-AMILinuxBuilder-Component5AwsCli-BE8AC06E", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent5AwsCliVersionC6151B91" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent6DockerVersion8FF46707": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component6Docker-75C7B53C", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 6 Docker", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg", - "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin", - "usermod -aG docker runner", - "ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose" - ] - } - } - ] - } - ] - }, - "description": "Component 6 Docker" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent6DockerComponentD5E4165F": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3547,63 +2704,9 @@ "Description": "Component 6 Docker", "Name": "github-runners-test-AMILinuxBuilder-Component6Docker-75C7B53C", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent6DockerVersion8FF46707" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent7GithubRunnerVersion6BDEFC52": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component7GithubRunner-57FB75A5", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 7 GithubRunner", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "RUNNER_VERSION=`curl -w \"%{redirect_url}\" -fsS https://github.com/actions/runner/releases/latest | grep -oE \"[^/v]+$\"`", - "curl -fsSLO \"https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz\"", - "tar -C /home/runner -xzf \"actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz\"", - "rm actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz", - "echo -n latest > /home/runner/RUNNER_VERSION", - "/home/runner/bin/installdependencies.sh", - "mkdir -p /opt/hostedtoolcache", - "chown runner /opt/hostedtoolcache" - ] - } - } - ] - } - ] - }, - "description": "Component 7 GithubRunner" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent7GithubRunnerComponent898B6A50": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3611,65 +2714,9 @@ "Description": "Component 7 GithubRunner", "Name": "github-runners-test-AMILinuxBuilder-Component7GithubRunner-57FB75A5", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent7GithubRunnerVersion6BDEFC52" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent8CustomUndefinedVersionF6AA0039": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component8Custom-Undefined-2AC0870D", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 8 Custom-Undefined", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [ - { - "source": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68.yml" - }, - "destination": "FUNDING.yml" - } - ] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "touch /custom-file", - "mkdir /custom-dir", - "mv FUNDING.yml /custom-dir" - ] - } - } - ] - } - ] - }, - "description": "Component 8 Custom-Undefined" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent8CustomUndefinedComponentCF5507D3": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3688,57 +2735,9 @@ "Description": "Component 8 Custom-Undefined", "Name": "github-runners-test-AMILinuxBuilder-Component8Custom-Undefined-2AC0870D", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent8CustomUndefinedVersionF6AA0039" - } + "Version": "1.0.0" } }, - "AMILinuxBuilderComponent9EnvironmentVariablesVersion008D0039": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxBuilder-Component9EnvironmentVariables-7237997F", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 9 EnvironmentVariables", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "echo 'HELLO=world' >> /home/runner/.env", - "echo 'FOO=bar' >> /home/runner/.env" - ] - } - } - ] - } - ] - }, - "description": "Component 9 EnvironmentVariables" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxBuilderComponent9EnvironmentVariablesComponent59394D7E": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -3746,9 +2745,7 @@ "Description": "Component 9 EnvironmentVariables", "Name": "github-runners-test-AMILinuxBuilder-Component9EnvironmentVariables-7237997F", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxBuilderComponent9EnvironmentVariablesVersion008D0039" - } + "Version": "1.0.0" } }, "AMILinuxBuilderAmiRecipeAMIRootDevice7FF39374": { @@ -3780,144 +2777,13 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "AMILinuxBuilderAmiRecipeVersionFBE9C9AE": { - "Type": "Custom::ImageBuilder-ImageRecipe-Version", + "AMILinuxBuilderAmiRecipe7C7ED6C7": { + "Type": "AWS::ImageBuilder::ImageRecipe", "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "ImageRecipe", - "ObjectName": "github-runners-test-AMILinuxBuilder-AmiRecipe-2B5C5A8B", - "VersionedData": { - "platform": "Linux", - "components": [ - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent0RequiredPackagesComponent6D0029EE", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent1CloudWatchAgentComponentEF606A78", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent2RunnerUserComponentEE2EFAA9", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent3GitComponent11319ECE", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent4GithubCliComponent21834DCF", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent5AwsCliComponent3AA64EA2", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent6DockerComponentD5E4165F", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent7GithubRunnerComponent898B6A50", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent8CustomUndefinedComponentCF5507D3", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxBuilderComponent9EnvironmentVariablesComponent59394D7E", - "Arn" - ] - } - } - ], - "parentAmi": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":imagebuilder:", - { - "Ref": "AWS::Region" - }, - ":aws:image/ubuntu-server-22-lts-x86/x.x.x" - ] - ] - }, - "tags": { - "GitHubRunners:Stack": "github-runners-test", - "GitHubRunners:Builder": "github-runners-test/AMI Linux Builder" - }, - "blockDeviceMappings": [ - { - "deviceName": { - "Ref": "AMILinuxBuilderAmiRecipeAMIRootDevice7FF39374" - }, - "ebs": { - "volumeSize": 33, - "deleteOnTermination": true - } - } - ] - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxBuilderAmiRecipe7C7ED6C7": { - "Type": "AWS::ImageBuilder::ImageRecipe", - "Properties": { - "BlockDeviceMappings": [ - { - "DeviceName": { - "Ref": "AMILinuxBuilderAmiRecipeAMIRootDevice7FF39374" + "BlockDeviceMappings": [ + { + "DeviceName": { + "Ref": "AMILinuxBuilderAmiRecipeAMIRootDevice7FF39374" }, "Ebs": { "DeleteOnTermination": true, @@ -4028,9 +2894,7 @@ "GitHubRunners:Builder": "github-runners-test/AMI Linux Builder", "GitHubRunners:Stack": "github-runners-test" }, - "Version": { - "Ref": "AMILinuxBuilderAmiRecipeVersionFBE9C9AE" - }, + "Version": "1.0.x", "WorkingDirectory": "/home/runner" } }, @@ -4185,7 +3049,10 @@ }, ":image/github-runners-test-amilinuxbuilder-amirecipe-2b5c5a8b/", { - "Ref": "AMILinuxBuilderAmiRecipeVersionFBE9C9AE" + "Fn::GetAtt": [ + "AMILinuxBuilderAmiRecipe7C7ED6C7", + "Version" + ] } ] ] @@ -4290,7 +3157,10 @@ { "Name": "github-runners-test-AMILinuxBuilder-AmiRecipe-2B5C5A8B", "SemanticVersion": { - "Ref": "AMILinuxBuilderAmiRecipeVersionFBE9C9AE" + "Fn::GetAtt": [ + "AMILinuxBuilderAmiRecipe7C7ED6C7", + "Version" + ] } } ] @@ -6651,53 +5521,6 @@ } } }, - "AMILinuxarm64BuilderComponent0RequiredPackagesVersion7CCB5268": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component0RequiredPackages-2E0C774A", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 0 RequiredPackages", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get upgrade -y", - "DEBIAN_FRONTEND=noninteractive apt-get install -y curl sudo jq bash zip unzip iptables software-properties-common ca-certificates" - ] - } - } - ] - } - ] - }, - "description": "Component 0 RequiredPackages" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxarm64BuilderComponent0RequiredPackagesComponent2ABFFC8F": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -6705,58 +5528,9 @@ "Description": "Component 0 RequiredPackages", "Name": "github-runners-test-AMILinuxarm64Builder-Component0RequiredPackages-2E0C774A", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent0RequiredPackagesVersion7CCB5268" - } + "Version": "1.0.0" } }, - "AMILinuxarm64BuilderComponent1CloudWatchAgentVersion6EE6E557": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component1CloudWatchAgent-0EF6E92C", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 1 CloudWatchAgent", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -sfLo /tmp/amazon-cloudwatch-agent.deb https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb", - "dpkg -i -E /tmp/amazon-cloudwatch-agent.deb", - "rm /tmp/amazon-cloudwatch-agent.deb" - ] - } - } - ] - } - ] - }, - "description": "Component 1 CloudWatchAgent" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxarm64BuilderComponent1CloudWatchAgentComponentE8D7E944": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -6764,629 +5538,99 @@ "Description": "Component 1 CloudWatchAgent", "Name": "github-runners-test-AMILinuxarm64Builder-Component1CloudWatchAgent-0EF6E92C", "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent1CloudWatchAgentVersion6EE6E557" - } + "Version": "1.0.0" } }, - "AMILinuxarm64BuilderComponent2RunnerUserVersionC25EBA09": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component2RunnerUser-0681B87A", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 2 RunnerUser", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "addgroup runner", - "adduser --system --disabled-password --home /home/runner --ingroup runner runner", - "echo \"%runner ALL=(ALL:ALL) NOPASSWD: ALL\" > /etc/sudoers.d/runner" - ] - } - } - ] - } - ] - }, - "description": "Component 2 RunnerUser" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "AMILinuxarm64BuilderComponent2RunnerUserComponent81DDD70D": { "Type": "AWS::ImageBuilder::Component", "Properties": { - "Data": "{\"name\":\"Component 2 RunnerUser\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"addgroup runner\",\"adduser --system --disabled-password --home /home/runner --ingroup runner runner\",\"echo \\\"%runner ALL=(ALL:ALL) NOPASSWD: ALL\\\" > /etc/sudoers.d/runner\"]}}]}]}", - "Description": "Component 2 RunnerUser", - "Name": "github-runners-test-AMILinuxarm64Builder-Component2RunnerUser-0681B87A", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent2RunnerUserVersionC25EBA09" - } - } - }, - "AMILinuxarm64BuilderComponent3GitVersion792CCDDA": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component3Git-60F51A23", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 3 Git", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "add-apt-repository ppa:git-core/ppa", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get install -y git" - ] - } - } - ] - } - ] - }, - "description": "Component 3 Git" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent3GitComponent341EEEFC": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 3 Git\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"add-apt-repository ppa:git-core/ppa\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y git\"]}}]}]}", - "Description": "Component 3 Git", - "Name": "github-runners-test-AMILinuxarm64Builder-Component3Git-60F51A23", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent3GitVersion792CCDDA" - } - } - }, - "AMILinuxarm64BuilderComponent4GithubCliVersion72C57128": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component4GithubCli-3AC99B64", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 4 GithubCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg", - "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get install -y gh" - ] - } - } - ] - } - ] - }, - "description": "Component 4 GithubCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent4GithubCliComponentBB29E40E": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 4 GithubCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg\",\"echo \\\"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\\\" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y gh\"]}}]}]}", - "Description": "Component 4 GithubCli", - "Name": "github-runners-test-AMILinuxarm64Builder-Component4GithubCli-3AC99B64", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent4GithubCliVersion72C57128" - } - } - }, - "AMILinuxarm64BuilderComponent5AwsCliVersion69CAE829": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component5AwsCli-30A943D2", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 5 AwsCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -fsSL \"https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip\" -o awscliv2.zip", - "unzip -q awscliv2.zip", - "./aws/install", - "rm -rf awscliv2.zip aws" - ] - } - } - ] - } - ] - }, - "description": "Component 5 AwsCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent5AwsCliComponentDFF10DCB": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 5 AwsCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"curl -fsSL \\\"https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip\\\" -o awscliv2.zip\",\"unzip -q awscliv2.zip\",\"./aws/install\",\"rm -rf awscliv2.zip aws\"]}}]}]}", - "Description": "Component 5 AwsCli", - "Name": "github-runners-test-AMILinuxarm64Builder-Component5AwsCli-30A943D2", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent5AwsCliVersion69CAE829" - } - } - }, - "AMILinuxarm64BuilderComponent6DockerVersion2E656587": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component6Docker-F2A09CCF", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 6 Docker", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg", - "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null", - "apt-get update", - "DEBIAN_FRONTEND=noninteractive apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin", - "usermod -aG docker runner", - "ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose" - ] - } - } - ] - } - ] - }, - "description": "Component 6 Docker" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent6DockerComponent1A04C1F4": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 6 Docker\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg\",\"echo \\\"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\\\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\",\"usermod -aG docker runner\",\"ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose\"]}}]}]}", - "Description": "Component 6 Docker", - "Name": "github-runners-test-AMILinuxarm64Builder-Component6Docker-F2A09CCF", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent6DockerVersion2E656587" - } - } - }, - "AMILinuxarm64BuilderComponent7GithubRunnerVersion8A7FD98B": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component7GithubRunner-F14E4EA6", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 7 GithubRunner", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "RUNNER_VERSION=`curl -w \"%{redirect_url}\" -fsS https://github.com/actions/runner/releases/latest | grep -oE \"[^/v]+$\"`", - "curl -fsSLO \"https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\"", - "tar -C /home/runner -xzf \"actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\"", - "rm actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz", - "echo -n latest > /home/runner/RUNNER_VERSION", - "/home/runner/bin/installdependencies.sh", - "mkdir -p /opt/hostedtoolcache", - "chown runner /opt/hostedtoolcache" - ] - } - } - ] - } - ] - }, - "description": "Component 7 GithubRunner" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent7GithubRunnerComponentE1EF4281": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 7 GithubRunner\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"RUNNER_VERSION=`curl -w \\\"%{redirect_url}\\\" -fsS https://github.com/actions/runner/releases/latest | grep -oE \\\"[^/v]+$\\\"`\",\"curl -fsSLO \\\"https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\\\"\",\"tar -C /home/runner -xzf \\\"actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\\\"\",\"rm actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\",\"echo -n latest > /home/runner/RUNNER_VERSION\",\"/home/runner/bin/installdependencies.sh\",\"mkdir -p /opt/hostedtoolcache\",\"chown runner /opt/hostedtoolcache\"]}}]}]}", - "Description": "Component 7 GithubRunner", - "Name": "github-runners-test-AMILinuxarm64Builder-Component7GithubRunner-F14E4EA6", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent7GithubRunnerVersion8A7FD98B" - } - } - }, - "AMILinuxarm64BuilderComponent8CustomUndefinedVersion1F3CA7BE": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component8Custom-Undefined-6E825627", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 8 Custom-Undefined", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [ - { - "source": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68.yml" - }, - "destination": "FUNDING.yml" - } - ] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "touch /custom-file", - "mkdir /custom-dir", - "mv FUNDING.yml /custom-dir" - ] - } - } - ] - } - ] - }, - "description": "Component 8 Custom-Undefined" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent8CustomUndefinedComponent8BF2DD41": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": { - "Fn::Join": [ - "", - [ - "{\"name\":\"Component 8 Custom-Undefined\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[{\"source\":\"", - { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68.yml" - }, - "\",\"destination\":\"FUNDING.yml\"}]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"touch /custom-file\",\"mkdir /custom-dir\",\"mv FUNDING.yml /custom-dir\"]}}]}]}" - ] - ] - }, - "Description": "Component 8 Custom-Undefined", - "Name": "github-runners-test-AMILinuxarm64Builder-Component8Custom-Undefined-6E825627", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent8CustomUndefinedVersion1F3CA7BE" - } - } - }, - "AMILinuxarm64BuilderComponent9EnvironmentVariablesVersion30CC0910": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-Component9EnvironmentVariables-70B09CB2", - "VersionedData": { - "platform": "Linux", - "data": { - "name": "Component 9 EnvironmentVariables", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecuteBash", - "inputs": { - "commands": [ - "set -ex", - "echo 'HELLO=world' >> /home/runner/.env", - "echo 'FOO=bar' >> /home/runner/.env" - ] - } - } - ] - } - ] - }, - "description": "Component 9 EnvironmentVariables" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "AMILinuxarm64BuilderComponent9EnvironmentVariablesComponent99728C6D": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 9 EnvironmentVariables\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"echo 'HELLO=world' >> /home/runner/.env\",\"echo 'FOO=bar' >> /home/runner/.env\"]}}]}]}", - "Description": "Component 9 EnvironmentVariables", - "Name": "github-runners-test-AMILinuxarm64Builder-Component9EnvironmentVariables-70B09CB2", - "Platform": "Linux", - "Version": { - "Ref": "AMILinuxarm64BuilderComponent9EnvironmentVariablesVersion30CC0910" - } - } - }, - "AMILinuxarm64BuilderAmiRecipeVersion429E7646": { - "Type": "Custom::ImageBuilder-ImageRecipe-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "ImageRecipe", - "ObjectName": "github-runners-test-AMILinuxarm64Builder-AmiRecipe-9167B5EF", - "VersionedData": { - "platform": "Linux", - "components": [ - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent0RequiredPackagesComponent2ABFFC8F", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent1CloudWatchAgentComponentE8D7E944", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent2RunnerUserComponent81DDD70D", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent3GitComponent341EEEFC", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent4GithubCliComponentBB29E40E", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent5AwsCliComponentDFF10DCB", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent6DockerComponent1A04C1F4", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent7GithubRunnerComponentE1EF4281", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent8CustomUndefinedComponent8BF2DD41", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "AMILinuxarm64BuilderComponent9EnvironmentVariablesComponent99728C6D", - "Arn" - ] - } - } - ], - "parentAmi": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":imagebuilder:", - { - "Ref": "AWS::Region" - }, - ":aws:image/ubuntu-server-22-lts-arm64/x.x.x" - ] + "Data": "{\"name\":\"Component 2 RunnerUser\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"addgroup runner\",\"adduser --system --disabled-password --home /home/runner --ingroup runner runner\",\"echo \\\"%runner ALL=(ALL:ALL) NOPASSWD: ALL\\\" > /etc/sudoers.d/runner\"]}}]}]}", + "Description": "Component 2 RunnerUser", + "Name": "github-runners-test-AMILinuxarm64Builder-Component2RunnerUser-0681B87A", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent3GitComponent341EEEFC": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 3 Git\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"add-apt-repository ppa:git-core/ppa\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y git\"]}}]}]}", + "Description": "Component 3 Git", + "Name": "github-runners-test-AMILinuxarm64Builder-Component3Git-60F51A23", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent4GithubCliComponentBB29E40E": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 4 GithubCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg\",\"echo \\\"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\\\" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y gh\"]}}]}]}", + "Description": "Component 4 GithubCli", + "Name": "github-runners-test-AMILinuxarm64Builder-Component4GithubCli-3AC99B64", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent5AwsCliComponentDFF10DCB": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 5 AwsCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"curl -fsSL \\\"https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip\\\" -o awscliv2.zip\",\"unzip -q awscliv2.zip\",\"./aws/install\",\"rm -rf awscliv2.zip aws\"]}}]}]}", + "Description": "Component 5 AwsCli", + "Name": "github-runners-test-AMILinuxarm64Builder-Component5AwsCli-30A943D2", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent6DockerComponent1A04C1F4": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 6 Docker\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg\",\"echo \\\"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\\\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\",\"apt-get update\",\"DEBIAN_FRONTEND=noninteractive apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\",\"usermod -aG docker runner\",\"ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose\"]}}]}]}", + "Description": "Component 6 Docker", + "Name": "github-runners-test-AMILinuxarm64Builder-Component6Docker-F2A09CCF", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent7GithubRunnerComponentE1EF4281": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 7 GithubRunner\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"RUNNER_VERSION=`curl -w \\\"%{redirect_url}\\\" -fsS https://github.com/actions/runner/releases/latest | grep -oE \\\"[^/v]+$\\\"`\",\"curl -fsSLO \\\"https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\\\"\",\"tar -C /home/runner -xzf \\\"actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\\\"\",\"rm actions-runner-linux-arm64-${RUNNER_VERSION}.tar.gz\",\"echo -n latest > /home/runner/RUNNER_VERSION\",\"/home/runner/bin/installdependencies.sh\",\"mkdir -p /opt/hostedtoolcache\",\"chown runner /opt/hostedtoolcache\"]}}]}]}", + "Description": "Component 7 GithubRunner", + "Name": "github-runners-test-AMILinuxarm64Builder-Component7GithubRunner-F14E4EA6", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent8CustomUndefinedComponent8BF2DD41": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": { + "Fn::Join": [ + "", + [ + "{\"name\":\"Component 8 Custom-Undefined\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[{\"source\":\"", + { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68.yml" + }, + "\",\"destination\":\"FUNDING.yml\"}]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"touch /custom-file\",\"mkdir /custom-dir\",\"mv FUNDING.yml /custom-dir\"]}}]}]}" ] - }, - "tags": { - "GitHubRunners:Stack": "github-runners-test", - "GitHubRunners:Builder": "github-runners-test/AMI Linux arm64 Builder" - } - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + ] + }, + "Description": "Component 8 Custom-Undefined", + "Name": "github-runners-test-AMILinuxarm64Builder-Component8Custom-Undefined-6E825627", + "Platform": "Linux", + "Version": "1.0.0" + } + }, + "AMILinuxarm64BuilderComponent9EnvironmentVariablesComponent99728C6D": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 9 EnvironmentVariables\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecuteBash\",\"inputs\":{\"commands\":[\"set -ex\",\"echo 'HELLO=world' >> /home/runner/.env\",\"echo 'FOO=bar' >> /home/runner/.env\"]}}]}]}", + "Description": "Component 9 EnvironmentVariables", + "Name": "github-runners-test-AMILinuxarm64Builder-Component9EnvironmentVariables-70B09CB2", + "Platform": "Linux", + "Version": "1.0.0" + } }, "AMILinuxarm64BuilderAmiRecipe6A6ED38F": { "Type": "AWS::ImageBuilder::ImageRecipe", @@ -7494,9 +5738,7 @@ "GitHubRunners:Builder": "github-runners-test/AMI Linux arm64 Builder", "GitHubRunners:Stack": "github-runners-test" }, - "Version": { - "Ref": "AMILinuxarm64BuilderAmiRecipeVersion429E7646" - }, + "Version": "1.0.x", "WorkingDirectory": "/home/runner" } }, @@ -7651,7 +5893,10 @@ }, ":image/github-runners-test-amilinuxarm64builder-amirecipe-9167b5ef/", { - "Ref": "AMILinuxarm64BuilderAmiRecipeVersion429E7646" + "Fn::GetAtt": [ + "AMILinuxarm64BuilderAmiRecipe6A6ED38F", + "Version" + ] } ] ] @@ -7756,7 +6001,10 @@ { "Name": "github-runners-test-AMILinuxarm64Builder-AmiRecipe-9167B5EF", "SemanticVersion": { - "Ref": "AMILinuxarm64BuilderAmiRecipeVersion429E7646" + "Fn::GetAtt": [ + "AMILinuxarm64BuilderAmiRecipe6A6ED38F", + "Version" + ] } } ] @@ -7954,41 +6202,6 @@ } } }, - "WindowsEC2BuilderComponent0RequiredPackagesVersion08C0B23D": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component0RequiredPackages-29E311EC", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 0 RequiredPackages", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - } - ] - } - ] - }, - "description": "Component 0 RequiredPackages" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent0RequiredPackagesComponent42A20182": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -7996,59 +6209,9 @@ "Description": "Component 0 RequiredPackages", "Name": "github-runners-test-WindowsEC2Builder-Component0RequiredPackages-29E311EC", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent0RequiredPackagesVersion08C0B23D" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent1CloudWatchAgentVersion1BBAB463": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component1CloudWatchAgent-1AA08FD8", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 1 CloudWatchAgent", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi /qn'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }" - ] - } - } - ] - } - ] - }, - "description": "Component 1 CloudWatchAgent" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent1CloudWatchAgentComponent0259F61E": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -8056,46 +6219,9 @@ "Description": "Component 1 CloudWatchAgent", "Name": "github-runners-test-WindowsEC2Builder-Component1CloudWatchAgent-1AA08FD8", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent1CloudWatchAgentVersion1BBAB463" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent2RunnerUserVersionAC4C576C": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component2RunnerUser-9F617778", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 2 RunnerUser", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - } - ] - } - ] - }, - "description": "Component 2 RunnerUser" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent2RunnerUserComponentB482ECD9": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -8103,67 +6229,9 @@ "Description": "Component 2 RunnerUser", "Name": "github-runners-test-WindowsEC2Builder-Component2RunnerUser-9F617778", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent2RunnerUserVersionAC4C576C" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent3GitVersion13A51650": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component3Git-73F699B0", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 3 Git", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/git-for-windows/git/releases/latest > $Env:TEMP\\latest-git", - "$LatestUrl = Get-Content $Env:TEMP\\latest-git", - "$GIT_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "$GIT_VERSION_SHORT = ($GIT_VERSION -Split '.windows.')[0]", - "$GIT_REVISION = ($GIT_VERSION -Split '.windows.')[1]", - "If ($GIT_REVISION -gt 1) {$GIT_VERSION_SHORT = \"$GIT_VERSION_SHORT.$GIT_REVISION\"}", - "Invoke-WebRequest -UseBasicParsing -Uri https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}/Git-${GIT_VERSION_SHORT}-64-bit.exe -OutFile git-setup.exe", - "$p = Start-Process git-setup.exe -PassThru -Wait -ArgumentList '/VERYSILENT'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }", - "del git-setup.exe" - ] - } - } - ] - } - ] - }, - "description": "Component 3 Git" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent3GitComponent71764393": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -8171,206 +6239,28 @@ "Description": "Component 3 Git", "Name": "github-runners-test-WindowsEC2Builder-Component3Git-73F699B0", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent3GitVersion13A51650" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent4GithubCliVersionE106A3DA": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component4GithubCli-57AD0DA2", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 4 GithubCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/cli/cli/releases/latest > $Env:TEMP\\latest-gh", - "$LatestUrl = Get-Content $Env:TEMP\\latest-gh", - "$GH_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_windows_amd64.msi\" -OutFile gh.msi", - "$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i gh.msi /qn'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }", - "del gh.msi" - ] - } - } - ] - } - ] - }, - "description": "Component 4 GithubCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent4GithubCliComponent4C5B4A15": { "Type": "AWS::ImageBuilder::Component", "Properties": { "Data": "{\"name\":\"Component 4 GithubCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecutePowerShell\",\"inputs\":{\"commands\":[\"$ErrorActionPreference = 'Stop'\",\"$ProgressPreference = 'SilentlyContinue'\",\"Set-PSDebug -Trace 1\",\"cmd /c curl -w \\\"%{redirect_url}\\\" -fsS https://github.com/cli/cli/releases/latest > $Env:TEMP\\\\latest-gh\",\"$LatestUrl = Get-Content $Env:TEMP\\\\latest-gh\",\"$GH_VERSION = ($LatestUrl -Split '/')[-1].substring(1)\",\"Invoke-WebRequest -UseBasicParsing -Uri \\\"https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_windows_amd64.msi\\\" -OutFile gh.msi\",\"$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i gh.msi /qn'\",\"if ($p.ExitCode -ne 0) { throw \\\"Exit code is $p.ExitCode\\\" }\",\"del gh.msi\"]}}]}]}", - "Description": "Component 4 GithubCli", - "Name": "github-runners-test-WindowsEC2Builder-Component4GithubCli-57AD0DA2", - "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent4GithubCliVersionE106A3DA" - } - } - }, - "WindowsEC2BuilderComponent5AwsCliVersionF88E14E7": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component5AwsCli-9A139D36", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 5 AwsCli", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn'", - "if ($p.ExitCode -ne 0) { throw \"Exit code is $p.ExitCode\" }" - ] - } - } - ] - } - ] - }, - "description": "Component 5 AwsCli" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "WindowsEC2BuilderComponent5AwsCliComponentA5AD7E67": { - "Type": "AWS::ImageBuilder::Component", - "Properties": { - "Data": "{\"name\":\"Component 5 AwsCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecutePowerShell\",\"inputs\":{\"commands\":[\"$ErrorActionPreference = 'Stop'\",\"$ProgressPreference = 'SilentlyContinue'\",\"Set-PSDebug -Trace 1\",\"$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn'\",\"if ($p.ExitCode -ne 0) { throw \\\"Exit code is $p.ExitCode\\\" }\"]}}]}]}", - "Description": "Component 5 AwsCli", - "Name": "github-runners-test-WindowsEC2Builder-Component5AwsCli-9A139D36", - "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent5AwsCliVersionF88E14E7" - } - } - }, - "WindowsEC2BuilderComponent6DockerVersionF82FADF5": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component6Docker-A5CAA74F", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 6 Docker", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "$BaseUrl = \"https://download.docker.com/win/static/stable/x86_64/\"", - "$html = Invoke-WebRequest -UseBasicParsing -Uri $BaseUrl", - "$files = $html.Links.href | Where-Object { $_ -match '^docker-[0-9\\.]+\\.zip$' }", - "if (-not $files) { Write-Error \"No docker-*.zip files found.\" ; exit 1 }", - "$latest = $files | Sort-Object { try { [Version]($_ -replace '^docker-|\\.zip$') } catch { [Version]\"0.0.0\" } } -Descending | Select-Object -First 1", - "Invoke-WebRequest -UseBasicParsing -Uri $BaseUrl$latest -OutFile docker.zip", - "Expand-Archive docker.zip -DestinationPath \"$Env:ProgramFiles\"", - "del docker.zip", - "$persistedPaths = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)", - "[Environment]::SetEnvironmentVariable(\"PATH\", $persistedPaths + \";$Env:ProgramFiles\\Docker\", [EnvironmentVariableTarget]::Machine)", - "$env:PATH = $env:PATH + \";$Env:ProgramFiles\\Docker\"", - "dockerd --register-service", - "if ($LASTEXITCODE -ne 0) { throw \"Exit code is $LASTEXITCODE\" }", - "Enable-WindowsOptionalFeature -Online -FeatureName containers -All -NoRestart", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/docker/compose/releases/latest > $Env:TEMP\\latest-docker-compose", - "$LatestUrl = Get-Content $Env:TEMP\\latest-docker-compose", - "$LatestDockerCompose = ($LatestUrl -Split '/')[-1]", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/docker/compose/releases/download/${LatestDockerCompose}/docker-compose-Windows-x86_64.exe\" -OutFile $Env:ProgramFiles\\Docker\\docker-compose.exe", - "New-Item -ItemType directory -Path \"$Env:ProgramFiles\\Docker\\cli-plugins\"", - "Copy-Item -Path \"$Env:ProgramFiles\\Docker\\docker-compose.exe\" -Destination \"$Env:ProgramFiles\\Docker\\cli-plugins\\docker-compose.exe\"" - ] - } - }, - { - "name": "Reboot", - "action": "Reboot", - "inputs": {} - } - ] - } - ] - }, - "description": "Component 6 Docker" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + "Description": "Component 4 GithubCli", + "Name": "github-runners-test-WindowsEC2Builder-Component4GithubCli-57AD0DA2", + "Platform": "Windows", + "Version": "1.0.0" + } + }, + "WindowsEC2BuilderComponent5AwsCliComponentA5AD7E67": { + "Type": "AWS::ImageBuilder::Component", + "Properties": { + "Data": "{\"name\":\"Component 5 AwsCli\",\"schemaVersion\":\"1.0\",\"phases\":[{\"name\":\"build\",\"steps\":[{\"name\":\"Download\",\"action\":\"S3Download\",\"inputs\":[]},{\"name\":\"Run\",\"action\":\"ExecutePowerShell\",\"inputs\":{\"commands\":[\"$ErrorActionPreference = 'Stop'\",\"$ProgressPreference = 'SilentlyContinue'\",\"Set-PSDebug -Trace 1\",\"$p = Start-Process msiexec.exe -PassThru -Wait -ArgumentList '/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn'\",\"if ($p.ExitCode -ne 0) { throw \\\"Exit code is $p.ExitCode\\\" }\"]}}]}]}", + "Description": "Component 5 AwsCli", + "Name": "github-runners-test-WindowsEC2Builder-Component5AwsCli-9A139D36", + "Platform": "Windows", + "Version": "1.0.0" + } }, "WindowsEC2BuilderComponent6DockerComponent0A5C21D2": { "Type": "AWS::ImageBuilder::Component", @@ -8379,76 +6269,9 @@ "Description": "Component 6 Docker", "Name": "github-runners-test-WindowsEC2Builder-Component6Docker-A5CAA74F", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent6DockerVersionF82FADF5" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent7GithubRunnerVersionC0E6DE45": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component7GithubRunner-B919BFBF", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 7 GithubRunner", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/actions/runner/releases/latest > $Env:TEMP\\latest-gha", - "$LatestUrl = Get-Content $Env:TEMP\\latest-gha", - "$RUNNER_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "mkdir C:\\hostedtoolcache\\windows", - "mkdir C:\\tools", - "cmd /c curl -w \"%{redirect_url}\" -fsS https://github.com/facebook/zstd/releases/latest > $Env:TEMP\\latest-zstd", - "$LatestUrl = Get-Content $Env:TEMP\\latest-zstd", - "$ZSTD_VERSION = ($LatestUrl -Split '/')[-1].substring(1)", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-v$ZSTD_VERSION-win64.zip\" -OutFile zstd.zip", - "Expand-Archive zstd.zip -DestinationPath C:\\tools", - "Move-Item -Path C:\\tools\\zstd-v$ZSTD_VERSION-win64\\zstd.exe C:\\tools", - "Remove-Item -LiteralPath \"C:\\tools\\zstd-v$ZSTD_VERSION-win64\" -Force -Recurse", - "del zstd.zip", - "$persistedPaths = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)", - "[Environment]::SetEnvironmentVariable(\"PATH\", $persistedPaths + \";C:\\tools\", [EnvironmentVariableTarget]::Machine)", - "Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-win-x64-${RUNNER_VERSION}.zip\" -OutFile actions.zip", - "Expand-Archive actions.zip -DestinationPath C:\\actions", - "del actions.zip", - "echo latest | Out-File -Encoding ASCII -NoNewline C:\\actions\\RUNNER_VERSION" - ] - } - } - ] - } - ] - }, - "description": "Component 7 GithubRunner" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent7GithubRunnerComponentB05EF94B": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -8456,67 +6279,9 @@ "Description": "Component 7 GithubRunner", "Name": "github-runners-test-WindowsEC2Builder-Component7GithubRunner-B919BFBF", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent7GithubRunnerVersionC0E6DE45" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent8CustomUndefinedVersion451771BF": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component8Custom-Undefined-82FF61E0", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 8 Custom-Undefined", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [ - { - "source": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68.yml" - }, - "destination": "FUNDING.yml" - } - ] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "New-Item -ItemType file -Path / -Name custom-file", - "New-Item -ItemType directory -Path / -Name custom-dir", - "Move-Item FUNDING.yml /custom-dir" - ] - } - } - ] - } - ] - }, - "description": "Component 8 Custom-Undefined" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent8CustomUndefinedComponent1B25F637": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -8535,59 +6300,9 @@ "Description": "Component 8 Custom-Undefined", "Name": "github-runners-test-WindowsEC2Builder-Component8Custom-Undefined-82FF61E0", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent8CustomUndefinedVersion451771BF" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderComponent9EnvironmentVariablesVersionCE6A1762": { - "Type": "Custom::ImageBuilder-Component-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "Component", - "ObjectName": "github-runners-test-WindowsEC2Builder-Component9EnvironmentVariables-06A82763", - "VersionedData": { - "platform": "Windows", - "data": { - "name": "Component 9 EnvironmentVariables", - "schemaVersion": "1.0", - "phases": [ - { - "name": "build", - "steps": [ - { - "name": "Download", - "action": "S3Download", - "inputs": [] - }, - { - "name": "Run", - "action": "ExecutePowerShell", - "inputs": { - "commands": [ - "$ErrorActionPreference = 'Stop'", - "$ProgressPreference = 'SilentlyContinue'", - "Set-PSDebug -Trace 1", - "Add-Content -Path C:\\actions\\.env -Value 'HELLO=world'", - "Add-Content -Path C:\\actions\\.env -Value 'FOO=bar'" - ] - } - } - ] - } - ] - }, - "description": "Component 9 EnvironmentVariables" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderComponent9EnvironmentVariablesComponentF10003FD": { "Type": "AWS::ImageBuilder::Component", "Properties": { @@ -8595,131 +6310,9 @@ "Description": "Component 9 EnvironmentVariables", "Name": "github-runners-test-WindowsEC2Builder-Component9EnvironmentVariables-06A82763", "Platform": "Windows", - "Version": { - "Ref": "WindowsEC2BuilderComponent9EnvironmentVariablesVersionCE6A1762" - } + "Version": "1.0.0" } }, - "WindowsEC2BuilderAmiRecipeVersionEE5C2F0C": { - "Type": "Custom::ImageBuilder-ImageRecipe-Version", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E", - "Arn" - ] - }, - "ObjectType": "ImageRecipe", - "ObjectName": "github-runners-test-WindowsEC2Builder-AmiRecipe-BEDA5750", - "VersionedData": { - "platform": "Windows", - "components": [ - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent0RequiredPackagesComponent42A20182", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent1CloudWatchAgentComponent0259F61E", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent2RunnerUserComponentB482ECD9", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent3GitComponent71764393", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent4GithubCliComponent4C5B4A15", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent5AwsCliComponentA5AD7E67", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent6DockerComponent0A5C21D2", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent7GithubRunnerComponentB05EF94B", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent8CustomUndefinedComponent1B25F637", - "Arn" - ] - } - }, - { - "componentArn": { - "Fn::GetAtt": [ - "WindowsEC2BuilderComponent9EnvironmentVariablesComponentF10003FD", - "Arn" - ] - } - } - ], - "parentAmi": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":imagebuilder:", - { - "Ref": "AWS::Region" - }, - ":aws:image/windows-server-2022-english-full-base-x86/x.x.x" - ] - ] - }, - "tags": { - "GitHubRunners:Stack": "github-runners-test", - "GitHubRunners:Builder": "github-runners-test/Windows EC2 Builder" - } - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, "WindowsEC2BuilderAmiRecipe41A137FF": { "Type": "AWS::ImageBuilder::ImageRecipe", "Properties": { @@ -8826,9 +6419,7 @@ "GitHubRunners:Builder": "github-runners-test/Windows EC2 Builder", "GitHubRunners:Stack": "github-runners-test" }, - "Version": { - "Ref": "WindowsEC2BuilderAmiRecipeVersionEE5C2F0C" - }, + "Version": "1.0.x", "WorkingDirectory": "C:/" } }, @@ -8983,7 +6574,10 @@ }, ":image/github-runners-test-windowsec2builder-amirecipe-beda5750/", { - "Ref": "WindowsEC2BuilderAmiRecipeVersionEE5C2F0C" + "Fn::GetAtt": [ + "WindowsEC2BuilderAmiRecipe41A137FF", + "Version" + ] } ] ] @@ -9088,7 +6682,10 @@ { "Name": "github-runners-test-WindowsEC2Builder-AmiRecipe-BEDA5750", "SemanticVersion": { - "Ref": "WindowsEC2BuilderAmiRecipeVersionEE5C2F0C" + "Fn::GetAtt": [ + "WindowsEC2BuilderAmiRecipe41A137FF", + "Version" + ] } } ] @@ -10376,99 +7973,6 @@ "TimeoutInMinutes": 60 } }, - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleE25C1A58": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleDefaultPolicy93D80BBD": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "imagebuilder:ListComponents", - "imagebuilder:ListContainerRecipes", - "imagebuilder:ListImageRecipes", - "imagebuilder:ListWorkflows" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleDefaultPolicy93D80BBD", - "Roles": [ - { - "Ref": "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleE25C1A58" - } - ] - } - }, - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1591B871E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "8fe25f09ced791454f5ebd25cce54fbd76f71ba203f8c4c45b6b209bdabb6a37.zip" - }, - "Description": "Custom resource handler that bumps up Image Builder versions", - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "LoggingConfig": { - "LogFormat": "JSON", - "LogGroup": { - "Ref": "RunnerImageBuildHelpersLog13186633" - } - }, - "Role": { - "Fn::GetAtt": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleE25C1A58", - "Arn" - ] - }, - "Runtime": "nodejs22.x", - "Timeout": 300 - }, - "DependsOn": [ - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleDefaultPolicy93D80BBD", - "awsimagebuilderversionerdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleE25C1A58" - ] - }, "awsimagebuilderdeleteresourcesdcc036c8876b451ea2c1552f9e06e9e1ServiceRoleB6525E5C": { "Type": "AWS::IAM::Role", "Properties": { @@ -15637,27 +13141,16 @@ "AMILinuxBuilderAMIPipelineEC5051DF", "AMILinuxBuilderAmiRecipeAMIRootDevice7FF39374", "AMILinuxBuilderAmiRecipe7C7ED6C7", - "AMILinuxBuilderAmiRecipeVersionFBE9C9AE", "AMILinuxBuilderComponent0RequiredPackagesComponent6D0029EE", - "AMILinuxBuilderComponent0RequiredPackagesVersion1DA9F296", "AMILinuxBuilderComponent1CloudWatchAgentComponentEF606A78", - "AMILinuxBuilderComponent1CloudWatchAgentVersionF6CE8122", "AMILinuxBuilderComponent2RunnerUserComponentEE2EFAA9", - "AMILinuxBuilderComponent2RunnerUserVersion7235C1B1", "AMILinuxBuilderComponent3GitComponent11319ECE", - "AMILinuxBuilderComponent3GitVersion7B3BEDD6", "AMILinuxBuilderComponent4GithubCliComponent21834DCF", - "AMILinuxBuilderComponent4GithubCliVersionE4F9F8C3", "AMILinuxBuilderComponent5AwsCliComponent3AA64EA2", - "AMILinuxBuilderComponent5AwsCliVersionC6151B91", "AMILinuxBuilderComponent6DockerComponentD5E4165F", - "AMILinuxBuilderComponent6DockerVersion8FF46707", "AMILinuxBuilderComponent7GithubRunnerComponent898B6A50", - "AMILinuxBuilderComponent7GithubRunnerVersion6BDEFC52", "AMILinuxBuilderComponent8CustomUndefinedComponentCF5507D3", - "AMILinuxBuilderComponent8CustomUndefinedVersionF6AA0039", "AMILinuxBuilderComponent9EnvironmentVariablesComponent59394D7E", - "AMILinuxBuilderComponent9EnvironmentVariablesVersion008D0039", "AMILinuxBuilderImageCleanerF1745EF6", "AMILinuxBuilderInfrastructure6FCD154A", "AMILinuxBuilderInstanceProfile3CA638BE", @@ -15880,27 +13373,16 @@ "AMILinuxBuilderAMIPipelineEC5051DF", "AMILinuxBuilderAmiRecipeAMIRootDevice7FF39374", "AMILinuxBuilderAmiRecipe7C7ED6C7", - "AMILinuxBuilderAmiRecipeVersionFBE9C9AE", "AMILinuxBuilderComponent0RequiredPackagesComponent6D0029EE", - "AMILinuxBuilderComponent0RequiredPackagesVersion1DA9F296", "AMILinuxBuilderComponent1CloudWatchAgentComponentEF606A78", - "AMILinuxBuilderComponent1CloudWatchAgentVersionF6CE8122", "AMILinuxBuilderComponent2RunnerUserComponentEE2EFAA9", - "AMILinuxBuilderComponent2RunnerUserVersion7235C1B1", "AMILinuxBuilderComponent3GitComponent11319ECE", - "AMILinuxBuilderComponent3GitVersion7B3BEDD6", "AMILinuxBuilderComponent4GithubCliComponent21834DCF", - "AMILinuxBuilderComponent4GithubCliVersionE4F9F8C3", "AMILinuxBuilderComponent5AwsCliComponent3AA64EA2", - "AMILinuxBuilderComponent5AwsCliVersionC6151B91", "AMILinuxBuilderComponent6DockerComponentD5E4165F", - "AMILinuxBuilderComponent6DockerVersion8FF46707", "AMILinuxBuilderComponent7GithubRunnerComponent898B6A50", - "AMILinuxBuilderComponent7GithubRunnerVersion6BDEFC52", "AMILinuxBuilderComponent8CustomUndefinedComponentCF5507D3", - "AMILinuxBuilderComponent8CustomUndefinedVersionF6AA0039", "AMILinuxBuilderComponent9EnvironmentVariablesComponent59394D7E", - "AMILinuxBuilderComponent9EnvironmentVariablesVersion008D0039", "AMILinuxBuilderImageCleanerF1745EF6", "AMILinuxBuilderInfrastructure6FCD154A", "AMILinuxBuilderInstanceProfile3CA638BE", @@ -16086,27 +13568,16 @@ "AMILinuxarm64BuilderAmiLog84A9D94A", "AMILinuxarm64BuilderAMIPipeline9CC1354C", "AMILinuxarm64BuilderAmiRecipe6A6ED38F", - "AMILinuxarm64BuilderAmiRecipeVersion429E7646", "AMILinuxarm64BuilderComponent0RequiredPackagesComponent2ABFFC8F", - "AMILinuxarm64BuilderComponent0RequiredPackagesVersion7CCB5268", "AMILinuxarm64BuilderComponent1CloudWatchAgentComponentE8D7E944", - "AMILinuxarm64BuilderComponent1CloudWatchAgentVersion6EE6E557", "AMILinuxarm64BuilderComponent2RunnerUserComponent81DDD70D", - "AMILinuxarm64BuilderComponent2RunnerUserVersionC25EBA09", "AMILinuxarm64BuilderComponent3GitComponent341EEEFC", - "AMILinuxarm64BuilderComponent3GitVersion792CCDDA", "AMILinuxarm64BuilderComponent4GithubCliComponentBB29E40E", - "AMILinuxarm64BuilderComponent4GithubCliVersion72C57128", "AMILinuxarm64BuilderComponent5AwsCliComponentDFF10DCB", - "AMILinuxarm64BuilderComponent5AwsCliVersion69CAE829", "AMILinuxarm64BuilderComponent6DockerComponent1A04C1F4", - "AMILinuxarm64BuilderComponent6DockerVersion2E656587", "AMILinuxarm64BuilderComponent7GithubRunnerComponentE1EF4281", - "AMILinuxarm64BuilderComponent7GithubRunnerVersion8A7FD98B", "AMILinuxarm64BuilderComponent8CustomUndefinedComponent8BF2DD41", - "AMILinuxarm64BuilderComponent8CustomUndefinedVersion1F3CA7BE", "AMILinuxarm64BuilderComponent9EnvironmentVariablesComponent99728C6D", - "AMILinuxarm64BuilderComponent9EnvironmentVariablesVersion30CC0910", "AMILinuxarm64BuilderImageCleanerA5DDFE7A", "AMILinuxarm64BuilderInfrastructure80FA16D6", "AMILinuxarm64BuilderInstanceProfileCE3B6B09", @@ -16292,27 +13763,16 @@ "WindowsEC2BuilderAmiLog126E54B2", "WindowsEC2BuilderAMIPipelineE3836949", "WindowsEC2BuilderAmiRecipe41A137FF", - "WindowsEC2BuilderAmiRecipeVersionEE5C2F0C", "WindowsEC2BuilderComponent0RequiredPackagesComponent42A20182", - "WindowsEC2BuilderComponent0RequiredPackagesVersion08C0B23D", "WindowsEC2BuilderComponent1CloudWatchAgentComponent0259F61E", - "WindowsEC2BuilderComponent1CloudWatchAgentVersion1BBAB463", "WindowsEC2BuilderComponent2RunnerUserComponentB482ECD9", - "WindowsEC2BuilderComponent2RunnerUserVersionAC4C576C", "WindowsEC2BuilderComponent3GitComponent71764393", - "WindowsEC2BuilderComponent3GitVersion13A51650", "WindowsEC2BuilderComponent4GithubCliComponent4C5B4A15", - "WindowsEC2BuilderComponent4GithubCliVersionE106A3DA", "WindowsEC2BuilderComponent5AwsCliComponentA5AD7E67", - "WindowsEC2BuilderComponent5AwsCliVersionF88E14E7", "WindowsEC2BuilderComponent6DockerComponent0A5C21D2", - "WindowsEC2BuilderComponent6DockerVersionF82FADF5", "WindowsEC2BuilderComponent7GithubRunnerComponentB05EF94B", - "WindowsEC2BuilderComponent7GithubRunnerVersionC0E6DE45", "WindowsEC2BuilderComponent8CustomUndefinedComponent1B25F637", - "WindowsEC2BuilderComponent8CustomUndefinedVersion451771BF", "WindowsEC2BuilderComponent9EnvironmentVariablesComponentF10003FD", - "WindowsEC2BuilderComponent9EnvironmentVariablesVersionCE6A1762", "WindowsEC2BuilderImageCleanerEF537850", "WindowsEC2BuilderInfrastructure757D4FD7", "WindowsEC2BuilderInstanceProfileA8DBA763", diff --git a/test/versioner.test.ts b/test/versioner.test.ts deleted file mode 100644 index d2e9be0d..00000000 --- a/test/versioner.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { increaseVersion } from '../src/image-builders/aws-image-builder/versioner.lambda'; - -test('No versions found', () => { - expect( - increaseVersion([]), - ).toBe('1.0.1'); -}); - -test('Simple version increments', () => { - expect( - increaseVersion(['1.0.0']), - ).toBe('1.0.1'); - - expect( - increaseVersion(['1.0.1']), - ).toBe('1.0.2'); - - expect( - increaseVersion(['0.0.1']), - ).toBe('0.0.2'); - - expect( - increaseVersion(['135.55.68']), - ).toBe('135.55.69'); -}); - -test('Multi version increments', () => { - expect( - increaseVersion(['1.0.0', '1.0.1', '1.0.2']), - ).toBe('1.0.3'); - - expect( - increaseVersion(['1.0.2', '1.0.1', '1.0.0']), - ).toBe('1.0.3'); -});