freeleaps-ops/operators/freeleaps-gitops-initializer/internal/jenkins/templates/Jenkinsfile.tpl
zhenyus f34f9838a5 chore(git): code staging
Signed-off-by: zhenyus <zhenyus@mathmast.com>
2025-02-17 18:14:40 +08:00

28 lines
1.1 KiB
Smarty

library 'first-class-pipeline'
executeFreeleapsPipeline {
serviceName = [[ .ServiceName | quote ]]
environmentSlug = [[ .EnvironmentSlug | quote ]]
serviceGitBranch = [[ .Spec.Repository.Branch | quote ]]
serviceGitRepo = [[ .GitRepoURL | quote ]]
serviceGitRepoType = [[ .Spec.Repository.Type | quote ]]
serviceGitCredentialsId = [[ .JenkinsGitCredentialsId | quote ]]
executeMode = [[ .Spec.ContinuousIntegrationSpec.ExecuteMode | quote ]]
commitMessageLintEnabled = [[ .Spec.ContinuousIntegrationSpec.CommitMessageLintEnabled ]]
components = [
[[- range $component := .Spec.ContinuousIntegrationSpec.Components ]]
[
name: [[ $component.Name | quote ]],
root: [[ $component.Root | quote ]],
language: [[ $component.Language | quote ]],
dependenciesManager: [[ $component.DependenciesManager | quote ]],
[[- if and (eq $component.DependenciesManager "npm") ($component.NPMPackageJsonFile) ]]
npmPackageJsonFile: [[ $component.NPMPackageJsonFile | quote ]],
[[- end ]]
[[- if $component.BuildCacheEnabled ]]
buildCacheEnabled: [[ $component.BuildCacheEnabled ]],
[[- end ]]
]
[[- end ]]
]
}