devfile 0.0.16.pre.alpha1 → 0.0.18.pre.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/devfile +0 -0
- data/ext/devfile.go +4 -1
- data/lib/devfile.rb +12 -36
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1da9eca112e8798b60f676f22e95c0fbc15e480f5c4318fce368c24bf45109e
|
4
|
+
data.tar.gz: 1707f3d96a5ea398cecbe750d63a69164dd24485ed2bae28cef8000771bc563e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a0f8a352e1422153b0b84e9f75359ebb3647f702a050462e21f6680138ed26a2f06cb26718eebe8e95f805498a1bc6f4be2776f0b3ee9e5ba37c1963f980a3'
|
7
|
+
data.tar.gz: cf54904f720ad922c3f96791632c18df45a7544868ae01cf5df7d381be82d15549b83f33e8098051fea9e4f50766a50e5ad1140473ce9e27a37359bbfeb4f9fe
|
data/bin/devfile
CHANGED
Binary file
|
data/ext/devfile.go
CHANGED
@@ -7,6 +7,7 @@ import (
|
|
7
7
|
"strconv"
|
8
8
|
"text/template"
|
9
9
|
|
10
|
+
"github.com/devfile/library/v2/pkg/devfile"
|
10
11
|
"github.com/devfile/library/v2/pkg/devfile/generator"
|
11
12
|
"github.com/devfile/library/v2/pkg/devfile/parser"
|
12
13
|
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
|
@@ -304,7 +305,9 @@ func parseDevfile(content string) (Devfile, error) {
|
|
304
305
|
parserArgs := parser.ParserArgs{
|
305
306
|
Data: []byte(content),
|
306
307
|
}
|
307
|
-
|
308
|
+
// TODO: figure out how to handle warnings
|
309
|
+
// https://gitlab.com/gitlab-org/remote-development/devfile-gem/-/issues/6
|
310
|
+
devfileObj, _, err := devfile.ParseDevfileAndValidate(parserArgs)
|
308
311
|
return Devfile{
|
309
312
|
devfileObj: devfileObj,
|
310
313
|
}, err
|
data/lib/devfile.rb
CHANGED
@@ -10,57 +10,33 @@ module Devfile
|
|
10
10
|
|
11
11
|
class << self
|
12
12
|
def get_deployment(devfile, name, namespace, labels, annotations, replicas)
|
13
|
-
|
14
|
-
"#{FILE_PATH} deployment '#{devfile}' #{name} #{namespace} '#{labels}' '#{annotations}' #{replicas}"
|
15
|
-
)
|
16
|
-
|
17
|
-
raise stderr unless status.success?
|
18
|
-
|
19
|
-
stdout
|
13
|
+
call('deployment', devfile, name, namespace, labels, annotations, replicas)
|
20
14
|
end
|
21
15
|
|
22
16
|
def get_service(devfile, name, namespace, labels, annotations)
|
23
|
-
|
24
|
-
"#{FILE_PATH} service '#{devfile}' #{name} #{namespace} '#{labels}' '#{annotations}'"
|
25
|
-
)
|
26
|
-
|
27
|
-
raise stderr unless status.success?
|
28
|
-
|
29
|
-
stdout
|
17
|
+
call('service', devfile, name, namespace, labels, annotations)
|
30
18
|
end
|
31
19
|
|
32
20
|
def get_ingress(devfile, name, namespace, labels, annotations, domain_template, ingress_class)
|
33
|
-
|
34
|
-
"#{FILE_PATH} ingress '#{devfile}' #{name} #{namespace} '#{labels}' '#{annotations}' #{domain_template} #{ingress_class}"
|
35
|
-
)
|
36
|
-
|
37
|
-
raise stderr unless status.success?
|
38
|
-
|
39
|
-
stdout
|
21
|
+
call('ingress', devfile, name, namespace, labels, annotations, domain_template, ingress_class)
|
40
22
|
end
|
41
23
|
|
42
24
|
def get_pvc(devfile, name, namespace, labels, annotations)
|
43
|
-
|
44
|
-
"#{FILE_PATH} deployment '#{devfile}' #{name} #{namespace} '#{labels}' '#{annotations}'"
|
45
|
-
)
|
46
|
-
|
47
|
-
raise stderr unless status.success?
|
48
|
-
|
49
|
-
stdout
|
25
|
+
call('deployment', devfile, name, namespace, labels, annotations)
|
50
26
|
end
|
51
27
|
|
52
28
|
def get_all(devfile, name, namespace, labels, annotations, replicas, domain_template, ingress_class)
|
53
|
-
|
54
|
-
"#{FILE_PATH} all '#{devfile}' #{name} #{namespace} '#{labels}' '#{annotations}' #{replicas} #{domain_template} #{ingress_class}"
|
55
|
-
)
|
56
|
-
|
57
|
-
raise stderr unless status.success?
|
58
|
-
|
59
|
-
stdout
|
29
|
+
call('all', devfile, name, namespace, labels, annotations, replicas, domain_template, ingress_class)
|
60
30
|
end
|
61
31
|
|
62
32
|
def flatten(devfile)
|
63
|
-
|
33
|
+
call('flatten', devfile)
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def call(*cmd)
|
39
|
+
stdout, stderr, status = Open3.capture3({}, FILE_PATH, *cmd.map(&:to_s))
|
64
40
|
|
65
41
|
raise stderr unless status.success?
|
66
42
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18.pre.alpha1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Library used to generate kubernetes manifests from a Devfile.
|
14
14
|
email:
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.3.1
|
48
48
|
requirements: []
|
49
|
-
rubygems_version: 3.
|
49
|
+
rubygems_version: 3.3.26
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Parse and generate kubernetes manifests from a Devfile
|