Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two more maven related env #158

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions config/templates/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ spec:
description: "Additional Maven arguments, useful for temporary adding arguments like -X or -am -pl ."
required: false
defaultValue: ""
- key: MAVEN_MIRROR_URL
type: string
description: "With Repositories you specify from which locations you want to download certain artifacts, such as dependencies and maven-plugins."
required: false
defaultValue: ""
- key: MAVEN_CLEAR_REPO
type: boolean
description: "If set then the Maven repository is removed after the artifact is built. This is useful for keeping the created application image small, but prevents incremental builds. The default is false"
required: false
defaultValue: ""
- key: ARTIFACT_DIR
type: string
description: "Path to target/ where the jar files are created for multi module builds. These are added to ${MAVEN_ARGS}"
Expand All @@ -44,11 +54,6 @@ spec:
description: "Arguments to use when copying artifacts from the output dir to the application dir. Useful to specify which artifacts will be part of the image. It defaults to -r hawt-app/* when a hawt-app dir is found on the build directory, otherwise jar files only will be included (*.jar)."
required: false
defaultValue: ""
- key: MAVEN_CLEAR_REPO
type: boolean
description: "If set then the Maven repository is removed after the artifact is built. This is useful for keeping the created application image small, but prevents incremental builds. The default is false"
required: false
defaultValue: ""
- key: JAVA_APP_DIR
type: string
description: "the directory where the application resides. All paths in your application are relative to this directory. By default it is the same directory where this startup script resides."
Expand Down Expand Up @@ -141,6 +146,6 @@ spec:
defaultValue: ""
codeFramework: java
defaultBaseImage: kubespheredev/java-8-centos7:latest
version: 0.0.1
version: 0.0.2
description: "This is a builder template for Java builds whose result can be run directly without any further application server.It's suited ideally for microservices with a flat classpath (including \"far jars\")."
iconPath: assets/java.png
17 changes: 11 additions & 6 deletions config/templates/tomcat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ spec:
description: "Additional Maven arguments, useful for temporary adding arguments like -X or -am -pl ."
required: false
defaultValue: ""
- key: MAVEN_MIRROR_URL
type: string
description: "With Repositories you specify from which locations you want to download certain artifacts, such as dependencies and maven-plugins."
required: false
defaultValue: ""
- key: MAVEN_CLEAR_REPO
type: boolean
description: "If set then the Maven repository is removed after the artifact is built. This is useful for keeping the created application image small, but prevents incremental builds. The default is false"
required: false
defaultValue: ""
- key: ARTIFACT_DIR
type: string
description: "Path to target/ where the jar files are created for multi module builds. These are added to ${MAVEN_ARGS}"
Expand All @@ -44,11 +54,6 @@ spec:
description: "Arguments to use when copying artifacts from the output dir to the application dir. Useful to specify which artifacts will be part of the image. It defaults to -r hawt-app/* when a hawt-app dir is found on the build directory, otherwise jar files only will be included (*.jar)."
required: false
defaultValue: ""
- key: MAVEN_CLEAR_REPO
type: boolean
description: "If set then the Maven repository is removed after the artifact is built. This is useful for keeping the created application image small, but prevents incremental builds. The default is false"
required: false
defaultValue: ""
- key: JAVA_APP_DIR
type: string
description: "the directory where the application resides. All paths in your application are relative to this directory. By default it is the same directory where this startup script resides."
Expand Down Expand Up @@ -141,6 +146,6 @@ spec:
defaultValue: ""
codeFramework: java
defaultBaseImage: kubespheredev/tomcat85-java8-centos7:latest
version: 0.0.1
version: 0.0.2
description: "This is a builder template for Java builds whose result can be run directly with Tomcat application server."
iconPath: assets/tomcat.png
2 changes: 1 addition & 1 deletion pkg/apis/devops/v1alpha1/s2ibuildertemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Parameter struct {
Value string `json:"value,omitempty"`
}

func (p *Parameter) ToEnvonment() *EnvironmentSpec {
func (p *Parameter) ToEnvironment() *EnvironmentSpec {
var v string
if p.Value == "" && p.DefaultValue != "" {
v = p.DefaultValue
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/s2irun/ksbuilder_jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (r *ReconcileS2iRun) NewConfigMap(instance *devopsv1alpha1.S2iRun, config d
}
if len(template.Parameters) > 0 {
for _, p := range template.Parameters {
e := p.ToEnvonment()
e := p.ToEnvironment()
if e != nil {
config.Environment = append(config.Environment, *e)
}
Expand Down