1

I am trying to publish data to aws sns topic from a jenkin job using groovy code. Just wanted to know if there is away to do that using groovy library or jenkins api. I know we can do with the Java api but not sure about groovy and jenkins. Any help will be appreciated.

Monish Das
  • 383
  • 2
  • 12
  • 28

1 Answers1

1

Yes, the awesome Pipeline AWS steps plugin has a snsPublish step for this:

snsPublish: Publish notification to SNS

  • topicArn Type: String
  • subject Type: String
  • message Type: String
  • messageAttributes (optional) java.lang.String>
StephenKing
  • 36,187
  • 11
  • 83
  • 112
  • Thats the way but we can use ansible also – Monish Das May 22 '18 at 15:13
  • 1
    You can use the AWS CLI, curl, httpie, and probably almost any other programming language as well. You never asked about Ansible, so no clue, why you're mentioning this now, when you asked for a Jenkins Pipeline "native" solution. – StephenKing May 22 '18 at 15:54
  • Yes correct I wanted to use the best way to do that .. and thats why I have accepted your answer – Monish Das May 22 '18 at 15:56