Skip to content

Commit

Permalink
feat: support sbt accelerate
Browse files Browse the repository at this point in the history
  • Loading branch information
hyy0322 committed Aug 23, 2020
1 parent e039aab commit 1c51468
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/server/biz/accelerator/accelerate.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func NewAccelerator(tenant, project string, wfr *v1alpha1.WorkflowRun) *Accelera
// - '/root/.m2' maven dependency path
// - '/root/.gradle' gradle dependency path
// - '/root/.npm' npm dependency path
// - '/root/.sbt' sbt dependency path
// - '/root/.ivy2' sbt dependency path
// - '/root/.cache' sbt dependency path
func (a *Accelerator) Accelerate() {
if !a.allowed() {
return
Expand All @@ -70,6 +73,21 @@ func (a *Accelerator) Accelerate() {
Path: fmt.Sprintf("%s/%s/npm", common.CachePrefixPath, a.project),
MountPath: "/root/.npm",
},
{
Type: v1alpha1.PresetVolumeTypePVC,
Path: fmt.Sprintf("%s/%s/sbt/cache", common.CachePrefixPath, a.project),
MountPath: "/root/.cache",
},
{
Type: v1alpha1.PresetVolumeTypePVC,
Path: fmt.Sprintf("%s/%s/sbt/ivy2", common.CachePrefixPath, a.project),
MountPath: "/root/.ivy2",
},
{
Type: v1alpha1.PresetVolumeTypePVC,
Path: fmt.Sprintf("%s/%s/sbt/sbt", common.CachePrefixPath, a.project),
MountPath: "/root/.sbt",
},
}...)
}
}
Expand Down

0 comments on commit 1c51468

Please sign in to comment.