foreman_envsync 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +61 -0
- data/.gitignore +1 -0
- data/Dockerfile +6 -0
- data/README.md +5 -0
- data/exe/foreman_envsync +3 -3
- data/foreman_envsync.gemspec +2 -0
- data/lib/foreman_envsync/version.rb +1 -1
- metadata +20 -4
- data/.github/workflows/main.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a1b0dd3d8f5949db44605891c54f2d4a937b2b194b182ef0dd5887b8632d6d1
|
4
|
+
data.tar.gz: a576b9c27487cba2a37fe9be7bcf6fd96e92cd7fc71a476cccbbe2e210b04b6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9ac65592854fadd6601e66167dd999d42205334973a14af4d3105b40c8a4b9b345d4517b5c82f922a51959eaae70aeeb9ff38893395e7d03b866150493a3c8
|
7
|
+
data.tar.gz: eede0daddd896ba75db5b30325c1222982abd7e095e2c3e329c4c9538106cd238cee5c92e2f6c118ef28533a0f297d7a318856528da774e88928f6ac8e254c01
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# based on https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md
|
2
|
+
|
3
|
+
name: ci
|
4
|
+
|
5
|
+
on:
|
6
|
+
schedule:
|
7
|
+
- cron: '0 10 * * 1'
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- '**'
|
11
|
+
tags:
|
12
|
+
- 'v*.*.*'
|
13
|
+
pull_request:
|
14
|
+
branches:
|
15
|
+
- 'main'
|
16
|
+
|
17
|
+
jobs:
|
18
|
+
release:
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
if: github.repository == 'lsst-it/foreman_envsync'
|
21
|
+
steps:
|
22
|
+
- name: Checkout
|
23
|
+
uses: actions/checkout@v3
|
24
|
+
- name: Set up Ruby
|
25
|
+
uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: 3.0
|
28
|
+
bundler-cache: true
|
29
|
+
- name: Run the default task
|
30
|
+
run: bundle exec rake
|
31
|
+
- name: Build gem
|
32
|
+
run: gem build *.gemspec
|
33
|
+
- name: Publish gem to rubygems.org
|
34
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
35
|
+
run: gem push *.gem
|
36
|
+
env:
|
37
|
+
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
|
38
|
+
|
39
|
+
- name: Docker meta
|
40
|
+
id: meta
|
41
|
+
uses: docker/metadata-action@v4
|
42
|
+
with:
|
43
|
+
images: |
|
44
|
+
lsstit/foreman_envsync
|
45
|
+
- name: Set up QEMU
|
46
|
+
uses: docker/setup-qemu-action@v2
|
47
|
+
- name: Set up Docker Buildx
|
48
|
+
uses: docker/setup-buildx-action@v2
|
49
|
+
- name: Login to DockerHub
|
50
|
+
if: github.event_name != 'pull_request'
|
51
|
+
uses: docker/login-action@v2
|
52
|
+
with:
|
53
|
+
username: ${{ secrets.DOCKERHUB_LSSTIT_USERNAME }}
|
54
|
+
password: ${{ secrets.DOCKERHUB_LSSTIT_PASSWORD }}
|
55
|
+
- name: Build and push
|
56
|
+
uses: docker/build-push-action@v3
|
57
|
+
with:
|
58
|
+
context: .
|
59
|
+
push: ${{ github.event_name != 'pull_request' }}
|
60
|
+
tags: ${{ steps.meta.outputs.tags }}
|
61
|
+
labels: ${{ steps.meta.outputs.labels }}
|
data/.gitignore
CHANGED
data/Dockerfile
ADDED
data/README.md
CHANGED
@@ -4,6 +4,11 @@ A highly opinionated utility to sync foreman puppet environments with the set
|
|
4
4
|
of environments known to a `puppetserver` instance *without* also importing the
|
5
5
|
classes within those puppet environments.
|
6
6
|
|
7
|
+
## OCI Image
|
8
|
+
|
9
|
+
An OCI image containing this gem is published to docker hub as
|
10
|
+
[`lsstit/foreman_envsync`](https://hub.docker.com/repository/docker/lsstit/foreman_envsync).
|
11
|
+
|
7
12
|
|
8
13
|
## The Problem
|
9
14
|
|
data/exe/foreman_envsync
CHANGED
@@ -30,7 +30,7 @@ def verbose_list(msg, items)
|
|
30
30
|
|
31
31
|
printf(msg, items.count)
|
32
32
|
puts
|
33
|
-
puts "#{YAML.dump(items)}\n" unless items.empty?
|
33
|
+
puts "#{YAML.dump(items.sort)}\n" unless items.empty?
|
34
34
|
end
|
35
35
|
|
36
36
|
def cert_file(file)
|
@@ -41,12 +41,12 @@ def key_file(file)
|
|
41
41
|
OpenSSL::PKey::RSA.new(File.read(file))
|
42
42
|
end
|
43
43
|
|
44
|
-
def hammer_cmd(cmd, ignore_exitstatus: false)
|
44
|
+
def hammer_cmd(cmd, opt = { ignore_exitstatus: false })
|
45
45
|
stdout, stderr, s = Open3.capture3(cmd)
|
46
46
|
unless s.success?
|
47
47
|
puts "command #{cmd} failed"
|
48
48
|
puts stderr
|
49
|
-
exit s.exitstatus unless ignore_exitstatus
|
49
|
+
exit s.exitstatus unless opt[:ignore_exitstatus]
|
50
50
|
end
|
51
51
|
|
52
52
|
stdout
|
data/foreman_envsync.gemspec
CHANGED
@@ -28,10 +28,12 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_runtime_dependency "hammer_cli"
|
30
30
|
spec.add_runtime_dependency "hammer_cli_foreman"
|
31
|
+
spec.add_runtime_dependency "hammer_cli_foreman_puppet"
|
31
32
|
spec.add_runtime_dependency "rest-client", "~> 2.0"
|
32
33
|
spec.add_development_dependency "rubocop-rake"
|
33
34
|
spec.add_development_dependency "rubocop-rspec"
|
34
35
|
|
35
36
|
# For more information and examples about making a new gem, checkout our
|
36
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
38
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
37
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_envsync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Hoblitt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hammer_cli
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: hammer_cli_foreman_puppet
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rest-client
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,11 +102,12 @@ executables:
|
|
88
102
|
extensions: []
|
89
103
|
extra_rdoc_files: []
|
90
104
|
files:
|
91
|
-
- ".github/workflows/
|
105
|
+
- ".github/workflows/ci.yaml"
|
92
106
|
- ".gitignore"
|
93
107
|
- ".rspec"
|
94
108
|
- ".rubocop.yml"
|
95
109
|
- CHANGELOG.md
|
110
|
+
- Dockerfile
|
96
111
|
- Gemfile
|
97
112
|
- LICENSE.txt
|
98
113
|
- README.md
|
@@ -110,6 +125,7 @@ metadata:
|
|
110
125
|
homepage_uri: https://github.com/lsst-it/foreman_envsync
|
111
126
|
source_code_uri: https://github.com/lsst-it/foreman_envsync
|
112
127
|
changelog_uri: https://github.com/lsst-it/foreman_envsync/blob/master/CHANGELOG.md
|
128
|
+
rubygems_mfa_required: 'true'
|
113
129
|
post_install_message:
|
114
130
|
rdoc_options: []
|
115
131
|
require_paths:
|
@@ -125,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
141
|
- !ruby/object:Gem::Version
|
126
142
|
version: '0'
|
127
143
|
requirements: []
|
128
|
-
rubygems_version: 3.1.
|
144
|
+
rubygems_version: 3.1.6
|
129
145
|
signing_key:
|
130
146
|
specification_version: 4
|
131
147
|
summary: Sync pupperserver envs with foreman
|
data/.github/workflows/main.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
name: Ruby
|
2
|
-
|
3
|
-
on: [push,pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
steps:
|
9
|
-
- uses: actions/checkout@v2
|
10
|
-
- name: Set up Ruby
|
11
|
-
uses: ruby/setup-ruby@v1
|
12
|
-
with:
|
13
|
-
ruby-version: 2.7.2
|
14
|
-
bundler-cache: true
|
15
|
-
- name: Run the default task
|
16
|
-
run: bundle exec rake
|