devfile 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of devfile might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/devfile.rb +4 -18
- data/{bin → out}/devfile-amd64-darwin +0 -0
- data/{bin → out}/devfile-amd64-linux +0 -0
- data/{bin → out}/devfile-arm64-darwin +0 -0
- data/{bin → out}/devfile-arm64-linux +0 -0
- metadata +6 -7
- data/bin/devfile +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19d1946256b6ae986646dec72aaaa394bb8d226017a57dbfb9838f31dd8a7721
|
4
|
+
data.tar.gz: 6ed569b5bfee0b9cdc6ca4c5c821c43c2f392b48de020c71206a032e8a0ba13d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10f728ee859101765cf830b0e87401e8f814bee746f32d85168becaa17765fbdf74c52c75454c7d6c65aff3d36acb10c43c1f3831573967a1e94430da316eac5
|
7
|
+
data.tar.gz: 0be894de346e0372c03059f72ca2e1df36df3cc6b99e384efeee569c4e13dce7a6d772341b13d1a6dc7617ef7ef3b9a58502c9de99cb60bb7e4671a6514991c6
|
data/lib/devfile.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'open3'
|
4
|
+
require_relative 'ruby_cpu_to_go_arch'
|
4
5
|
|
5
6
|
# Module that works with the Devfile standard
|
6
7
|
module Devfile
|
@@ -9,21 +10,10 @@ module Devfile
|
|
9
10
|
|
10
11
|
# Set of services to parse a devfile and output k8s manifests
|
11
12
|
class Parser
|
12
|
-
FILE_PATH = File.expand_path('./../bin/devfile', File.dirname(__FILE__))
|
13
13
|
DEVFILE_GEMSPEC = Gem.loaded_specs['devfile']
|
14
|
-
RUBY_CPU_TO_GOARCH = {
|
15
|
-
'x86_64' => 'amd64',
|
16
|
-
'aarch64' => 'arm64',
|
17
|
-
'amd64' => 'amd64',
|
18
|
-
'arm64' => 'arm64',
|
19
|
-
'universal' => 'arm64'
|
20
|
-
# This exist because if Rosetta is enabled on mac, it means both arm and amd64 bianries
|
21
|
-
# can be run so the gem lib sets the CPU as "universal".
|
22
|
-
# see: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
|
23
|
-
}.freeze
|
24
14
|
ARCH = RUBY_CPU_TO_GOARCH[Gem::Platform.local.cpu] || Gem::Platform.local.cpu
|
25
15
|
SYSTEM_PLATFORM = "#{ARCH}-#{Gem::Platform.local.os}"
|
26
|
-
|
16
|
+
FILE_PATH = File.expand_path("./../out/devfile-#{SYSTEM_PLATFORM}", File.dirname(__FILE__))
|
27
17
|
|
28
18
|
class << self
|
29
19
|
def get_deployment(devfile, name, namespace, labels, annotations, replicas)
|
@@ -53,13 +43,9 @@ module Devfile
|
|
53
43
|
private
|
54
44
|
|
55
45
|
def call(*cmd)
|
56
|
-
|
57
|
-
if ruby_platform?
|
58
|
-
raise_if_unsupported_system_platform!
|
59
|
-
file_path = PLATFORM_SPECIFIC_BINARY_PATH
|
60
|
-
end
|
46
|
+
raise_if_unsupported_system_platform! if ruby_platform?
|
61
47
|
|
62
|
-
stdout, stderr, status = Open3.capture3({},
|
48
|
+
stdout, stderr, status = Open3.capture3({}, FILE_PATH, *cmd.map(&:to_s))
|
63
49
|
raise(CliError, stderr) unless status.success?
|
64
50
|
|
65
51
|
stdout
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-27 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: Library used to generate kubernetes manifests from a Devfile.
|
13
13
|
email:
|
@@ -18,17 +18,16 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- bin/devfile
|
22
|
-
- bin/devfile-amd64-darwin
|
23
|
-
- bin/devfile-amd64-linux
|
24
|
-
- bin/devfile-arm64-darwin
|
25
|
-
- bin/devfile-arm64-linux
|
26
21
|
- ext/devfile.go
|
27
22
|
- ext/go.mod
|
28
23
|
- ext/go.sum
|
29
24
|
- ext/main.go
|
30
25
|
- ext/volume.go
|
31
26
|
- lib/devfile.rb
|
27
|
+
- out/devfile-amd64-darwin
|
28
|
+
- out/devfile-amd64-linux
|
29
|
+
- out/devfile-arm64-darwin
|
30
|
+
- out/devfile-arm64-linux
|
32
31
|
homepage: https://gitlab.com
|
33
32
|
licenses:
|
34
33
|
- MIT
|
data/bin/devfile
DELETED
Binary file
|