Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
coffeeShopBucket.grantPut(buildRole);
coffeeShopBucket.grantRead(buildRole);
coffeeShopBucket.grantReadWrite(buildRole);
coffeeShopBucket.grantWrite(buildRole);
new codebuild.Project(this, 'CodeBuildProject', {
role: buildRole,
source: defaultSource,
// Enable Docker AND custom caching
cache: codebuild.Cache.local(codebuild.LocalCacheMode.DOCKER_LAYER, codebuild.LocalCacheMode.CUSTOM),
environment: {
buildImage: codebuild.LinuxBuildImage.AMAZON_LINUX_2,
privileged: true,
},
buildSpec: codebuild.BuildSpec.fromObject({
version: '0.2',
phases: {
install:{
'runtime-versions': {
java: 'corretto8'
}
},
build: {
commands: [
'echo "Build all modules"',
'echo "Run Maven clean install to have all the required jars in local .m2 repository"',
'cd sources/coffeeshop',
'mvn clean install -Dmaven.test.skip=true'
]
},
post_build: {