Giter Club home page Giter Club logo

content-replace-plugin's Introduction

Content-replace plugin for Jenkins

Build Status

A plugin for Jenkins allows you to replace file content with regex expressions.

Features

  • Regex expression for search. e.g. (Version=)([0-9]+\.[0-9]+\.[0-9]+)
  • You can use variables enclosed in ${}

Requirements

Jenkins

Jenkins version 2.204.6 or newer is required.

Freestyle job configuration

Freestyle

Pipeline job configuration

contentReplace(
  configs: [
    fileContentReplaceConfig(
      configs: [
        fileContentReplaceItemConfig(
          search: '(Version=)([0-9]+\\.[0-9]+\\.[0-9]+)',
          replace: '$11.0.${BUILD_ID}',
          matchCount: 1,
          verbose: false,
        )
      ],
      fileEncoding: 'UTF-8',
       'versions.txt'
    )
  ]
)

Changelog

Version 1.7.0 (Feb 04, 2022)

  • Add, support verbose output control

Version 1.6.0 (Dec 19, 2020)

  • Update the required version of Jenkins to v2.204.6

Version 1.5.0 (Jan 19, 2020)

  • Add, support filepath of Ant path style

Version 1.4.0 (Jan 09, 2020)

  • Fixed, contentReplace does not appear in the Snippet Generator

Version 1.3.0 (Dec 07, 2019)

  • enables RegEx multiline mode
  • print replace lines info
  • beautify log

Version 1.2.0 (Nov 23, 2019)

  • Move docs to GitHub

Version 1.1.0 (Nov 18, 2019)

  • New, make failure immediately

Version 1.0.10 (Aug 20, 2019)

  • Fixed, match count

Version 1.0.8 (Aug 09, 2019)

  • Fixed, close InputStream after read the file‘s content

Version 1.0.7 (June 21, 2019)

  • Fixed, matchCount not to be reset to 1 When editing the configuration file again

Version 1.0.5 (Apr 07, 2019)

  • Fixed, support windows slave, linux master

Version 1.0.4 (Feb 21, 2019)

  • Fixed, support for absolute path file
  • Fixed, matchCount not to be reset to 1 When editing the configuration file again

Version 1.0.3 (Feb 19, 2019)

  • "File path" can be configured using variables

Version 1.0.2 (Oct 26, 2018)

  • Add "Match count" config

Version 1.0.1 (Aug 22, 2018)

  • Simply replace the contents of the specified encoded file

content-replace-plugin's People

Contributors

moxun1639 avatar res0nance avatar

Watchers

 avatar

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.