I got it working with 

steps {
                script {
                    configFileProvider([configFile(fileId: 
'maven-user-settings', variable: 'MVN_USER_SETTINGS'), configFile(fileId: 
'maven-global-settings', variable: 'MVN_GLOBAL_SETTINGS')]){
                       def MVN = "mvn -U -B -gs ${env.MVN_GLOBAL_SETTINGS} 
-s ${env.MVN_USER_SETTINGS} -Dmaven.repo.local=${env.WORKSPACE}/.repository"
                       sh "$MVN   mvnpom:copy-pom 
-Dmvnpom.pom=vcenter-esx-dhcp.xml -Dmvnpom.forceWrite=true"
                       sh "$MVN  verify -Dsource=${source} 
-DvcenterHost=${params.vcenterHost} -DesxHost=${params.esxHost} 
-DvmName=${params.vmName} -DvmDatastore=${params.vmDatastore} 
-DdiskMode=${params.diskMode}"
                    }
                }
            }

basically, i need to use script and env.xxx

On Sunday, January 1, 2017 at 1:16:45 AM UTC-8, Dan Tran wrote:
>
>
> Hi,
>
> I am experimenting with declarative pipeline and try to port this 
>
>    configFileProvider([configFile(fileId: 'maven-user-settings', variable: 
> 'MVN_USER_SETTINGS'), configFile(fileId: 'maven-global-settings', variable: 
> 'MVN_GLOBAL_SETTINGS')]) {
>
>       def MVN = 'mvn -B -gs $MVN_GLOBAL_SETTINGS -s $MVN_USER_SETTINGS 
> -Dmaven.repo.local=${WORKSPACE}/.repository 
> -Dmaven.test.failure.ignore=true'
>
>       stage ('build') {
>          sh "${MVN} xxxx
>       }
>
>    }
>
>
> How do I do new model?
>
>
>
> Very much appreciate any help/advice
>
> Thanks
>
> -Dan
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/94cfb615-5bc2-4e64-9b2b-9c25a8d84e79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to