How to invoke a Rest API from BAMBOO - bamboo

I need to create a Bamboo task that task needs to invoke my project Rest API(http://host:port/api/......) to perform the business logic. Is it any way is there to achieve this? Where i need to mention my API URL and how it will pick my code?

You can use Script task to invoke curl command as part of job. Project REST endpoint can be plan variable, if it doesn't change often.

Related

Tekton: Get Pipeline name inside task

I know that there is something like context.pipelineRun.name but that's only available in the pipeline. How can I get the pipeline name inside a task to build a link to the Tekton-dashboard, WITHOUT a parameter?
As what I know
context.pipelineRun.name
should work in your Task, if your Task is executed in a PipelineRun - since Tasks is the way to execute things in a Pipeline. Although, this variable will not be available if you run your Task standalone.
From Tekton's documentation (https://tekton.dev/docs/pipelines/variables/) the name of the pipelinerun is not available in the task.
So, I see only the possibility to pass it as a parameter from the pipelinerun (where it is available under context.pipelineRun.name). Or you use the task's name (context.taskRun.name), if that is sufficient for you.

How to execute Workfusion RPA business process using API call or using cmd?

I am new to Workfusion RPA.
I have created one business process from IDE and when i run manually it is working perfectly fine.
Now my Question is:
1. Can we export any executable file so that i can execute it from command prompt?
2. Is there any way we can expose REST api for that business process, so that i can call from any other application?.
please help in this
Thank you in advance
one approach you can take is you can schedule business process to continuesly execute and read a file from directory,cloud storage or sharepoint and you can write rest service or script to change a flag in the file that way you can control the business process execution if the flag is false bp will end in next schedule again it will read the file
There is REST API available to launch and control business processes.
Documentation can be retrieved through such URL:
https://workfusion_deployment_hostname/workfusion/api/swagger-ui.html
task_management section, /v2/workfusion/task/file method. Request body can be as simple as this:
{
"campaignUuid": "b8b95933-....",
"mainData": "column1,column2\nvalue1,value2"
}

How to automate run an mule application

I have a mule flow and I want to automate the execution of the application without http listener
I want the mule application execute without enter "localhost:8081/app"
is it a way to do this?
Screenshots of the flow
As I understood from your question, I can suggest the below steps
1) Add Composite source at the start of your flow.
2) Place the existing HTTP inbound endpoint into Composite source scope.
3) As an addition, add the quartz inbound endpoint into composite source scope and configure it at what time you want to run using cron expression.
This approach enables you option to trigger the flow using either HTTP URL or automated execution through quartz component using cron expression.
Please comment on this answer if you feel my understanding is wrong.
Do you simply want the app to run at scheduled intervals? If so, I think the Quartz connector would be you best choice.
Is this the scenario you are after?

Rest API to request a build passing parameters TFS 2013

I need to queue a build on TFS 2013 passing MSBuild arguments. I am currently making the below mentioned REST API call. This does not allow me to pass any other arguments other than Build definition id, reason and priority.
https://{account}.visualstudio.com/defaultcollection/{project}/_apis/build/requests?api-version={version}
I need to pass MSBUild argument like targetName for every build I queue. I need to achieve this using REST API and can not use TFS SDK . I have
looked all the APIS in the below link
https://www.visualstudio.com/en-us/integrate/api/overview
Could someone please suggest ways to achieve this?

Hudson build trigged by API

I was wondering if there was a way to do this in Hudson (or with any of the various plugins). My IDEAL scenario:
I want to trigger a build based on a job through a REST-like API, and on that build, I want it to return me a job ID. After-wards, I would like to poll this ID to see its status. When it is done, I would like to see the status, and the build number.
Now, since I can't seem to get that working, here is my current solution that I have yet to implement:
When you do a REST call to do a build, its not very REST-ful. It simply returns HTML, and I would have to do a kind of parsing to get the job ID. Alternatively, I can do a REST call for all the history listing all the jobs, and the latest one would be the one I just built. Once I have that, I can poll the console output for the output of the build.
Anyone know a way I can implement my "ideal" solution?
Yes, you can use the Hudson Remote API for this (as #Dan mentioned). Specifically, you need to configure your job to accept Remote Triggers (Job Configuration -> Build Triggers -> Trigger builds remotely) and then you can fire off a build with a simple HTTP GET to the right url.
(You may need to jump through a couple additional hoops if your Hudson requires authentication.)
I'm able to start a Hudson job with wget:
wget --auth-no-challenge --http-user=test --http-password=test "http://localhost:8080/job/My job/build?TOKEN=test"
This returns a bunch of HTML with a build number #20 that you could parse. The build number can then be used to query whether the job is done / successful.
You can examine the Hudson Remote API right from your browser for most of the Hudson web pages that you normally access by appending /api (or /api/xml to see the actual XML output), e.g. http://your-hudson/job/My job/api/.
Update: I see from your question that you probably know much of what I wrote. It is worth exploring the built-in Hudson API documentation a bit. I just discovered this tidbit that might help.
You can get the build number of the latest build (as plain text) from the URL: http://your-hudson/job/My job/lastBuild/buildNumber
Once you have the build number, I think the polling and job status is straightforward once you understand the API.
And what if you don't want the latest build number, but you want the build number of the build that was triggered by hitting the build URL ?
As far as I can tell, hitting that URL returns a 302 that redirects you to the job's mainpage, with no indication whatsoever of what the build number is of the one that you triggered.