Hi,
I try to use load statement from your example here https://github.com/drone/drone/issues/2585 .
Gives this error
cannot load pipeline.star: starlark: cannot load external scripts
I already read from starlark docs, and it can be used for centralized pipeline execution
# Starlark in Go: Language definition
Starlark is a dialect of Python intended for use as a configuration
language. A Starlark interpreter is typically embedded within a larger
application, and this application may define additional
domain-specific functions and data types beyond those provided by the
core language. For example, Starlark is embedded within (and was
originally developed for) the [Bazel build tool](https://bazel.build),
and [Bazel's build language](https://docs.bazel.build/versions/master/starlark/language.html) is based on Starlark.
This document describes the Go implementation of Starlark
at go.starlark.net/starlark.
The language it defines is similar but not identical to
[the Java-based implementation](https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/starlark/Starlark.java)
used by Bazel.
We identify places where their behaviors differ, and an
[appendix](#dialect-differences) provides a summary of those
differences.
We plan to converge both implementations on a single specification.
This file has been truncated. show original
Is it not implemented yet?
This is my files
.drone.star
load("pipeline.star", "func")
def main(ctx):
return {
"kind": "pipeline",
"name": "build",
"steps": [
{
"name": "build",
"image": "alpine",
"commands": [
"echo %s" % ctx,
]
},
func("test")
]
}
pipeline.star
def main(var):
return {
"name": "test",
"image": "alpine",
"commands": [
"echo %s" % var,
],
"when": [
"sucess",
"failure"
]
}
correct, loading external scripts is not implemented
@bradrydzewski Thanks for your confirmation.
Is there a hint when will it be implemented, in the near future or will never?
Because I have a urgent need to make centralized pipeline to manage microservices repo that spans to >100 in number.
I need to have some pipeline template repo to make widespread changes easier.
Or do you have a workaround for that problem?