[JIRA] (JENKINS-53101) Add Declarative support

9 views
Skip to first unread message

rpocase@gmail.com (JIRA)

unread,
Aug 17, 2018, 11:51:01 AM8/17/18
to jenkinsc...@googlegroups.com
Robby Pocase created an issue
 
Jenkins / New Feature JENKINS-53101
Add Declarative support
Issue Type: New Feature New Feature
Assignee: Nicolas De Loof
Components: aws-credentials-plugin
Created: 2018-08-17 15:50
Priority: Minor Minor
Reporter: Robby Pocase

I'd like to be able to inject AWS credentials using the environment directive. However, this produces a stack trace.

 

environment {
  AWS = credentials('key')
}
 


org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: No suitable binding handler could be found 
                 for type com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

rpocase@gmail.com (JIRA)

unread,
Aug 17, 2018, 11:51:02 AM8/17/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Aug 17, 2018, 2:01:03 PM8/17/18
to jenkinsc...@googlegroups.com
Andrew Bayer assigned an issue to Andrew Bayer
Change By: Andrew Bayer
Assignee: Nicolas De Loof Andrew Bayer

andrew.bayer@gmail.com (JIRA)

unread,
Aug 17, 2018, 2:02:01 PM8/17/18
to jenkinsc...@googlegroups.com
Andrew Bayer started work on New Feature JENKINS-53101
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Aug 17, 2018, 2:02:01 PM8/17/18
to jenkinsc...@googlegroups.com
Change By: Andrew Bayer
Status: In Progress Review

andrew.bayer@gmail.com (JIRA)

unread,
Aug 17, 2018, 2:04:02 PM8/17/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on New Feature JENKINS-53101
 
Re: Add Declarative support

PR up at https://github.com/jenkinsci/aws-credentials-plugin/pull/45. With this, you'd be able to do the following:

environment {
  CREDS = credentials('id-for-an-aws-cred')
}

stages {
  stage('foo') {
    steps {
      sh "bash ./do-something-with-aws-creds.sh ${CREDS_AWS_KEY_ID} ${CREDS_AWS_SECRET}"
    }
  }
}

fakemailred888@gmail.com (JIRA)

unread,
Nov 25, 2019, 8:12:03 AM11/25/19
to jenkinsc...@googlegroups.com
red der commented on New Feature JENKINS-53101
 
Re: Add Declarative support

wait I was hoping environment { CREDS = credentials('id-for-an-aws-cred') } would inject environment variables named AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for you like withCredentials does.

Is that what we want? So you dont have to manually add them with string interpolation?

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages