Skip to content

Commit

Permalink
Merge pull request #10 from voxpupuli/update_build
Browse files Browse the repository at this point in the history
Update build
  • Loading branch information
rwaffen authored Oct 13, 2023
2 parents 321daca + 477c37d commit 9fe6752
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 51 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_args: 'PUPPET_VERSION=7'
build_args: 'PUPPET_RELEASE=7,PUPPET_VERSION=${{ github.ref_name }}}}'
build_arch: linux/amd64,linux/arm64
buildfile: 'puppetdb/Dockerfile'
if: ${{ startsWith(github.ref_name, 'v7') }}
if: ${{ startsWith(github.ref_name, '7') }}

- 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_args: 'PUPPET_RELEASE=8,PUPPET_VERSION=${{ github.ref_name }}}}'
build_arch: linux/amd64,linux/arm64
buildfile: 'puppetdb/Dockerfile'
if: ${{ startsWith(github.ref_name, 'v8') }}
if: ${{ startsWith(github.ref_name, '8') }}
26 changes: 9 additions & 17 deletions puppetdb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ FROM ubuntu:22.04 as base
ARG DUMB_INIT_VERSION="1.2.5"
ARG LOGDIR

ENV PUPPERWARE_ANALYTICS_ENABLED=false \
PUPPETDB_POSTGRES_HOSTNAME="postgres" \
ENV PUPPETDB_POSTGRES_HOSTNAME="postgres" \
PUPPETDB_POSTGRES_PORT="5432" \
PUPPETDB_POSTGRES_DATABASE="puppetdb" \
CERTNAME=puppetdb \
Expand Down Expand Up @@ -81,10 +80,12 @@ RUN apt update && \

FROM base as release

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

ARG PUPPETDB_VERSION
ENV PUPPETDB_VERSION=${PUPPETDB_VERSION:-7.14.0}

ARG version
ARG UBUNTU_CODENAME

######################################################
Expand All @@ -96,21 +97,17 @@ ARG UBUNTU_CODENAME
FROM ${build_type} as final

ARG vcs_ref
ARG version
ARG build_date
ARG build_type
# 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

ENV PUPPET_DEB=puppet${PUPPET_VERSION}-release-$UBUNTU_CODENAME.deb
ENV PUPPET_DEB=puppet${PUPPET_RELEASE}-release-${UBUNTU_CODENAME}.deb
ADD https://apt.puppet.com/${PUPPET_DEB} /${PUPPET_DEB}

RUN dpkg -i /${PUPPET_DEB} && \
rm /${PUPPET_DEB} && \
apt update && \
apt install --no-install-recommends -y puppetdb && \
apt install --no-install-recommends -y puppetdb=${PUPPETDB_VERSION}-1${UBUNTU_CODENAME} && \
apt autoremove && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p "$LOGDIR" && \
Expand All @@ -125,12 +122,7 @@ COPY logback.xml \
COPY conf.d /etc/puppetlabs/puppetdb/conf.d/
COPY puppetdb /etc/default/puppetdb

ENV PUPPERWARE_ANALYTICS_STREAM="$pupperware_analytics_stream" \
PUPPETDB_VERSION="$version"

LABEL org.label-schema.name="PuppetDB ($build_type)" \
org.label-schema.vcs-ref="$vcs_ref" \
org.label-schema.version="$version" \
org.label-schema.version="$PUPPETDB_VERSION" \
org.label-schema.build-date="$build_date"

COPY Dockerfile /
30 changes: 0 additions & 30 deletions puppetdb/docker-entrypoint.d/00-analytics.sh

This file was deleted.

0 comments on commit 9fe6752

Please sign in to comment.