I can access most of a maven build's information through the Jenkins REST API, but I've not been able to find the ExecutedMojos, which I need for their timing information. I see that this information is available through Jenkins' Java API, but I'm not sure how to go interacting with Jenkins programmatically either.
Related
I've been able to successfully access all kinds of details around a release in Azure DevOps by leveraging the .NET client libraries (ex: Microsoft.VisualStudio.Services.Release.Client) that wrap the REST API. However, I can't seem to find what the object/property combination is that I would use to retrieve the comments that can be entered when kicking off a deployment to a specific environment.
To be clear, the comments I'm looking for are entered by hovering over an environment of a release and selecting "Deploy". On the right hand side there is a dialog in which comments can be entered and then another "Deploy" button is selected to kickoff the deployment.
Does anyone have any ideas on how these deployment comments can be read by using the Azure DevOps REST APIs or .NET client libraries?
You can use get release history REST API to get deploy comments:
Get https://vsrm.dev.azure.com/{Organization name}/{Project name}/_apis/Release/releases/{Release Id}/history?api-version=6.1-preview.1
Here is my sample:
Someone knows how I can GET the PROJECT's branching model via REST API. Not the repository. I can not find how to do it anywhere.
In bitbucket server I find it via web at https://mybitbucket.com/plugins/servlet/branchmodel/projects/{project-key}
I found it:
Is not in the actual version of REST API Documentation
(https://docs.atlassian.com/bitbucket-server/rest/5.14.0/bitbucket-rest.html)
Then, you can do GET request to:
https://mybitbucket.com/rest/branch-utils/1.0/projects/{project-key}/branchmodel/configuration
I have some build artifacts that have some debug information in them that I would like to display in a build summary. However, the only APIs I'm seeing for getting artifacts is as a zip file. If you go to the artifact screen and explore the artifacts, then copy the download URL, you get an API as:
https://{account}/_apis/resources/Containers/{container}?itemPath={file_name}
However, I can't seem to find a REST Client API to utilize this function in my ts script in the extension.
Any thoughts on how to get the actual files from this? The TS script needs to just grab the file and display it in the browser.
There isn’t such REST client API to do it.
You can call that API through HTTP request directly. To get container’s Id, you can use Get build artifacts REST API (in resource > data value).
There is an article about make http request.
5 Ways to Make HTTP Requests in Node.js
On the other hand, you don’t need to do it through extension, just call Logging Command (call command during build/release) to add additional information to build/release summary. (##vso[task.uploadsummary]local file path)
No luck over at the Atlassian Q/A board.
I'm trying to access bamboo project build version info via the REST API with the endpoint format:
http://bambooprod01.mysite.com:8085/rest/api/latest/plan/PROD-myproject?expand=variableContext
which returns an outdated version. When I view the information on bamboo I see the correct version of the build under the meta data tab, and above the info fields it states
"The following parameters have been manually overridden."
QUESTION: Is there a way to access the overridden variable info via a REST endpoint and if so what would the path be?
Got a response via Atlassian.
Atlassian Post
Unfortunately, this response has not being implemented and there is an
improvement request filed for that BAM-13511 - Expose the build
variables via the REST API OPEN.
I want to use the REST API that comes with Jenkins to generate a status page which shows all my projects, the environments they're currently deployed to, latest build versions etc.
Jenkins provides a nice REST API to expose this info however consuming the service is limited by cross domain restrictions. I have looked briefly at creating a CORS filter for my Jenkins instance but its overkill for what I'm trying to achieve.
Can someone tell me if its possible to modify my Jenkins WAR (instance) and add some HTML which i can then modify to call the RESTful endpoints? Ideally i want something whereby i can simply navigate to http://myjenkins/project-status and see the required information.
I assume your status page has some Javascript executing XMLHttpRequests. You could drop your status page files into $JENKINS_HOME/userContent directory on the master. This way they are served by Jenkins and should be able to access Jenkins REST APIs.