-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Jenkins] Add build stages #960
base: main
Are you sure you want to change the base?
[Jenkins] Add build stages #960
Conversation
…ation' of https://github.com/port-labs/ocean into PORT-9873-add-jenkins-pipeline-stages-to-jenkins-integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
Co-authored-by: PagesCoffy <isaac.p.coffie@gmail.com>
…ation' of https://github.com/port-labs/ocean into PORT-9873-add-jenkins-pipeline-stages-to-jenkins-integration
…ation' of https://github.com/port-labs/ocean into PORT-9873-add-jenkins-pipeline-stages-to-jenkins-integration
…ation' of https://github.com/port-labs/ocean into PORT-9873-add-jenkins-pipeline-stages-to-jenkins-integration
class JenkinStagesResourceConfig(ResourceConfig): | ||
class JenkinStageSelector(Selector): | ||
query: str | ||
job_url: str = Field(alias="jobUrl", required=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in terms of the user experience, I was just wondering why we're using the job_url instead of the job_name. is the job_url easier or the same as the name? maybe you can share a sample format for the job_url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of user experience, we use the job_url instead of the job_name primarily for consistency and reliability. Job names can contain spaces or special characters, which require URL encoding, and this can lead to issues if not handled correctly. On the other hand, the job_url is a complete and fully encoded reference to the job, making it more straightforward to work with.
Here are some examples:
http://localhost:8080/job/Phalbert/job/airframe-react/
http://localhost:8080/job/limbopay/job/Limbo%20Core/job/main/
The second url would have the job name Limbo Core
in the jenkins dashboard.
In this format, the job_url already includes everything necessary to make API requests (such as appending /api/json
), eliminating the need for additional encoding steps. By using job_url, we avoid potential errors related to name encoding and ensure the API calls are more predictable.
After all, the Job URL is always returned as a property and a user can copy and paste in the mapping.
Description
stage
jenkinsStage
Implementation
Utilized the Jenkins API provided by the pipeline-stage-view-plugin to retrieve pipeline stage information.
The API returns details such as stage IDs, names, statuses, start times, durations, and links to each stage, as shown in the example JSON response below:
Additional Context: For more details and ongoing discussion, please refer to the linked Slack thread: Jira Task Discussion.
Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
API Documentation
Provide links to the API documentation used for this integration.