Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #9 from voxpupuli/allow_build_for_7_and_8
Browse files Browse the repository at this point in the history
allow to build puppet 8 and 7 versions
rwaffen authored Oct 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 04092e5 + 7699518 commit 321daca
Showing 2 changed files with 22 additions and 8 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ on:
- 'main'
tags:
- '*'
workflow_dispatch:

jobs:
build-and-push-container:
@@ -16,8 +17,20 @@ jobs:
contents: read
packages: write
steps:
- uses: voxpupuli/gha-build-and-publish-a-container@v2
- name: Build PuppetDB 7 container
uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_args: 'PUPPET_VERSION=7'
build_arch: linux/amd64,linux/arm64
buildfile: puppetdb/Dockerfile
buildfile: 'puppetdb/Dockerfile'
if: ${{ startsWith(github.ref_name, 'v7') }}

- name: Build PuppetDB 8 container
uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_args: 'PUPPET_VERSION=8'
build_arch: linux/amd64,linux/arm64
buildfile: 'puppetdb/Dockerfile'
if: ${{ startsWith(github.ref_name, 'v8') }}
13 changes: 7 additions & 6 deletions puppetdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -81,9 +81,11 @@ RUN apt update && \

FROM base as release

ARG PUPPET_VERSION
ENV PUPPET_VERSION=${PUPPET_VERSION:-7}

ARG version
ARG UBUNTU_CODENAME
ARG deb_uri=https://apt.puppetlabs.com/puppet7-release-$UBUNTU_CODENAME.deb

######################################################
# final image
@@ -97,17 +99,16 @@ ARG vcs_ref
ARG version
ARG build_date
ARG build_type
ARG deb_uri
# used by entrypoint to submit metrics to Google Analytics;
# published images should use "production" for this build_arg
ARG pupperware_analytics_stream="dev"
ARG LOGDIR

# hadolint ignore=DL3020
ADD $deb_uri /puppet.deb
ENV PUPPET_DEB=puppet${PUPPET_VERSION}-release-$UBUNTU_CODENAME.deb
ADD https://apt.puppet.com/${PUPPET_DEB} /${PUPPET_DEB}

RUN dpkg -i /puppet.deb && \
rm /puppet.deb && \
RUN dpkg -i /${PUPPET_DEB} && \
rm /${PUPPET_DEB} && \
apt update && \
apt install --no-install-recommends -y puppetdb && \
apt autoremove && \

0 comments on commit 321daca

Please sign in to comment.