I found that all plugins are docker images, I want to know if I can support low level plugins, and provide some Hooks to allow users to do some custom operations.
For example, adding a default ${DRONE_YML}
is useful when most workflows are the same. For example, I have a use case where all repos execute latexmk -xelatex main.tex
, so if supported Hook, I can add a default ${DRONE_YML}
to a repo without ${DRONE_YML}
Func hook_after_clone() {
If ${DRONE_YML} not exists; then
Use predefined ${DRONE_YML}
Fi
}
In addition, take latexmk
as an example. If support hook, I can make drone
mount a directory and use mv ${WORKSPACE}/build/*.pdf /drone_mnt_volumn
in the hook to implement publish all the pdf
that compiled.
Func hook_after_step() {
If ${STEP_NAME} == "somestep" ;then
Do some thing
Fi
}
Func hook_after_pipline() {
If $(PIPLINE_NAME} == "somepip";then
Do some thing
Fi
}