@byu-oit/cbsetup
Advanced tools
Comparing version 1.4.0 to 1.5.0
27
cli.js
@@ -49,11 +49,2 @@ #!/usr/bin/env node | ||
{ | ||
type: 'list', | ||
name: 'end', | ||
message: 'What CodeBuild image do you want to use?', | ||
choices: [ | ||
'Docker + OpenJDK + Maven', | ||
'Amazon Standard 2.0 (NPM runtime)' | ||
] | ||
}, | ||
{ | ||
type: 'input', | ||
@@ -80,3 +71,3 @@ name: 'buildspec', | ||
await createCodeBuildProject(codebuild, parentAnswers.region, | ||
answers.repo, answers.end, answers.buildspec, | ||
answers.repo, answers.buildspec, | ||
answers.whenToBuild); | ||
@@ -101,6 +92,5 @@ console.log('CodeBuild project created successfully.'); | ||
async function createCodeBuildProject ( | ||
codebuild, region, repo, end, buildspec, whenToBuild) { | ||
codebuild, region, repo, buildspec, whenToBuild) { | ||
let currentAccountId = await getCurrentAccountId(); | ||
currentAccountId = currentAccountId.Account; | ||
let buildImage = getBuildImage(end, currentAccountId, region); | ||
@@ -113,3 +103,3 @@ let cbParams = { | ||
computeType: 'BUILD_GENERAL1_SMALL', /* required */ | ||
image: buildImage, /* required */ | ||
image: 'aws/codebuild/standard:2.0', /* required */ | ||
type: 'LINUX_CONTAINER', /* required */ | ||
@@ -187,12 +177,1 @@ imagePullCredentialsType: 'CODEBUILD', | ||
} | ||
function getBuildImage (end, accountId, region) { | ||
// Get build image | ||
let buildImage; | ||
if (end === 'Docker + OpenJDK + Maven') { | ||
buildImage = `${accountId}.dkr.ecr.${region}.amazonaws.com/docker-openjdk-maven:latest`; | ||
} else { | ||
buildImage = 'aws/codebuild/standard:2.0'; | ||
} | ||
return buildImage; | ||
} |
{ | ||
"name": "@byu-oit/cbsetup", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Create an AWS CodeBuild project from your command line", | ||
@@ -24,4 +24,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"aws-sdk": "^2.484.0", | ||
"inquirer": "^6.4.1" | ||
"aws-sdk": "^2.549.0", | ||
"inquirer": "^6.5.2" | ||
}, | ||
@@ -28,0 +28,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17525
164
Updatedaws-sdk@^2.549.0
Updatedinquirer@^6.5.2