前端:
node {
def env = "$USER_ENV"
def name = env.split("-")[0]
def ip = env.split("-")[1]
def actenv = env.split("-")[2]
def remote = [:]
remote.name = name
remote.host = ip
remote.user = 'root'
remote.password = 'pos2020.1'
remote.allowAnyHosts = true
def gitUrl = 'http://47.92.11.135:9999/pos/gq-pos-admin.git'
def projectPath = '/usr/local/nginx'
def location_path = "pos_admin_${actenv}"
def localTarget = "pos_admin_${actenv}.tar"
stage('Preparation') { // for display purposes
// Get some code from a Git