Giter VIP home page Giter VIP logo

agent-server-parameter-plugin's Introduction

Agent Server Parameter Plugin

This plug-in is used to select the build server before building. If you have multiple build servers, you can use this plug-in to make a convenient selection before building. The plug-in will remember that the server you choose each time is convenient for the next build.

The advantage of using this plugin is that you may have multiple servers for building: project doc image

中文说明

basic configuration

In the project configuration page, select the "This project is parameterized" check box, add "Agent Server Parameter" parameter, create a parameter name, you can also click "Advanced" to set the default build server name, the default value is not a required option, if it is The default is the master server. project doc image

The method of reading parameter values at build time:

node{
    print params['agent-name']
}

Select the server before building

project doc image

The default value is updated after each server selection, which is convenient for the next build.

project doc image

Declarative Pipeline

pipeline {
   agent { label params['agent-name'] } 

   parameters{
      agentParameter name:'agent-name'
   }
   stages {
      stage('Hello') {
         steps {
            print params['agent-name'] 
         }
      }
   }
}

It is possible to create parameters in the build script, but because each execution of the build script creates a new "Agent Server Parameter" build parameter, the last selected value cannot be retained.

agent-server-parameter-plugin's People

Contributors

sunweisheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.