fixed create function

This commit is contained in:
Arwid Thornström
2022-01-19 11:02:04 +01:00
parent 19b15a585c
commit b4d3f789cf
@@ -231,7 +231,7 @@ module.exports = {
const dockerImage = `${awsAccountId}.dkr.ecr.${awsRegion}.amazonaws.com/${stackName}`; const dockerImage = `${awsAccountId}.dkr.ecr.${awsRegion}.amazonaws.com/${stackName}`;
let composerAuthToken = await system.run(`aws ssm get-parameter --with-decryption --name /github/COMPOSER_TOKEN --output text --query Parameter.Value`); let composerAuthToken = await system.run(`aws ssm get-parameter --with-decryption --name /github/COMPOSER_TOKEN --output text --query Parameter.Value`);
composerAuthToken = composerAuthToken.replace('\n', ''); composerAuthToken = composerAuthToken.replace('\n', '');
const composerAuth = `'{\"github-oauth\":{\"github.com\":\"${composerAuthToken}\"}}'`; const composerAuth = `'{\\\"github-oauth\\\":{\\\"github.com\\\":\\\"${composerAuthToken}\\\"}}'`;
const createCommand = getCreateStackCommand(stackName, branchName, 'file://ecs-service.yaml', dockerImage, githubToken, composerAuth); const createCommand = getCreateStackCommand(stackName, branchName, 'file://ecs-service.yaml', dockerImage, githubToken, composerAuth);
print.fancy(await system.run(createCommand, {cwd: '/tmp/', trim: true})); print.fancy(await system.run(createCommand, {cwd: '/tmp/', trim: true}));