Plugin version 1.2.2
Revised on October 18, 2021
This plugin integrates with AWS CLI.
Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined parameter sets for end users, and securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.
To create plugin configurations in CloudBees CD, do these steps:
-
Go to Adminstration → Plugins to open the Plugin Manager.
-
Find the AWSCLI-1.2.2 row.
-
Click Configure to open the Configurations page.
-
Click Create Configuration as per the description of parameters below.
| Parameter | Description |
|---|---|
Configuration Name |
The name for the created configuration |
Description |
Description for the configuration |
CLI Path |
Path to aws cli, e.g. /usr/bin/aws |
Region |
AWS Region to work with, e.g. us-west-1. See the list of available regions here . |
Authorization Type |
Choose the authorization type. environment - will rely on machine’s environment variables basic - requires Access Key ID and Key Secret sts - requires Access Key ID, Secret and the Role ARN. sessionToken - requires Access Key ID, Secret and the Session Token. |
Role ARN |
The Amazon Resource Name (ARN) of the role to assume. |
AWS Credentials |
Basic AWS credentials: Access Key ID and Secret. |
Session Name |
Session name to use for the role assumption. |
Session Token |
Session token to use with Access Key ID and the Secret. |
Check Configuration Resource |
A resource that is used for the checking configuration. AWS ClI must be installed on this resource. |
Global CLI Flags |
Use this field to set global flags, e.g. --no-verify-ssl. One flag per line. |
Environment Variables |
Use this field to set additional environment variables, e.g. AWS_MAX_ATTEMPTS=2 |
Check Connection? |
If checked, the connection endpoint and credentials entered as part of the configuration will be tested. If this option is checked, configuration will not be saved if the test fails. |
Debug Level |
This option sets debug level for logs. If info is selected, only summary information will be shown, for debug, there will be some debug information and for trace the whole requests and responses will be shown. |
This procedure runs a commmand using aws cli and the authorization data provided in the plugin’s configuration.
| Parameter | Description |
|---|---|
Configuration Name |
Previously defined configuration for the plugin |
Service Name |
Service to call, e.g. sts |
Environment Variables |
Use this field to provide additional environment variables to the command. This field content and variables from the configuration will be merged and this field will take precedence. |
Arguments |
Command arguments, one per line, e.g. describe-instances --page-size 5 |
Output File |
If the value is provided, the command output will be saved to this file instead of the output parameter. The output parameter will be empty. |
This procedure allows to run a user-defined Perl script with the pre-built authorization data
| Parameter | Description |
|---|---|
Configuration Name |
Previously defined configuration for the plugin |
Script |
Perl script to execute from the context of the plugin, e.g. my $c = $self→wrapAuth(); $c→addArguments('sts', 'get-caller-identity'); my $r = $cli→runCommand($c); print Dumper $r; |