University-of-Strathclyde-LTE-Team / moodle-plugin-ci-jenkins

A Jenkins shared library for running moodle-plugin-ci
2 stars 1 forks source link

Environment variables not picked up by moodle-plugin-ci #6

Open micaherne opened 8 months ago

micaherne commented 8 months ago

We currently have an unpleasant hack which creates a .env file in order to pass the required environment variables to the moodle-plugin-ci script: https://github.com/University-of-Strathclyde-LTE-Team/moodle-plugin-ci-jenkins/blob/v0.4.1/vars/withMoodlePluginCiContainer.groovy#L123

It should be possible, and much preferable, to pass these as actual environment variables in the container.

However, when I did this using the withEnv step they were not picked up by the script. (I have no idea why, and it's possible I may just have done something wrongly.)