Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Make the S3 code bucket and key configurable #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions cloudformation/code-pipeline-helper.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ const cf = require('@mapbox/cloudfriend');
const pkg = require('../package.json');

const Parameters = {
CodePipelineHelperVersion: {
Type: 'String',
Description: 'The version of code-pipeline-helper to deploy',
Default: pkg.version
},
OAuthTokenSecretId: {
Type: 'String',
Description: 'The SecretId for a Github personal access token stored in AWS SecretsManager',
Default: 'code-pipeline-helper/access-token'
}
},
CodeBucket: {
Type: 'String',
Description: 'The S3 bucket in which the code-pipeline-helper repository\'s code is stored',
Default: 'code-pipeline-helper'
},
CodeKey: {
Type: 'String',
Description: 'The S3 bucket key to identify the code-pipeline-helper repository\'s code',
Default: pkg.version
},
};

const Resources = {
Expand Down Expand Up @@ -90,8 +95,8 @@ const Resources = {
Description: cf.sub('Custom CloudFormation resource backend for maintaining AWS::CodePipeline::Pipelines'),
Runtime: 'nodejs8.10',
Code: {
S3Bucket: 'code-pipeline-helper',
S3Key: cf.sub('${CodePipelineHelperVersion}.zip')
S3Bucket: cf.ref('CodeBucket'),
S3Key: cf.ref('CodeKey')
},
Handler: 'index.customResource',
Environment: {
Expand Down
Loading