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
# Example automatically generated from non-compiling source. May contain errors.
import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { Repository } from '@aws-cdk/aws-codecommit';
import { Pipeline, Artifact } from '@aws-cdk/aws-codepipeline';
import { CodeCommitSourceAction } from '@aws-cdk/aws-codepipeline-actions';
import { CodePipelineDockerfileLinterAction } from '@cloudcomponents/cdk-codepipeline-dockerfile-linter-action';
import { CodePipelineAnchoreInlineScanAction } from '@cloudcomponents/cdk-codepipeline-anchore-inline-scan-action';
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-1.48.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ae2120a01cd301c92804a69eec873b5c9e24e704aa1791d76f3a60bbd10683 |
|
MD5 | d7204cdaf5e52156f52fe738e9885725 |
|
BLAKE2b-256 | 7c0044ca11e2d2926c04600787f25224e3d92e20d8f084432c37321389f31dd6 |
Close
Hashes for cloudcomponents.cdk_codepipeline_dockerfile_linter_action-1.48.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 083a2bc7a0ecf61db4c6b71c48d67112f670897be2871011cfc2943e84d63e28 |
|
MD5 | 7f736668b93004683a91d1979878684a |
|
BLAKE2b-256 | e2a2aef65608b085a5bc588ff87f3627970351a732260775d5ada725b8a40883 |