Skip to content

Commit

Permalink
test: 💍 testrun
Browse files Browse the repository at this point in the history
  • Loading branch information
gbvanrenswoude committed Aug 16, 2021
1 parent 9f8ee8b commit ca60e81
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/integ.default.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as path from "path";
import { DockerImageAsset } from "@aws-cdk/aws-ecr-assets";
import * as ecs from "@aws-cdk/aws-ecs";
import * as cdk from "@aws-cdk/core";
import { ScannedDockerImageAsset } from "./index";
import * as path from 'path';
import { DockerImageAsset } from '@aws-cdk/aws-ecr-assets';
import * as ecs from '@aws-cdk/aws-ecs';
import * as cdk from '@aws-cdk/core';
import { ScannedDockerImageAsset } from './index';

const env = {
region: process.env.CDK_DEFAULT_REGION,
Expand All @@ -16,70 +16,70 @@ export class TestStack extends cdk.Stack {
super(scope, id, props);

// Docker Image Asset
const image = new DockerImageAsset(this, "whoo", {
directory: path.join(__dirname, "../src/"),
const image = new DockerImageAsset(this, 'whoo', {
directory: path.join(__dirname, '../src/'),
});
const image1 = ecs.ContainerImage.fromDockerImageAsset(image);

// Container Image Asset
const image2 = ecs.ContainerImage.fromAsset("./src/");
const image2 = ecs.ContainerImage.fromAsset('./src/');

// Image 3 with scan
const image3 = new ScannedDockerImageAsset(this, "firsttest", {
directory: path.join(__dirname, "../src/"),
const image3 = new ScannedDockerImageAsset(this, 'firsttest', {
directory: path.join(__dirname, '../src/'),
});
const image31 = ecs.ContainerImage.fromDockerImageAsset(image3);
// Image 4 with scan
const image4 = new ScannedDockerImageAsset(this, "secondtest", {
directory: path.join(__dirname, "../src/temp/"),
const image4 = new ScannedDockerImageAsset(this, 'secondtest', {
directory: path.join(__dirname, '../src/temp/'),
});
const image41 = ecs.ContainerImage.fromDockerImageAsset(image4);

const taskDefinition = new ecs.FargateTaskDefinition(
this,
"test-task-definition",
'test-task-definition',
{
memoryLimitMiB: 2048,
cpu: 1024,
}
},
);
taskDefinition.addContainer("container", {
taskDefinition.addContainer('container', {
image: image1,
environment: {
TEST_VAR: "ONE",
TEST_VAR: 'ONE',
},
logging: new ecs.AwsLogDriver({
streamPrefix: "testingone",
streamPrefix: 'testingone',
}),
});
taskDefinition.addContainer("container_two", {
taskDefinition.addContainer('container_two', {
// image: ecs.ContainerImage.fromEcrRepository(image1.repository),
image: image2,
environment: {
TEST_VAR: "TWO",
TEST_VAR: 'TWO',
},
logging: new ecs.AwsLogDriver({
streamPrefix: "testingtwo",
streamPrefix: 'testingtwo',
}),
});
taskDefinition.addContainer("container_three", {
taskDefinition.addContainer('container_three', {
image: image31,
environment: {
TEST_VAR: "THREE",
TEST_VAR: 'THREE',
},
logging: new ecs.AwsLogDriver({
streamPrefix: "testingthree",
streamPrefix: 'testingthree',
}),
});
taskDefinition.addContainer("container_four", {
taskDefinition.addContainer('container_four', {
image: image41,
environment: {
TEST_VAR: "FOUR",
TEST_VAR: 'FOUR',
},
logging: new ecs.AwsLogDriver({
streamPrefix: "testingfour",
streamPrefix: 'testingfour',
}),
});
}
}
new TestStack(app, "scantestm-stack", { env });
new TestStack(app, 'scantestm-stack', { env });

0 comments on commit ca60e81

Please sign in to comment.