@@ -9,42 +9,85 @@ Sample index file:
9
9
[
10
10
{
11
11
"name": "java-maven",
12
- "version": "1.1.0",
13
12
"displayName": "Maven Java",
14
13
"description": "Upstream Maven and OpenJDK 11",
15
14
"type": "stack",
16
15
"tags": [
17
16
"Java",
18
17
"Maven"
19
18
],
19
+ "architectures": [
20
+ "amd64",
21
+ "arm64",
22
+ "s390x"
23
+ ],
20
24
"projectType": "maven",
21
25
"language": "java",
22
- "links": {
23
- "self": "devfile-catalog/java-maven:latest"
24
- },
25
- "resources": [
26
- "devfile.yaml"
27
- ],
28
- "starterProjects": [
29
- "springbootproject"
26
+ "versions": [
27
+ {
28
+ "version": "1.1.0",
29
+ "schemaVersion": "2.1.0",
30
+ "default": true,
31
+ "description": "Upstream Maven and OpenJDK 11",
32
+ "tags": [
33
+ "Java",
34
+ "Maven"
35
+ ],
36
+ "architectures": [
37
+ "amd64",
38
+ "arm64",
39
+ "s390x"
40
+ ],
41
+ "links": {
42
+ "self": "devfile-catalog/java-maven:1.1.0"
43
+ },
44
+ "resources": [
45
+ "devfile.yaml"
46
+ ],
47
+ "starterProjects": [
48
+ "springbootproject"
49
+ ]
50
+ }
30
51
]
31
52
},
32
53
{
33
- "name": "java-openliberty",
34
- "version": "0.5.0",
35
- "displayName": "Open Liberty",
36
- "description": "Java application stack using Open Liberty runtime",
54
+ "name": "java-quarkus",
55
+ "displayName": "Quarkus Java",
56
+ "description": "Quarkus with Java",
37
57
"type": "stack",
38
- "projectType": "docker",
39
- "language": "java",
40
- "links": {
41
- "self": "devfile-catalog/java-openliberty:latest"
42
- },
43
- "resources": [
44
- "devfile.yaml"
58
+ "tags": [
59
+ "Java",
60
+ "Quarkus"
61
+ ],
62
+ "architectures": [
63
+ "amd64"
45
64
],
46
- "starterProjects": [
47
- "user-app"
65
+ "projectType": "quarkus",
66
+ "language": "java",
67
+ "versions": [
68
+ {
69
+ "version": "1.1.0",
70
+ "schemaVersion": "2.0.0",
71
+ "default": true,
72
+ "description": "Quarkus with Java",
73
+ "tags": [
74
+ "Java",
75
+ "Quarkus"
76
+ ],
77
+ "architectures": [
78
+ "amd64"
79
+ ],
80
+ "links": {
81
+ "self": "devfile-catalog/java-quarkus:1.1.0"
82
+ },
83
+ "resources": [
84
+ "devfile.yaml"
85
+ ],
86
+ "starterProjects": [
87
+ "community",
88
+ "redhat-product"
89
+ ]
90
+ }
48
91
]
49
92
}
50
93
]
@@ -68,6 +111,7 @@ resources: []string - The file resources that compose a devfile stack.
68
111
starterProjects: string[] - The project templates that can be used in the devfile
69
112
git: *git - The information of remote repositories
70
113
provider: string - The devfile provider information
114
+ versions: []Version - The list of stack versions information
71
115
*/
72
116
73
117
// Schema is the index file schema
@@ -90,6 +134,7 @@ type Schema struct {
90
134
Git * Git `yaml:"git,omitempty" json:"git,omitempty"`
91
135
Provider string `yaml:"provider,omitempty" json:"provider,omitempty"`
92
136
SupportUrl string `yaml:"supportUrl,omitempty" json:"supportUrl,omitempty"`
137
+ Versions []Version `yaml:"versions,omitempty" json:"versions,omitempty"`
93
138
}
94
139
95
140
// DevfileType describes the type of devfile
@@ -112,15 +157,44 @@ type StarterProject struct {
112
157
type Devfile struct {
113
158
Meta Schema `yaml:"metadata,omitempty" json:"metadata,omitempty"`
114
159
StarterProjects []StarterProject `yaml:"starterProjects,omitempty" json:"starterProjects,omitempty"`
160
+ SchemaVersion string `yaml:"schemaVersion,omitempty" json:"schemaVersion,omitempty"`
115
161
}
116
162
117
163
// Git stores the information of remote repositories
118
164
type Git struct {
119
- Remotes map [string ]string `yaml:"remotes,omitempty" json:"remotes,omitempty"`
165
+ Remotes map [string ]string `yaml:"remotes,omitempty" json:"remotes,omitempty"`
166
+ Url string `yaml:"url,omitempty" json:"url,omitempty"`
167
+ RemoteName string `yaml:"remoteName,omitempty" json:"remoteName,omitempty"`
168
+ SubDir string `yaml:"subDir,omitempty" json:"subDir,omitempty"`
169
+ Revision string `yaml:"revision,omitempty" json:"revision,omitempty"`
120
170
}
121
171
122
172
// ExtraDevfileEntries is the extraDevfileEntries structure that is used by index component
123
173
type ExtraDevfileEntries struct {
124
174
Samples []Schema `yaml:"samples,omitempty" json:"samples,omitempty"`
125
175
Stacks []Schema `yaml:"stacks,omitempty" json:"stacks,omitempty"`
126
176
}
177
+
178
+ // Version stores the top-level stack information defined within stack.yaml
179
+ type StackInfo struct {
180
+ Name string `yaml:"name,omitempty" json:"name,omitempty"`
181
+ DisplayName string `yaml:"displayName,omitempty" json:"displayName,omitempty"`
182
+ Description string `yaml:"description,omitempty" json:"description,omitempty"`
183
+ Icon string `yaml:"icon,omitempty" json:"icon,omitempty"`
184
+ Versions []Version `yaml:"versions,omitempty" json:"versions,omitempty"`
185
+ }
186
+
187
+ // Version stores the information for each stack version
188
+ type Version struct {
189
+ Version string `yaml:"version,omitempty" json:"version,omitempty"`
190
+ SchemaVersion string `yaml:"schemaVersion,omitempty" json:"schemaVersion,omitempty"`
191
+ Default bool `yaml:"default,omitempty" json:"default,omitempty"`
192
+ Git * Git `yaml:"git,omitempty" json:"git,omitempty"`
193
+ Description string `yaml:"description,omitempty" json:"description,omitempty"`
194
+ Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
195
+ Architectures []string `yaml:"architectures,omitempty" json:"architectures,omitempty"`
196
+ Icon string `yaml:"icon,omitempty" json:"icon,omitempty"`
197
+ Links map [string ]string `yaml:"links,omitempty" json:"links,omitempty"`
198
+ Resources []string `yaml:"resources,omitempty" json:"resources,omitempty"`
199
+ StarterProjects []string `yaml:"starterProjects,omitempty" json:"starterProjects,omitempty"`
200
+ }
0 commit comments