Plugin Information |
---|
View Sensedia Api Platform tools on the plugin site for more information. |
It is a continuous integration and continuous delivery plugin for Sensedia API Platform
Configuration
Sensedia Api Platform manager URL
Sensedia Api Platform integration token
Request the integration token by Sensedia Zendesk
Set this informations in Jenkins > Configuration > Sensedia API Platform Configuration
Functions
Get Api Json
Get the Api code, by Id. This Id can be seen at the Api URL on Sensedia API Platform Manager
https:/manager.sensedia.com/api-manager/#/apis/overview/204/revisions/2147756
• sensediaApiJson : string(ApiId)
.. stage ("Get Api"){ sensediaApiJson "204" } ..
This function save de api code in the workspace job (filename = api.json). The other functions uses this code to work. If you don't want to use this function, will need to save a api code in the workspace with a file name "api.json"
Quality Analyst
It validate the best pratices on API. The destination search for hard coded endpoints, logInterceptor validates if log interceptor is too used and resourceOutOfSize if the path is too large
• sensediaApiQA: boolean (destination), boolean (logInterceptor), boolean (resourceOutOfSize)
.. stage ("Quality Analyst"){ sensediaApiQA(destination: true, logInterceptor: true, resourceOutOfSize: true) } ..
If one of them is not set, the test will be skipped
Deploy
Performs a deployment in the enviroment
• sensediaApiJson : string(enviroment name)
.. stage ("Production deploy"){ sensediaApiDeploy(enviromentName: "Production") } ..
By default the Api revision deployed is the last
Step-by-step guide
- Download and install Sensedia API Platform plugin
- In "Configure System" > "Sensedia Api Platform Configuration" section, put the URL and Token values
- Create new Pipeline Job
In section "Pipeline" put the script according to your process. See an example below
Pipeline scriptnode { stage ("Get API"){ sensediaApiJson "204" } stage ("Quality Analyst"){ sensediaApiQA(destination: true, logInterceptor: true, resourceOutOfSize: true) } stage ("Deploy"){ sensediaApiDeploy(enviromentName: "Production") } }
- Build pipeline
Attachments:
newjob.jpg (image/jpeg)
apiUrl.jpg (image/jpeg)
pipelineRun.jpg (image/jpeg)
jenkinsConfig.jpg (image/jpeg)