Giter VIP home page Giter VIP logo

jenkinsci / add-changes-to-build-changelog-plugin Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 55 KB

This plugin was aimed at adding changes to a Jenkins build that didn't come from SCM information. Maybe the changes were calculated outside of Jenkins, but someone wanted to show those changes in the Jenkins UI.

Home Page: https://plugins.jenkins.io/add-changes-to-build-changelog/

License: MIT License

Java 100.00%
misc

add-changes-to-build-changelog-plugin's Introduction

Build Status cd

Add Changes to Build Changelog Plugin

About

This plugin was aimed at adding changes to a Jenkins build that didn't come from SCM information. Maybe the changes were calculated outside of Jenkins, but someone wanted to show those changes in the Jenkins UI.

Target Audience

Stack Overflow had a lot of questions regarding adding custom changes to the Jenkins change log, but there was no easy way to do this. Most relied on knowing the Jenkins internals and scripting. Thus, this plugin was created to help.

For example, here are some of those questions:

Jenkins - Updating build changelog during build step

Is there a way to set/change the changeSet (changelog) content from pipeline script? Needed for preflight type of job

Generating Custom GitSCM Changelog in Jenkins Pipeline

insert custom changelog to Jenkins job

Jenkins: Modify the ChangeSet List to have changes since last successful build

Jenkins Plugin for Writing to the Change Log?

Usage

  • Freestyle Jobs
  • Pipeline

Pipeline Builds

Note Internally, anything you add to the build will be treated as a Git change.

Example pipeline script:

node {
    def text = '''
	{
		"changes": [
			{
				"commit": "364cd043160d870b655f66c5925b18b9e14961e1",
				"author": "Jane Doe",
				"email": "[email protected]",
				"date": "2023-02-03 07:30:05 +0000",
				"message": "My git change.",
				"paths": [
					{ "path": "hello.txt", "modified": true, "deleted": false, "added": false }
				]
			}
		]
	}
	'''
    
    // Read in the changes via text
    addchangestobuildchangelog changelogText: text
    
    // Read in the changes via file path
    writeFile file: 'changelog.txt', text: text
    addchangestobuildchangelog changelogPath: 'changelog.txt'
}

Freestyle Builds

Note At the moment, you can only specify Git SCM as the default checkout type. The other SCM types (like SVN, etc) are not support yet. If you want to use this plugin and do not have a git repository, then specify an empty git repository to get around that restriction.

Screenshot:

Example git changelog text:

{
	"changes": [
		{
			"commit": "364cd043160d870b655f66c5925b18b9e14961e1",
			"author": "Jane Doe",
			"email": "[email protected]",
			"date": "2023-02-03 07:30:05 +0000",
			"message": "My git change.",
			"paths": [
				{ "path": "hello.txt", "modified": true, "deleted": false, "added": false }
			]
		}
	]
}

Contributing

Any and all contributions welcome!

License

Licensed under MIT, see LICENSE

add-changes-to-build-changelog-plugin's People

Contributors

danielomoto avatar rahulsom avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rahulsom

add-changes-to-build-changelog-plugin's Issues

Any possibility of support for older Jenkins versions?

What feature do you want to see added?

My company uses an older version of Jenkins at this time. Much older. 2.303. It is not in my control to update this.
If there was any way for this plugin to support older versions I would definitely use it.
If that is not possible, I understand. Thank you.

Upstream changes

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.