Skip to content
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

feat: Build diff line-pattern REGEX, provide your own API token for profile #180

Merged
merged 4 commits into from
Dec 4, 2022

Conversation

ismet55555
Copy link
Owner

@ismet55555 ismet55555 commented Dec 4, 2022

Change Motivation

(A very brief summary on why you made these changes)

  • Ability to specify what part of the build info/logs you want to diff using REGEX. This can be specifically helpful if log lines contain naturally differences such as datetime
  • Ability to bring your own API token to be added to a yojenkins profile

Describe the Changes Made

(A very brief summary on what changes you made)

  • Added --line-pattern option to yojenkins build diff such that a user can exactly specify which part of the log lines to diff.
    • Looking at only text after the ">" character in each line: yojenkins build diff <BUILD 1> <BUILD 2> --line-pattern "(?<=>).+"
  • Added a way to add your own API token to a yojenkins profile without needing to manually open the ~/.yojenkins/credential file and adding the token there.
    • Adding provided token to my-profile profile: yojenkins auth token --profile my-profile --token <TOKEN>
  • Updated job and monitor display such that status texts will have underscores replaced with spaces "MY_STATUS" --> "MY STATUS"

Change Type

(Check any that apply)

  • Bug Fix
  • New Feature
  • Code Refactoring
  • Documentation
  • Formatting
  • Automation
  • Unit Tests
  • Other

How Has This Been Tested?

(Please describe the tests/commands that you ran to verify your changes)

Locally on a local Jenkins server


Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings

@ismet55555 ismet55555 self-assigned this Dec 4, 2022
@ismet55555 ismet55555 added bug Something isn't working enhancement New feature or request labels Dec 4, 2022
@ismet55555 ismet55555 merged commit 1b39b31 into main Dec 4, 2022
@ismet55555 ismet55555 deleted the diff-pattern branch December 4, 2022 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant