PATH environment printed out as below
[e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA] Running shell
script
+ echo /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
google-chrome is available at /usr/bin/google-chrome
My Jenkinsfile
pipeline {
agent { docker { image 'maven:3.3.3' } }
stages {
stage('build') {
steps {
sh 'mvn clean install'
}
}
stage('test') {
steps {
sh 'echo $PATH'
sh './ng e2e'
}
}
}
}
My protractor.config.js
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['--no-sandbox', '--headless', '--disable-gpu',
'--window-size=800,600']
}
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace:
true } }));
}
};
Regards
On Friday, 4 May 2018 18:09:47 UTC+8, Victor Martinez wrote:
>
> Can you confirm whether the PATH and environment is correctly configured
> when running the pipeline in the agent? If you run at the very beginning
> something like the below snippet:
>
> ...
> sh 'echo $PATH'
> ...
>
> If /usr/bin is not part of the path, then you need to figure out how to
> configure it in the agent itself or explicitly override it with some
> withEnv step for instance.
>
> Cheers
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/188e7a45-fdaf-4f04-8790-a7930b572e4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.