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

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

Hard-coded image PATH #5

Open micaherne opened 8 months ago

micaherne commented 8 months ago

We currently have the PATH from the Docker container duplicated in the withMoodlePluginCiContainer step code: https://github.com/University-of-Strathclyde-LTE-Team/moodle-plugin-ci-jenkins/blob/v0.4.1/vars/withMoodlePluginCiContainer.groovy#L91

This is to enable the path to the moodle-plugin-ci binary - which is in the mounted workspace - to be added to the PATH. Unfortunately there is no way that I can find to add anything to the PATH of a container, apart from passing the PATH environment variable in the launch parameters. This requires the whole PATH value to be given.

There's some detail on this at https://issues.jenkins.io/browse/JENKINS-49076

It may be that we could get around this by building moodle-plugin-ci into the image itself rather than getting the latest version into the workspace, but this may well cause other complications.