diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 40dff3353..a65173535 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -5,6 +5,10 @@ product_key: inspec rubygems: - inspec +docker: + build_args: + - GEM_SOURCE: http://artifactory.chef.co/omnibus-gems-local + # Slack channel in Chef Software slack to send notifications about build failures, etc slack: notify_channel: inspec-notify @@ -40,8 +44,14 @@ merge_actions: only_if: built_in:bump_version artifact_actions: + promoted_to_unstable: + - built_in:build_docker_image + promoted_to_current: + - built_in:tag_docker_image promoted_to_stable: - built_in:publish_rubygems - built_in:rollover_changelog - built_in:create_github_release + - built_in:tag_docker_image + - bash:.expeditor/update_dockerfile.sh - built_in:notify_chefio_slack_channels diff --git a/.expeditor/update_dockerfile.sh b/.expeditor/update_dockerfile.sh new file mode 100755 index 000000000..36bd62aec --- /dev/null +++ b/.expeditor/update_dockerfile.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# This file updates the default VERSION build argument in the Dockerfile to the +# VERSION passed in to the file via environment variables. +# +# This ensures the Dockerfile in inspec master will list the version of the latest +# stable release for any community member who wishes to build their own container +# from scratch. +# + +set -evx + +sed -i -r "s/^ARG VERSION=.*/ARG VERSION=${VERSION}/" Dockerfile diff --git a/Dockerfile b/Dockerfile index f7c7b78ae..034810a35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ FROM ruby:alpine +MAINTAINER Chef Software, Inc. + +ARG VERSION=1.36.1 +ARG GEM_SOURCE=https://rubygems.org + RUN mkdir /share -COPY inspec.gem / RUN apk add --update build-base libxml2-dev libffi-dev && \ - gem install /inspec.gem --no-document && \ + gem install --no-document --source ${GEM_SOURCE} --version ${VERSION} inspec && \ apk del build-base ENTRYPOINT ["inspec"] CMD ["help"]