aws / aws/aws-toolkit-azure-devops

AWSShellScript Task doesnt work with filePath

Open
#426 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

**To reproduce**

When the task entry is using an inline script like this:

```
- task: AWSShellScript@1
displayName: "Environment Setup"
inputs:
awsCredentials: ${{ parameters.serviceConnection }}
scriptType: inline
script: echo $(aws sts get-caller-identity) | cat -v
failOnStandardError: true
```
It executes without issue.

image

When the code is in a .sh file and I use the following:

```
- task: AWSShellScript@1
displayName: "Environment Setup"
inputs:
awsCredentials: ${{ parameters.serviceConnection }}
scriptType: file
filePath: /DevOps/scripts/Environment_Setup.sh
```
The pipeline hangs. It seems the script is never passed to the bash shell so I assume it hangs as its just an open shell.

image

**Expected behavior**

The script is passed to the bash shell and executes.

**Screenshots**
Included above for clarity.

**Your Environment**

- On-prem or cloud based?: Cloud
- Azure DevOps version: Current agent version: '2.189.0'
- AWS Toolkit for Azure DevOps version: 1.11.0

**Additional context**

I've tried to work back through the repo to spot any issues but can't spot any. Never used TS.

Contributor guide

Open the contributing guide

Research direction

Start at the AWSShellScript@1 task entry point and reproduce the two YAML examples, comparing inline script execution with the filePath path. Inspect the task and agent logs to determine why the .sh file does not execute; done means the file-based task runs the script and completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, bash, typescript
Domain
cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.