cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
148
Views
1
Helpful
2
Replies

How to attach a file from Groovy

slapierr
Cisco Employee
Cisco Employee

I want to attach a file to a message, sent from a Jenkins pipeline written in groovy, using simple notifications, not cards

1 Accepted Solution

dtibbe
VIP
VIP

The Cisco Spark Notifier Plugin for Jenkins seems not to support file attachements, so you'd have to build your own tool for that or enhance the plugin...

When doing it on your own: There is an example on how to send files using a curl command at https://developer.webex.com/docs/basics#message-attachments. Guess you may call it similar from within your pipeline. A bot access token would be sufficiant if the bot it in your space..

View solution in original post

2 Replies 2

dtibbe
VIP
VIP

The Cisco Spark Notifier Plugin for Jenkins seems not to support file attachements, so you'd have to build your own tool for that or enhance the plugin...

When doing it on your own: There is an example on how to send files using a curl command at https://developer.webex.com/docs/basics#message-attachments. Guess you may call it similar from within your pipeline. A bot access token would be sufficiant if the bot it in your space..

slapierr
Cisco Employee
Cisco Employee
I am currently using sparkSend to send simple notifications to a space, example:
 
sparkSend  credentialsId: 'jenkins-rialto-bot', message: "some message", messageType: 'html', spaceList: [[spaceId: someId, spaceName: someName]]  
 
I want to add a file attachment in the simplest possible way