Skip to content

Commit

Permalink
Update runBuild fn
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikdem committed Jan 26, 2024
1 parent a40a968 commit d35e393
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions code-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,21 @@ function runBuild() {
// get a codeBuild instance from the SDK
const sdk = buildSdk();

const inputs = githubInputs();

const config = (({ updateInterval, updateBackOff, hideCloudWatchLogs }) => ({
updateInterval,
updateBackOff,
hideCloudWatchLogs,
}))(inputs);

// Get input options for startBuild
const params = inputs2Parameters(githubInputs());
const params = inputs2Parameters(inputs);

return build(sdk, params);
return build(sdk, params, config);
}

async function build(sdk, params) {
async function build(sdk, params, config) {
// Invoke the lambda to start the build
const buildTime = (Date.now() / 1000).toString();
const imageTag = `${Math.floor(buildTime)}+${params.sourceVersion}`;
Expand Down

0 comments on commit d35e393

Please sign in to comment.