Skip to content

Commit c6eec2d

Browse files
authored
Merge pull request #128 from voxpupuli/updates
feat: switch to Containerfile and update CI workflows to use it, update gemset to eliminate duplicates
2 parents f071d9c + bc2d5fb commit c6eec2d

File tree

5 files changed

+28
-21
lines changed

5 files changed

+28
-21
lines changed

.github/workflows/build_container.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
RUBYGEM_VOXPUPULI_RELEASE=${{ matrix.rubygem_voxpupuli-release }}
5959
RUBYGEM_VOXPUPULI_TEST=${{ matrix.rubygem_voxpupuli-test }}
6060
build_arch: linux/${{ matrix.platform }}
61+
buildfile: Containerfile
6162
docker_username: voxpupulibot
6263
docker_password: ${{ secrets.DOCKERHUB_BOT_ADMIN_TOKEN }}
6364
tags: |

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
uses: docker/build-push-action@v6
4242
with:
4343
tags: 'ci/voxbox:${{ matrix.rubygem_puppet }}'
44+
file: Containerfile
4445
push: false
4546
platforms: linux/${{ matrix.platform }}
4647
build-args: |

.github/workflows/security_scanning.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
with:
4444
tags: 'ci/voxbox:${{ matrix.rubygem_puppet }}'
4545
push: false
46+
file: Containerfile
4647
platforms: linux/${{ matrix.platform }}
4748
build-args: |
4849
BASE_IMAGE=${{ matrix.base_image }}

Dockerfile renamed to Containerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,24 @@ RUN apk update \
5656
&& bundle config set path.system true \
5757
&& bundle config set jobs $(nproc) \
5858
&& bundle install --gemfile=/Gemfile \
59+
&& bundle clean --force \
5960
&& rm -rf /usr/local/lib/ruby/gems/*/cache/* \
6061
&& rm -rf /usr/local/lib/ruby/gems/*/gems/cgi-* \
6162
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/default/cgi-*.gemspec \
6263
&& rm -rf /usr/local/lib/ruby/gems/*/gems/stringio-* \
6364
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/default/stringio-*.gemspec \
6465
&& rm -rf /usr/local/lib/ruby/gems/*/gems/rdoc-* \
6566
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/default/rdoc-*.gemspec \
66-
&& rm -rf /usr/local/lib/ruby/gems/2.7.0/gems/default/rexml-* \
67-
&& rm -rf /usr/local/lib/ruby/gems/2.7.0/specifications/default/rexml-*.gemspec \
6867
&& rm -rf /usr/local/lib/ruby/gems/*/gems/rexml-* \
69-
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/rexml-*.gemspec
68+
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/rexml-*.gemspec \
69+
&& rm -rf /usr/local/lib/ruby/gems/*/gems/racc-* \
70+
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/default/racc-*.gemspec \
71+
&& rm -rf /usr/local/lib/ruby/gems/*/gems/drb-* \
72+
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/default/drb-*.gemspec \
73+
&& rm -rf /usr/local/lib/ruby/gems/*/gems/csv-* \
74+
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/default/csv-*.gemspec \
75+
&& rm -rf /usr/local/lib/ruby/gems/*/gems/minitest-* \
76+
&& rm -rf /usr/local/lib/ruby/gems/*/specifications/minitest-*.gemspec
7077

7178
###############################################################################
7279

@@ -79,7 +86,7 @@ LABEL org.label-schema.maintainer="Voxpupuli Team <[email protected]>" \
7986
org.label-schema.license="AGPL-3.0-or-later" \
8087
org.label-schema.vcs-url="https://github.com/voxpupuli/container-voxbox" \
8188
org.label-schema.schema-version="1.0" \
82-
org.label-schema.dockerfile="/Dockerfile"
89+
org.label-schema.dockerfile="/Containerfile"
8390

8491
RUN apk update \
8592
&& apk upgrade \
@@ -94,7 +101,7 @@ RUN apk update \
94101

