This is a "simple" SQS trigger plugin to watch the AWS SQS queues. Once there are messages delivered to the watched SQS queues, the jobs are triggered by this plugin.
You need to create an SQS queue and grant the sqs:ReceiveMessage and sqs:DeleteMessage to the Jenkins instance.
Enable the trigger at job config page and input the SQS queue name to watch. Select the AWS credentials or leave the credentials filed blank to use the default credentials from environment variables, instance profile or EKS irsa.
SQS message properties are sent to the build by parameters. Because of the SECURITY-170, the job must explicitly define the parameters to used in the job. All parameters are sent by this plugin as string parameters which starts with "sqs_".
|The message body
|The message id
|The message attributes string value
There are some use cases, for example a long time CD build to install a full application, which don't want to run builds concurrently.
Enable this option to prevent concurrently build triggered by the SMS messages.
When the option is checked and there's a running job whatever caused, build will be ignored when receive messages. When the option is checked and multiple messages are received, at most one build will be triggered if there's no running job.
This plugin deletes the messages immediately after receiving. So it's not possible to tigger multiple jobs from one queue by watch a single queue. To trigger multiple jobs, use an upstream job to watch and use Build Step to trigger a new build for a given job.
You can find several SQS plugins. So why another one?
In my organization, we have many jenkins instance running in everywhere. Some are in AWS vpcs, and some are in on-premises data centers. We need to trigger a full CI/CD build stream to cross several Jenkins instances.
The most difference is that this plugin just watches the SQS queues without any other dependencies.
So we can simplify publish a message to AWS SNS by AWS Steps plugin and trigger builds by this plugin.
This plugin calls aws SQS ReceiveMessage in 20s long polling per queue per minute. If there are messages received, it calls additional DeleteMessageBatch API. Suppose there's a message per 20 min, it calls around 45000 APIs per month.
The data transfer out is charged also.
AWS gives free First 1 Million Requests/Month.
If you choose to use Server Side Encryption by AWS Key Management Service (SSE-KMS), additional cost is charged by KMS service.
Refer to our contribution guidelines
Licensed under MIT, see LICENSE