-
Thanks for the idea. Will explore the approach of using entrypoint/environment combo. As to OneDev style docker container plugin, I do plan to add that, in a more advanced way, that is, instead of using a simple setting array, the plugin can leverage OneDev's typed parameter system as currently used as job parameters to make the plugin much easier to use.
-
Previous Value Current Value [Build] Add "container plugin" step type
[Build] Add "run container step" to run arbitrary container
-
OneDev
changed state to 'Closed' 4 years ago
Previous Value Current Value Open
Closed
-
OneDev
changed state to 'Released' 4 years ago
Previous Value Current Value Closed
Released
-
State changed as build #2193 is successful
| Type |
New Feature
|
| Priority |
Normal
|
| Assignee |
Issue Votes (0)
It would be nice if we could have a step type that allowed us to run containers with unchanged entrypoints (not setting it to sh, or other shell) and have the ability to pass environment variables to the containers (like
docker -e). That would allow us to use Drone/Woodpecker/Vela plugins, as they are just containers with specific entrypoints configured by environment variables, like:CI_*for WoodpeckerDRONE_*for Drone andPARAMETER_*for VelaYou would not need to support those plugins, as they are written for different tools, but allowing users to run container's entrypoint unchanged and passing environment variable would already allow us to use it and write our own plugins for using with Onedev.
Additionally, if you want to, you could write a guide and have your own config style for plugins in Onedev's build spec, like:
Drone uses a
settingsarray, that internally, get converted to environment like:Get converted to
DRONE_CHANNEL=developersandDRONE_USERNAME=droneSimilarly, Woodpekcer (a Drone fork) convert
settingsarray toCI_*env vars. Vela do the same thing but name the array asparametersinstead ofsettings. So, additionally to environment variables input field, Onedev could have asettingsfield in the build spec that gets passed to containers as something likeONEDEV_USERNAME=onedev.