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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ee2a28ce15178b8a48f9441d26cc3a50f18f71cb8eff6efe28d73d04cf060a |
|
MD5 | 13bd905bdd4ae6f60ef346fd5898a45d |
|
BLAKE2b-256 | 5bbb962a02d7bc6296e9aaeb809aa934bc187dfd1e1e4c08f85e8a531758bd1f |
Close
Hashes for cloudcomponents.cdk_codepipeline_dockerfile_linter_action-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804d66ac8f1c58a56c06bf55cd62d0a7448b4e11220431c70db298c501bac7bd |
|
MD5 | 342ccb22453533d1a0443691ccd0e582 |
|
BLAKE2b-256 | 2f503ee111a7197c58870a1beb9f5fff3afe433390af4800f274b2b334932a72 |