#! /usr/bin/env groovy
pipeline {
agent any
stages {
stage('Build') {
steps {
script {
powershell '$env:Path'
powershell
'$env:PYTHONPATH'
powershell
'$env:PYTHONPATH = "../../dir" '
powershell
'$env:PYTHONPATH'
The value for Path is printed, but nothing else.
The snippit generator gives me that syntax.
The other confusing thing is that I get the same result with and without the PowerScript plugin. So don’t understand what the plugin is supposed to be giving me.
Thanks
Doesn’t answer my original question, but is a valid work around.
#! /usr/bin/env groovy
pipeline {
agent {label 'windows'}
parameters {
string(name: 'Version',
defaultValue: '0.1', description: 'What is the release version?')
}
environment {
PYTHONPATH =
"../DifferentDir"
}
stages {
stage('Build') {
steps {
script {
powershell '''
cd WebApp;
..\\..\\..\\..\\Python27\\Lib\\venv\\scripts\\nt\\Activate.ps1;
python -m BuildTools.build_codebase
$env:Version clean package
'''
}
}
}
This is without the Powershell plugin, still don’t understand what that plugin does.
--To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3632e63e-f0c1-408a-b851-cd9ee98fe615%40googlegroups.com.
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+unsubscribe@googlegroups.com.