aws / aws/aws-toolkit-azure-devops

Create/Update Stack task error

Open
#295 2 comments 0 reactions 0 assignees View on GitHub
needs-response
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

Hi

I encountered a problem when I run the Create / Update Stack task of Cloud Formation from a build agent.

I have no problems running the command to create the stack with the same credentials from AWS cli, but from the build agent it generates the following error:

/etc/myagent/_work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.4.0/CloudFormationCreateOrUpdateStack.js:13
*/var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(a,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function n(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){e.done?a(e.value):new r(function(t){t(e.value)}).then(o,n)}u((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const a=r(7);function s(e,r,i){r!==t.defaultTimeoutInMins&&console.log(a.loc("SettingCustomTimeout",r));const s={StackName:e,$waiter:{maxAttempts:Math.round(60*r/30)}};return i&&(s.ChangeSetName=i),s}t.defaultTimeoutInMins=60,t.captureStackOutputs=function(e,t,r,s){return i(this,void 0,void 0,function*(){const i=yield e.describeStacks({StackName:t}).promise();try{const e=i.Stacks[0];if(r){console.log(a.loc("ProcessingStackOutputsToJsonBlobBuildVariable"));const r=JSON.stringify(e.Outputs),i=`${t}Outputs`;console.log(a.loc("CreatingSta

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:146:18)
at node.js:404:3

I have no more information, because the execution log does not provide more data, even in system.debug mode

I can run other task from aws-vsts-tools, but no create/update stack

What could be happening?

I have tested on Windows and Linux agents and in all I have the same problem

My Environment
TFS Server On Premise 2017: Versión 15.112.26307.0
Linux TFS Build Agent
AWS Tools Versión: 1.4.0

Thanks
Best regards

Contributor guide

Open the contributing guide

Research direction

Start with the generated CloudFormationCreateOrUpdateStack.js entry point and the SyntaxError at the unexpected '=' token. Reproduce the Create/Update Stack task on TFS Server 2017 with AWS Tools 1.4.0 and compare the build agent's Node.js runtime with the task requirements; done means the task runs successfully on the reported Windows and Linux agents.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, typescript
Domain
cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.