jenkinsci / jenkinsci/aws-credentials-plugin

Output of snippet generator is broken

Open
#105 3 comments 17 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
30
Forks
81
PR merge metrics
No merged PRs in 30d

Description

### Version report

Jenkins and plugins versions report:

```
Jenkins: 2.303.1
OS: Linux - 5.10.0-8-amd64
---
aws-credentials:1.32
```

- What Operating System are you using (both controller, and any agents involved in the problem)?

```
Linux
```

### Reproduction steps

- Go to the pipeline snippet generator
- Select `withCredentials`
- Select an AWS credential
- Hit "Generate pipeline script"

### Results

Expected result:

A nice pipeline like
```
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'foobar']]) {
// some block
}
```
or
```
withCredentials([aws(credentialsId: 'foobar')]) {
// some block
}
```
(as seen on https://www.jenkins.io/doc/pipeline/steps/credentials-binding/#withcredentials-bind-credentials-to-variables)

Actual result:

![grafik](https://user-images.githubusercontent.com/78534/136062612-ea867aa0-a501-4641-96cd-a7d5b87c8e5e.png)

```
withCredentials([]) {
// some block
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the Jenkins pipeline snippet generator and reproduce the issue by selecting `withCredentials` and an AWS credential. Compare the generated output with the documented `withCredentials` examples and verify that the result contains a usable AWS binding and credential ID rather than an object placeholder.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.