95102
COPY --from=builder /usr/local/lib/ruby/gems /usr/local/lib/ruby/gems
96103
COPY --from=builder /usr/local/bundle /usr/local/bundle
97-
COPY Dockerfile /
104+
COPY Containerfile /
98105
COPY voxbox/Rakefile /
99106

100107
WORKDIR /repo

voxbox/Gemfile

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,24 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
44

55
gem 'facter', ENV['RUBYGEM_FACTER']
66
gem 'modulesync', ENV['RUBYGEM_MODULESYNC']
7-
gem 'puppet', ENV['RUBYGEM_PUPPET']
7+
gem 'onceover', ENV['RUBYGEM_ONCEOVER']
88
gem 'puppet_metadata', ENV['RUBYGEM_PUPPET_METADATA']
9+
gem 'puppet-ghostbuster', ENV['RUBYGEM_PUPPET_GHOSTBUSTER']
10+
gem 'puppet', ENV['RUBYGEM_PUPPET']
911
gem 'r10k', ENV['RUBYGEM_R10K']
1012
gem 'ra10ke', ENV['RUBYGEM_RA10KE']
13+
gem 'rspec_junit_formatter', ENV['RUBYGEM_RSPEC_JUNIT_FORMATTER']
14+
gem 'rubocop-performance', ENV['RUBYGEM_RUBOCOP_PERFORMANCE']
1115
gem 'voxpupuli-acceptance', ENV['RUBYGEM_VOXPUPULI_ACCEPTANCE']
1216
gem 'voxpupuli-release', ENV['RUBYGEM_VOXPUPULI_RELEASE']
1317
gem 'voxpupuli-test', ENV['RUBYGEM_VOXPUPULI_TEST']
14-
gem 'rubocop-performance', ENV['RUBYGEM_RUBOCOP_PERFORMANCE']
15-
gem 'onceover', ENV['RUBYGEM_ONCEOVER']
16-
gem 'rspec_junit_formatter', ENV['RUBYGEM_RSPEC_JUNIT_FORMATTER']
17-
gem 'puppet-ghostbuster', ENV['RUBYGEM_PUPPET_GHOSTBUSTER']
1818

1919
# CVE fixes
20-
gem 'cgi', '~> 0.4.1' # cgi 0.1.0 has CVEs - remove default and install upstream replacement
21-
gem 'stringio', '~> 3.1' # stringio 0.1.0 has CVEs - remove default and install upstream replacement
22-
gem 'rexml', '~> 3.3', '>= 3.3.6' # rexml < 3.3 has CVEs - remove default and install upstream replacement
23-
gem 'rdoc', '~> 6.7' # rdoc 6.2.1 has CVEs - remove default and install upstream replacement
24-
25-
# Pin dependencies to avoid installing duplicate versions
26-
# see https://github.com/voxpupuli/container-voxbox/issues/97
27-
gem 'racc', '1.8.1'
28-
gem 'minitest', '5.16.3'
29-
gem 'drb', '2.1.1'
30-
gem 'csv', '3.2.6'
20+
gem 'cgi', '~> 0.5' # cgi 0.1.0 has CVEs - remove default and install upstream replacement
21+
gem 'csv', '~> 3.2' # csv 3.1.2 has CVEs - remove default and install upstream replacement
22+
gem 'drb', '~> 2.2' # drb 2.1.1 has CVEs - remove default and install upstream replacement
23+
gem 'minitest', '~> 5.25' # minitest 5.16.3 has CVEs - remove default and install upstream replacement
24+
gem 'racc', '~> 1.8' # racc 1.6.2 has CVEs - remove default and install upstream replacement
25+
gem 'rdoc', '~> 6.14' # rdoc 6.2.1 has CVEs - remove default and install upstream replacement
26+
gem 'rexml', '~> 3.4' # rexml < 3.3 has CVEs - remove default and install upstream replacement
27+
gem 'stringio', '~> 3.1' # stringio 0.1.0 has CVEs - remove default and install upstream replacement

0 commit comments

Comments
 (0)