File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,9 +125,12 @@ export class Generate {
125125
126126 // if the devfile has a starter project, we use it for the devWorkspace
127127 if ( devfileCopy . starterProjects && devfileCopy . starterProjects . length > 0 ) {
128- devWorkspace . spec . template . attributes = {
129- 'controller.devfile.io/use-starter-project' : devfileCopy . starterProjects [ 0 ] . name ,
130- } ;
128+ if ( devWorkspace . spec . template . attributes === undefined ) {
129+ devWorkspace . spec . template . attributes = { } ;
130+ }
131+ const starterProjectName = devfileCopy . starterProjects [ 0 ] . name ;
132+ // add starter projects to the devWorkspace
133+ devWorkspace . spec . template . attributes [ 'controller.devfile.io/use-starter-project' ] = starterProjectName ;
131134 }
132135
133136 // for now the list of devWorkspace templates is only the editor template
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ metadata:
9494schemaVersion: 2.2.0
9595metadata:
9696 name: starter-project
97+ attributes:
98+ controller.devfile.io/storage-type: ephemeral
9799starterProjects:
98100 - name: go-starter
99101 description: A Go project
@@ -130,6 +132,7 @@ metadata:
130132 routingClass : 'che' ,
131133 template : {
132134 attributes : {
135+ 'controller.devfile.io/storage-type' : 'ephemeral' ,
133136 'controller.devfile.io/use-starter-project' : 'go-starter' ,
134137 } ,
135138 starterProjects : [
You can’t perform that action at this time.
0 commit comments