Skip to content

Commit d2aa3b8

Browse files
authored
Merge pull request #28 from voxpupuli/alpine
switch to alpine
2 parents 654fd7d + 4b99803 commit d2aa3b8

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,22 @@ jobs:
6565
with:
6666
sarif_file: 'trivy-results-${{ matrix.rubygem_puppet }}.sarif'
6767

68-
# - name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
69-
# uses: aquasecurity/trivy-action@master
70-
# with:
71-
# scan-type: 'image'
72-
# format: 'github'
73-
# output: 'dependency-results.sbom.json'
74-
# image-ref: 'ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }}'
75-
# github-pat: ${{ secrets.GITHUB_TOKEN }}
68+
- name: Clone voxpupuli/puppet-example repository
69+
uses: actions/checkout@v4
70+
with:
71+
repository: voxpupuli/puppet-example
7672

77-
# - name: Upload trivy report as a Github artifact
78-
# uses: actions/upload-artifact@v4
79-
# with:
80-
# name: trivy-sbom-report
81-
# path: '${{ github.workspace }}/dependency-results.sbom.json'
82-
# retention-days: 20 # 90 is the default
73+
- name: Test container
74+
run: |
75+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile -T
76+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile lint
77+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile metadata_lint
78+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile strings:validate:reference
79+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile rubocop
80+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile syntax
81+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile spec
82+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile r10k:syntax
83+
docker run --rm -v $(pwd):/repo ci/voxbox-${{ matrix.rubygem_puppet }}:${{ github.sha }} -f /Rakefile r10k:dependencies
8384
8485
tests:
8586
needs:

Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_IMAGE=docker.io/ruby:3.2.5-bookworm
1+
ARG BASE_IMAGE=docker.io/ruby:3.2.5-alpine3.20
22

33
FROM $BASE_IMAGE
44

@@ -45,16 +45,13 @@ COPY voxbox/Gemfile /
4545
COPY voxbox/Rakefile /
4646
COPY Dockerfile /
4747

48-
RUN apt-get update \
49-
&& apt-get upgrade -y \
50-
&& apt-get install -y yamllint \
51-
&& apt-get autoremove -y \
52-
&& apt-get clean \
48+
RUN apk update \
49+
&& apk upgrade \
50+
&& apk add --no-cache --update alpine-sdk \
51+
&& apk add --no-cache --update yamllint \
5352
&& bundle config set path.system true \
5453
&& bundle config set jobs $(nproc) \
5554
&& bundle install --gemfile=/Gemfile \
56-
&& apt-get purge -y "libaom*" linux-libc-dev "libmagick*" "imagemagick-*" \
57-
&& rm -rf /var/lib/apt/lists/* \
5855
&& rm -rf /usr/local/lib/ruby/gems/*/cache/* \
5956
&& rm -rf /usr/local/lib/ruby/gems/2.7.0/gems/cgi-0.1.0.2 \
6057
&& rm -rf /usr/local/lib/ruby/gems/2.7.0/specifications/default/cgi-0.1.0.2.gemspec \

build_versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"include": [
33
{
44
"puppet_release": 7,
5-
"base_image": "ghcr.io/betadots/ruby:2.7.8-focal",
5+
"base_image": "docker.io/ruby:2.7.8-alpine3.16",
66
"rubygem_puppet": "7.32.1",
77
"rubygem_facter": "4.8.0",
88
"rubygem_voxpupuli_test": "9.0.0",
@@ -17,7 +17,7 @@
1717
},
1818
{
1919
"puppet_release": 8,
20-
"base_image": "docker.io/ruby:3.2.5-bookworm",
20+
"base_image": "docker.io/ruby:3.2.5-alpine3.20",
2121
"rubygem_puppet": "8.8.1",
2222
"rubygem_facter": "4.8.0",
2323
"rubygem_voxpupuli_test": "9.0.0",

0 commit comments

Comments
 (0)