Skip to content

Commit

Permalink
chore: updated projen to satisfy jsii compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
OrdonioSa committed Apr 2, 2024
1 parent b017af0 commit bcf3a3a
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 52 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 20 additions & 10 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 19 additions & 8 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions src/mixins/CleanupStacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ import { RetentionDays } from 'aws-cdk-lib/aws-logs';
import { Provider } from 'aws-cdk-lib/custom-resources';
import { CodePipeline } from 'aws-cdk-lib/pipelines';
import { MultiDeployCodePipeline } from '../pipelines';
import { CleanupStacksFunction } from './functions/CleanupStacks-function';
import { CodePipelineMixin } from './Mixin';
import { CleanupStacksFunction } from './functions/CleanupStacks-function';


export class CleanupStacksMixin extends CodePipelineMixin {

private readonly qualifier: string;
private readonly skipDeletion: string;

constructor(props?: { cdkQualifier?: string; skipDeletion?: 'true'|'false' }) {
constructor(
private readonly skipDeletion: boolean = false,
private readonly qualifier: string = DefaultStackSynthesizer.DEFAULT_QUALIFIER,
) {
super();
this.qualifier = props?.cdkQualifier ?? DefaultStackSynthesizer.DEFAULT_QUALIFIER;
this.skipDeletion = props?.skipDeletion ?? 'false';
}

preDoBuildPipeline(_codePipeline: CodePipeline) {
Expand All @@ -35,7 +33,7 @@ export class CleanupStacksMixin extends CodePipelineMixin {
const cleanupFunction = new CleanupStacksFunction(stack, 'CleanupStacks', {
environment: {
CDK_QUALIFIER: this.qualifier,
SKIP_DELETION: this.skipDeletion,
SKIP_DELETION: this.skipDeletion.toString(),
},
});
cleanupFunction.addToRolePolicy(new PolicyStatement({
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/buildSpec/BuildSpecPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class BuildSpecPipeline extends Construct {
}

private readBuildSpecFromFile(file: string) {
const buildSpecYaml = fs.readFileSync(file).toString('UTF8');
const buildSpecYaml = fs.readFileSync(file).toString('utf8');
return YAML.parse(buildSpecYaml);
}

Expand Down
Loading

0 comments on commit bcf3a3a

Please sign in to comment.