pipeline

2020-05-22  本文已影响0人  夏天_9b7d

pipeline 示例文件

pipeline {
    
    environment {
    MSBUILD = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"
    CONFIG = 'Release'
    PLATFORM = '86'
  }
  
    agent any 
    stages {
        stage('pull') { 
            steps {
                checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '821f0827-c881-4a6b-9c39-5628e290c5d1', url: 'git@192.168.1.208:root/hellocpp_line.git']]])
  
            }
        }
        
          
      stage('Build') { 
            steps {
                //bat "NuGet.exe restore RemoteDrive.sln"
                bat "\"${MSBUILD}\" hellocpp.sln /p:Configuration=Release;Platform=x86"
      
            }
        }
        
    }
}

environment 指定编译环境

上一篇下一篇

猜你喜欢

热点阅读