foreman_envsync 1.1.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e24a84a49de5dd8e5e547b63e05ce952fc348e34d670898b468642e8c058a6ee
4
- data.tar.gz: 230d4a1832eca3c43a98bc0ac7e67cc9e82195c14810ab5c0f564c7e279d0549
3
+ metadata.gz: d38a8f525bb525110ab6a663e5fd078d7307fcf723482f325be84b7c52fd8234
4
+ data.tar.gz: 32ac2c15a493a6c1ecf3a17672e3318791edeeb3072ecea3d777a9603222f1c1
5
5
  SHA512:
6
- metadata.gz: d2c94787e431273cc84f2a57cb72f257130cd3918e25dba5ef99a53e817185d3a8a483528e75c0ac7d1639718a611fff227edc54eef6c33188d31c1da6e225fb
7
- data.tar.gz: 7032245360fe4ab1db78a830e8a75091c41be1bc569ac5b4abc4ccf432a5b2872dec4648cf13d74864fb880eedd85dfdb6ab8cb40af45161f0cfb3f70027aeac
6
+ metadata.gz: 8de536088363db02fe41cc82d19a09b1a82796f109100b283271893b6a0dd5c1c7590f9558a4717b82f235ded05440f65fa2e49f4987f44b68058a77dc6707c5
7
+ data.tar.gz: 01e819fd4e5d5c1c20a0eb10b36c88363a9c35b85eb8cfc21a8f08b9ae2041137907d5d985d310af79df561caa8e82bf3832787111a29fa09598d0856979f00f
@@ -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
@@ -7,6 +7,7 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  Gemfile.lock
10
+ *.gem
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
data/.rubocop.yml CHANGED
@@ -12,3 +12,6 @@ Style/StringLiteralsInInterpolation:
12
12
 
13
13
  Layout/LineLength:
14
14
  Max: 120
15
+
16
+ Gemspec/RequireMFA:
17
+ Enabled: false
data/Dockerfile ADDED
@@ -0,0 +1,6 @@
1
+ FROM ruby:3.0
2
+
3
+ COPY *.gem .
4
+ RUN gem install --no-document *.gem
5
+
6
+ ENTRYPOINT ["/usr/local/bundle/bin/foreman_envsync"]
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
@@ -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"] = "false"
37
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanEnvsync
4
- VERSION = "1.1.1"
4
+ VERSION = "1.2.2"
5
5
  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.1.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hoblitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
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/main.yml"
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: 'false'
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.4
144
+ rubygems_version: 3.1.6
129
145
  signing_key:
130
146
  specification_version: 4
131
147
  summary: Sync pupperserver envs with foreman
@@ -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