Documentation
¶
Overview ¶
Package assets provides embedded resources for the divekit CLI including CI templates, scripts, and example files used for project initialization and distribution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultEvaluationCIYaml []byte
DefaultEvaluationCIYaml contains the default GitLab CI configuration for evaluation repositories.
var DefaultMainCIYaml []byte
DefaultMainCIYaml contains the default GitLab CI configuration for work repositories.
var DefaultWorkEvalTriggerYaml []byte
DefaultWorkEvalTriggerYaml contains the default trigger job included by work repositories.
var HasReadmeExampleGo []byte
HasReadmeExampleGo contains a README check example in Go.
var HasReadmeExampleJS []byte
HasReadmeExampleJS contains a README check example in JavaScript.
var HasReadmeExampleJava []byte
HasReadmeExampleJava contains a README check example in Java.
var HasReadmeExampleKotlin []byte
HasReadmeExampleKotlin contains a README check example in Kotlin.
var HasReadmeExampleLua []byte
HasReadmeExampleLua contains a README check example in Lua.
var HasReadmeExamplePython []byte
HasReadmeExamplePython contains a README check example in Python.
var HasReadmeExampleShell []byte
HasReadmeExampleShell contains a README check example in Shell script.
var HasReadmeExampleTS []byte
HasReadmeExampleTS contains a README check example in TypeScript.
var JavaTransformers []byte
JavaTransformers contains Lua transformation scripts for Java projects.
var RunWorkflowHasReadmeGoManifest []byte
RunWorkflowHasReadmeGoManifest contains a Go run workflow manifest example.
var RunWorkflowHasReadmeGoMod = []byte("module divekit_has_readme_workflow\n\ngo 1.22\n")
RunWorkflowHasReadmeGoMod contains a Go run workflow module file example.
var RunWorkflowHasReadmeGoWorkflow []byte
RunWorkflowHasReadmeGoWorkflow contains a Go run workflow example.
var RunWorkflowHasReadmeJSManifest []byte
RunWorkflowHasReadmeJSManifest contains a JavaScript run workflow manifest example.
var RunWorkflowHasReadmeJSWorkflow []byte
RunWorkflowHasReadmeJSWorkflow contains a JavaScript run workflow example.
var RunWorkflowHasReadmeJavaManifest []byte
RunWorkflowHasReadmeJavaManifest contains a Java run workflow manifest example.
var RunWorkflowHasReadmeJavaWorkflow []byte
RunWorkflowHasReadmeJavaWorkflow contains a Java run workflow example.
var RunWorkflowHasReadmeKotlinManifest []byte
RunWorkflowHasReadmeKotlinManifest contains a Kotlin run workflow manifest example.
var RunWorkflowHasReadmeKotlinWorkflow []byte
RunWorkflowHasReadmeKotlinWorkflow contains a Kotlin run workflow example.
var RunWorkflowHasReadmeLua []byte
RunWorkflowHasReadmeLua contains a Lua run workflow example.
var RunWorkflowHasReadmePythonManifest []byte
RunWorkflowHasReadmePythonManifest contains a Python run workflow manifest example.
var RunWorkflowHasReadmePythonWorkflow []byte
RunWorkflowHasReadmePythonWorkflow contains a Python run workflow example.
var RunWorkflowHasReadmeShellManifest []byte
RunWorkflowHasReadmeShellManifest contains a Shell run workflow manifest example.
var RunWorkflowHasReadmeShellWorkflow []byte
RunWorkflowHasReadmeShellWorkflow contains a Shell run workflow example.
var RunWorkflowHasReadmeTSManifest []byte
RunWorkflowHasReadmeTSManifest contains a TypeScript run workflow manifest example.
var RunWorkflowHasReadmeTSWorkflow []byte
RunWorkflowHasReadmeTSWorkflow contains a TypeScript run workflow example.
Functions ¶
func PinsCLIImage ¶
PinsCLIImage reports whether rendering the asset pins a CLI version and with it the CLI runtime image of that version.
func RenderDevelopmentEvaluationPipelineAsset ¶
RenderDevelopmentEvaluationPipelineAsset renders an asset for a build that has no release version. No CLI runtime image is published for such a build, so the CLI jobs start in the base image of the pipeline, which still provides wget for a CLI fetched from DIVEKIT_CLI_URL.
It fails when the template no longer has the lines it rewrites. Rendering the release image anyway would pin an image that does not exist, and the caller would warn that it had not.
func RenderEvaluationPipelineAsset ¶
RenderEvaluationPipelineAsset replaces runtime placeholders in embedded evaluation pipeline assets before they are written into projects.
It is meant for release versions, which pin the CLI runtime image published for that release. Courses consume the rendered file, so that rendering is nothing but the placeholder substitution. A build without a release version goes through RenderDevelopmentEvaluationPipelineAsset instead.
Types ¶
type EvaluationPipelineTemplateError ¶
EvaluationPipelineTemplateError reports that the evaluation pipeline template lost a line that rendering for a development build rewrites. Callers match it with errors.As to tell a template drift from other render failures.
func (*EvaluationPipelineTemplateError) Error ¶
func (e *EvaluationPipelineTemplateError) Error() string
func (*EvaluationPipelineTemplateError) Unwrap ¶
func (e *EvaluationPipelineTemplateError) Unwrap() error
Unwrap returns the cause. A nil receiver has no cause, so errors.Is does not panic on a wrapped typed nil.