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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d2ecb5fc0c6716e5bb113136abc671385a8dd228aea58b8b35693fc2b27f740 |
|
MD5 | 655c2dda4a1bb9130b8159c0b43b8520 |
|
BLAKE2b-256 | 95d5230d9676866999a08174fbb09fc8eddd43d19fca5ca8aef8f720e13dd56f |
Close
Hashes for cloudcomponents.cdk_codepipeline_dockerfile_linter_action-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6da1e1aab89bd7b2aa6c16e2336862e3df466158f0d0f7bc0b93cd23717d94ae |
|
MD5 | 12d9ed2a8529af2a1ae73f5f0d162d50 |
|
BLAKE2b-256 | b3ef235f4a52809233e0c1a7b41b4ed95078704f721b415ae0ff4d024981855c |