Jenkins deployment springboot steps

  1. Install jenkins

  2. Configure jdk, git, maven

    Do not choose automatic installation, automatic installation will be invalid

  3. Install necessary plugins

    In addition to starting the installation, install maven (you can choose to build the maven project when creating a new job)

    Install Git Parameter plug-in, Maven Integration, Pulish Over SSH plug-in

    • Select branch
      • Select This project is parameterized in general, add parameters and select git parameter
      • Define parameter name, eg: branch
      • Parameter type selection branch
      • Set default value origin/master
      • In the source code management , the specified branch is changed to the parameter name defined before, eg: $branch
    • test
      • The build will change to build with parameters
  4. The new task is based on maven

  5. Configure git address and git password

  6. Configure the shell script to be executed after packaging is completed

    echo "==========定义常量=========="
    APP_NAME=jenkins

Guess you like

Origin blog.csdn.net/caidingnu/article/details/129477716