dock0 0.4.0 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circle-ruby +4 -0
- data/.github/workflows/build.yml +44 -0
- data/.rubocop.yml +2 -2
- data/Gemfile +0 -1
- data/LICENSE +1 -1
- data/README.md +6 -7
- data/Rakefile +1 -2
- data/bin/dock0 +2 -0
- data/dock0.gemspec +13 -11
- data/lib/dock0/install.rb +1 -1
- data/lib/dock0/version.rb +3 -1
- data/lib/dock0.rb +2 -2
- data/spec/spec_helper.rb +7 -6
- metadata +45 -31
- data/.travis.yml +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f69de20dbb99adc8964e0e9bbd6c5cc2970bcd23f27f40aca11d5a315481068
|
4
|
+
data.tar.gz: c95fd0bb011a4c6ae9b8a9ec0e3a892b07111b266c069ef497f9832565da9cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 508586f71e712fd587d52929e1e0f0870027b0ac3a86f855e02f0065f2c402d7182b3dbb2fcd48a6ade5892a5d946c0a3501dd9ff2acd071354f5126fbdd5aa0
|
7
|
+
data.tar.gz: 5f3ccb60440f71bf006d4b4ec860513b331bfe4336c5ad1824f47b43bb0aaec7bbecc73aa0c4aa04299464d6c155deaca007eaf93843520528faaa26e7955a9c
|
data/.circle-ruby
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
name: Build
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
name: Build
|
8
|
+
runs-on: ubuntu-22.04
|
9
|
+
steps:
|
10
|
+
- name: Checkout
|
11
|
+
uses: actions/checkout@v3
|
12
|
+
with:
|
13
|
+
submodules: recursive
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: '3.1'
|
17
|
+
bundler-cache: true
|
18
|
+
- name: Build
|
19
|
+
run: bundle exec rake
|
20
|
+
- name: Release
|
21
|
+
if: startsWith(github.ref, 'refs/tags/')
|
22
|
+
run: bundle exec rake release
|
23
|
+
env:
|
24
|
+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
25
|
+
- name: Post to a Slack channel
|
26
|
+
if: ${{ failure() }}
|
27
|
+
uses: slackapi/slack-github-action@v1.18.0
|
28
|
+
env:
|
29
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
30
|
+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
31
|
+
with:
|
32
|
+
payload: |
|
33
|
+
{
|
34
|
+
"text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
35
|
+
"blocks": [
|
36
|
+
{
|
37
|
+
"type": "section",
|
38
|
+
"text": {
|
39
|
+
"type": "mrkdwn",
|
40
|
+
"text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
data/.rubocop.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
inherit_gem:
|
2
|
+
goodcop: .rubocop.yml
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,9 @@ dock0
|
|
2
2
|
=========
|
3
3
|
|
4
4
|
[![Gem Version](https://img.shields.io/gem/v/dock0.svg)](https://rubygems.org/gems/dock0)
|
5
|
-
[![
|
6
|
-
[![
|
7
|
-
[![
|
8
|
-
[![Build Status](https://img.shields.io/travis/dock0/dock0.svg)](https://travis-ci.org/dock0/dock0)
|
5
|
+
[![Build Status](https://img.shields.io/travis/com/dock0/dock0.svg)](https://travis-ci.com/dock0/dock0)
|
6
|
+
[![Coverage Status](https://img.shields.io/codecov/c/github/dock0/dock0.svg)](https://codecov.io/github/dock0/dock0)
|
7
|
+
[![Code Quality](https://img.shields.io/codacy/df0d7e6f7241482db8eb4d0b920c36ad.svg)](https://www.codacy.com/app/akerl/dock0)
|
9
8
|
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
|
10
9
|
|
11
10
|
Component generator for building Arch systems
|
@@ -23,7 +22,7 @@ For information on how this is used, check out my blog posts:
|
|
23
22
|
dock0 image config.yaml
|
24
23
|
```
|
25
24
|
|
26
|
-
This will build a compressed rootfs from your configuration. Here is [an example configuration](https://github.com/dock0/
|
25
|
+
This will build a compressed rootfs from your configuration. Here is [an example configuration](https://github.com/dock0/rootfs)
|
27
26
|
|
28
27
|
### Build a config bundle
|
29
28
|
|
@@ -31,7 +30,7 @@ This will build a compressed rootfs from your configuration. Here is [an example
|
|
31
30
|
dock0 config config.yaml
|
32
31
|
```
|
33
32
|
|
34
|
-
This builds a config tarball designed to be used to customize a rootfs. Here is [an example configuration](https://github.com/dock0/
|
33
|
+
This builds a config tarball designed to be used to customize a rootfs. Here is [an example configuration](https://github.com/dock0/deploy_tool)
|
35
34
|
|
36
35
|
### Build a system deployment
|
37
36
|
|
@@ -39,7 +38,7 @@ This builds a config tarball designed to be used to customize a rootfs. Here is
|
|
39
38
|
dock0 install config.yaml
|
40
39
|
```
|
41
40
|
|
42
|
-
This downloads created artifacts and runs build scripts to combine precreated and dynamic components into a full system. Here is [an example configuration](https://github.com/dock0/
|
41
|
+
This downloads created artifacts and runs build scripts to combine precreated and dynamic components into a full system. Here is [an example configuration](https://github.com/dock0/vm_spec)
|
43
42
|
|
44
43
|
## Installation
|
45
44
|
|
data/Rakefile
CHANGED
@@ -7,8 +7,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
7
7
|
|
8
8
|
desc 'Run Rubocop on the gem'
|
9
9
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
10
|
-
task.patterns = ['lib/**/*.rb', 'spec/**/*.rb', 'bin/*']
|
11
10
|
task.fail_on_error = true
|
12
11
|
end
|
13
12
|
|
14
|
-
task default: [
|
13
|
+
task default: %i[spec rubocop build install]
|
data/bin/dock0
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'dock0'
|
4
4
|
require 'mercenary'
|
5
5
|
|
6
|
+
# rubocop:disable Metrics/BlockLength
|
6
7
|
Mercenary.program(:dock0) do |p|
|
7
8
|
p.version Dock0::VERSION
|
8
9
|
p.description 'Tool for creating server components'
|
@@ -43,3 +44,4 @@ Mercenary.program(:dock0) do |p|
|
|
43
44
|
exit 1
|
44
45
|
end
|
45
46
|
end
|
47
|
+
# rubocop:enable Metrics/BlockLength
|
data/dock0.gemspec
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
-
|
1
|
+
require 'English'
|
2
|
+
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
2
3
|
require 'dock0/version'
|
3
4
|
|
4
5
|
Gem::Specification.new do |s|
|
5
6
|
s.name = 'dock0'
|
6
7
|
s.version = Dock0::VERSION
|
7
|
-
s.date = Time.now.strftime(
|
8
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
8
9
|
|
9
10
|
s.summary = 'Builds a read-only Arch host for Docker'
|
10
|
-
s.description =
|
11
|
+
s.description = 'Generates a read-only Arch host for running Docker containers' # rubocop:disable Metrics/LineLength
|
11
12
|
s.authors = ['Les Aker']
|
12
13
|
s.email = 'me@lesaker.org'
|
13
14
|
s.homepage = 'https://github.com/aker/dock0'
|
@@ -17,14 +18,15 @@ Gem::Specification.new do |s|
|
|
17
18
|
s.test_files = `git ls-files spec/*`.split
|
18
19
|
s.executables = ['dock0']
|
19
20
|
|
21
|
+
s.add_dependency 'cymbal', '~> 2.0.0'
|
22
|
+
s.add_dependency 'meld', '~> 1.1.0'
|
23
|
+
s.add_dependency 'menagerie', '~> 1.1.1'
|
20
24
|
s.add_dependency 'mercenary', '~> 0.3.4'
|
21
|
-
s.add_dependency 'menagerie', '~> 1.0.0'
|
22
|
-
s.add_dependency 'meld', '~> 1.0.0'
|
23
|
-
s.add_dependency 'cymbal', '~> 1.0.0'
|
24
25
|
|
25
|
-
s.add_development_dependency '
|
26
|
-
s.add_development_dependency '
|
27
|
-
s.add_development_dependency '
|
28
|
-
s.add_development_dependency '
|
29
|
-
s.add_development_dependency '
|
26
|
+
s.add_development_dependency 'codecov', '~> 0.1.1'
|
27
|
+
s.add_development_dependency 'fuubar', '~> 2.5.0'
|
28
|
+
s.add_development_dependency 'goodcop', '~> 0.8.0'
|
29
|
+
s.add_development_dependency 'rake', '~> 13.0.0'
|
30
|
+
s.add_development_dependency 'rspec', '~> 3.9.0'
|
31
|
+
s.add_development_dependency 'rubocop', '~> 0.76.0'
|
30
32
|
end
|
data/lib/dock0/install.rb
CHANGED
data/lib/dock0/version.rb
CHANGED
data/lib/dock0.rb
CHANGED
@@ -30,7 +30,7 @@ module Dock0
|
|
30
30
|
|
31
31
|
def initialize(*configs)
|
32
32
|
@config = configs.each_with_object(default_config) do |path, obj|
|
33
|
-
new = YAML.
|
33
|
+
new = YAML.safe_load(File.read(path))
|
34
34
|
next unless new
|
35
35
|
obj.deep_merge! Cymbal.symbolize(new)
|
36
36
|
end
|
@@ -44,7 +44,7 @@ module Dock0
|
|
44
44
|
def run(cmd)
|
45
45
|
results = `#{cmd} 2>&1`
|
46
46
|
return results if $CHILD_STATUS.success?
|
47
|
-
|
47
|
+
raise "Failed running #{cmd}:\n#{results}"
|
48
48
|
end
|
49
49
|
|
50
50
|
def templates
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
|
4
|
-
SimpleCov.formatter =
|
5
|
-
SimpleCov.start do
|
6
|
-
|
1
|
+
if ENV['CI'] == 'true'
|
2
|
+
require 'simplecov'
|
3
|
+
require 'codecov'
|
4
|
+
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
5
|
+
SimpleCov.start do
|
6
|
+
add_filter '/spec/'
|
7
|
+
end
|
7
8
|
end
|
8
9
|
|
9
10
|
require 'rspec'
|
metadata
CHANGED
@@ -1,141 +1,155 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dock0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: cymbal
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: meld
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: menagerie
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.1.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.1.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: mercenary
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.3.4
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.3.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: codecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.1.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: fuubar
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 2.5.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 2.5.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: goodcop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.8.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.8.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 13.0.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 13.0.0
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rspec
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 3.
|
131
|
+
version: 3.9.0
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: 3.
|
138
|
+
version: 3.9.0
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
140
|
+
name: rubocop
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
145
|
+
version: 0.76.0
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
152
|
+
version: 0.76.0
|
139
153
|
description: Generates a read-only Arch host for running Docker containers
|
140
154
|
email: me@lesaker.org
|
141
155
|
executables:
|
@@ -143,10 +157,11 @@ executables:
|
|
143
157
|
extensions: []
|
144
158
|
extra_rdoc_files: []
|
145
159
|
files:
|
160
|
+
- ".circle-ruby"
|
161
|
+
- ".github/workflows/build.yml"
|
146
162
|
- ".gitignore"
|
147
163
|
- ".rspec"
|
148
164
|
- ".rubocop.yml"
|
149
|
-
- ".travis.yml"
|
150
165
|
- Gemfile
|
151
166
|
- LICENSE
|
152
167
|
- README.md
|
@@ -182,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
197
|
- !ruby/object:Gem::Version
|
183
198
|
version: '0'
|
184
199
|
requirements: []
|
185
|
-
|
186
|
-
rubygems_version: 2.4.5
|
200
|
+
rubygems_version: 3.3.7
|
187
201
|
signing_key:
|
188
202
|
specification_version: 4
|
189
203
|
summary: Builds a read-only Arch host for Docker
|
data/.travis.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
sudo: false
|
4
|
-
rvm:
|
5
|
-
- 2.2.0
|
6
|
-
- 2.1.5
|
7
|
-
- 2.0.0-p598
|
8
|
-
- 1.9.3-p551
|
9
|
-
notifications:
|
10
|
-
email: false
|
11
|
-
irc:
|
12
|
-
template:
|
13
|
-
- "%{repository}/%{branch}/%{build_number}: %{message} -- %{build_url}"
|
14
|
-
channels:
|
15
|
-
- irc.oftc.net#akerl
|