CodePipeline action to lint dockerfiles with hadolint
Project description
@cloudcomponents/cdk-codepipeline-dockerfile-linter-action
CodePipeline action to lint dockerfiles with hadolint
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-codepipeline-dockerfile-linter-action
Python:
pip install cloudcomponents.cdk-codepipeline-dockerfile-linter-action
How to use
import { CodePipelineAnchoreInlineScanAction } from '@cloudcomponents/cdk-codepipeline-anchore-inline-scan-action';
import { CodePipelineDockerfileLinterAction } from '@cloudcomponents/cdk-codepipeline-dockerfile-linter-action';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Repository } from 'aws-cdk-lib/aws-codecommit';
import { Pipeline, Artifact } from 'aws-cdk-lib/aws-codepipeline';
import { CodeCommitSourceAction } from 'aws-cdk-lib/aws-codepipeline-actions';
import { Construct } from 'constructs';
export class ContainerAuditStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const repository = new Repository(this, 'Repository', {
repositoryName: 'container-audit-repository',
});
const sourceArtifact = new Artifact();
const sourceAction = new CodeCommitSourceAction({
actionName: 'CodeCommit',
repository,
output: sourceArtifact,
branch: 'master',
});
const linterAction = new CodePipelineDockerfileLinterAction({
actionName: 'Linter',
input: sourceArtifact,
});
const vulnScanAction = new CodePipelineAnchoreInlineScanAction({
actionName: 'VulnScan',
input: sourceArtifact,
});
new Pipeline(this, 'Pipeline', {
pipelineName: 'container-audit-pipeline',
stages: [
{
stageName: 'Source',
actions: [sourceAction],
},
{
stageName: 'Audit',
actions: [linterAction, vulnScanAction],
},
],
});
}
}
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cloudcomponents.cdk-codepipeline-dockerfile-linter-action-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e1ba99542c1fab0d38bfbe6805279e1fbf2109c2d26a89bc1fddbd47d977770 |
|
MD5 | 175e4232110b3f9735a5f896cc8965f4 |
|
BLAKE2b-256 | 1e39e4da0620cbca0afb696f2e3dc837618301872f9df2955238942ba907a259 |
Close
Hashes for cloudcomponents.cdk_codepipeline_dockerfile_linter_action-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13509886fada4865859ef197595ac5826633c351dcd2fc820154ef78b77c4ed1 |
|
MD5 | 25a3b2b061dc70f4361620fddb9aa753 |
|
BLAKE2b-256 | 80317f3c2ec2f741d834d512e12574c0662e78dc937f6dc046f80a5e8ea32f4b |