Skip to content

Commit

Permalink
Merge pull request #326 from StackStorm/feature/puppet7-builds
Browse files Browse the repository at this point in the history
Feature/puppet7 builds
  • Loading branch information
nmaludy authored Feb 15, 2021
2 parents c7d4bb6 + e0ec184 commit 62b40fe
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 78 deletions.
45 changes: 21 additions & 24 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ jobs:
matrix:
include:
# note: actions/setup-ruby only allows using a major.minor release of ruby
- ruby: '2.5'
puppet: "6.0"
- ruby: '2.7'
puppet: "7.0"
check: "check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
name: 'static'
- ruby: '2.4'
puppet: "5.0"
check: "parallel_spec"
name: 'spec'
- ruby: '2.5'
puppet: "6.0"
check: "parallel_spec"
name: 'spec'
- ruby: '2.5'
puppet: "6.0"
- ruby: '2.7'
puppet: "7.0"
check: "parallel_spec"
name: 'spec'
- ruby: '2.7'
puppet: "7.0"
check: 'strings:generate[,,,,,,"--fail-on-warning"]'
name: "documentation"
env:
Expand Down Expand Up @@ -82,9 +82,6 @@ jobs:
matrix:
include:
# note: actions/setup-python only allows using a major.minor releases
- python: '2.7'
make_target: 'python2'
name: 'bolt tasks'
- python: '3.6'
make_target: 'python3'
name: 'bolt tasks'
Expand Down Expand Up @@ -119,22 +116,22 @@ jobs:
matrix:
include:
# note: actions/setup-ruby only allows using a major.minor release of ruby
- ruby: '2.5'
name: 'centos7-puppet5'
- ruby: '2.5'
- ruby: '2.7'
name: 'centos7-puppet6'
- ruby: '2.5'
name: 'centos7-puppet6-python36'
- ruby: '2.5'
name: 'ubuntu16-puppet5'
- ruby: '2.5'
- ruby: '2.7'
name: 'centos7-puppet7'
- ruby: '2.7'
name: 'centos7-puppet7-python36'
- ruby: '2.7'
name: 'ubuntu16-puppet6'
- ruby: '2.5'
name: 'ubuntu16-puppet6-python36'
- ruby: '2.5'
name: 'ubuntu18-puppet5'
- ruby: '2.5'
- ruby: '2.7'
name: 'ubuntu16-puppet7'
- ruby: '2.7'
name: 'ubuntu16-puppet7-python36'
- ruby: '2.7'
name: 'ubuntu18-puppet6'
- ruby: '2.7'
name: 'ubuntu18-puppet7'
env:
CHECK: '${{ matrix.check }}'
steps:
Expand Down
60 changes: 30 additions & 30 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ provisioner:
- 2

platforms:
# CentOS7 with Systemd - Puppet 5
- name: centos7-puppet5
driver:
platform: centos
dockerfile: build/centos7-puppet5/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/centos7-puppet5/Puppetfile

# CentOS7 with Systemd - Puppet 6
- name: centos7-puppet6
driver:
Expand All @@ -61,28 +50,28 @@ platforms:
provisioner:
puppetfile_path: build/centos7-puppet6/Puppetfile

# CentOS7 with Systemd - Puppet 6 - Python 3.6
- name: centos7-puppet6-python36
# CentOS7 with Systemd - Puppet 7
- name: centos7-puppet7
driver:
platform: centos
dockerfile: build/centos7-puppet6/Dockerfile.kitchen
dockerfile: build/centos7-puppet7/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/centos7-puppet6/Puppetfile
manifest: test/fullinstall_python36.pp
puppetfile_path: build/centos7-puppet7/Puppetfile

# Ubuntu Xenial with Systemd - Puppet 5
- name: ubuntu16-puppet5
# CentOS7 with Systemd - Puppet 7 - Python 3.6
- name: centos7-puppet7-python36
driver:
platform: ubuntu
dockerfile: build/ubuntu16-puppet5/Dockerfile.kitchen
platform: centos
dockerfile: build/centos7-puppet7/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/ubuntu16-puppet5/Puppetfile
puppetfile_path: build/centos7-puppet7/Puppetfile
manifest: test/fullinstall_python36.pp

# Ubuntu Xenial with Systemd - Puppet 6
- name: ubuntu16-puppet6
Expand All @@ -95,28 +84,28 @@ platforms:
provisioner:
puppetfile_path: build/ubuntu16-puppet6/Puppetfile

# Ubuntu Xenial with Systemd - Puppet 6
- name: ubuntu16-puppet6-python36
# Ubuntu Xenial with Systemd - Puppet 7
- name: ubuntu16-puppet7
driver:
platform: ubuntu
dockerfile: build/ubuntu16-puppet6/Dockerfile.kitchen
dockerfile: build/ubuntu16-puppet7/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/ubuntu16-puppet6/Puppetfile
manifest: test/fullinstall_python36.pp
puppetfile_path: build/ubuntu16-puppet7/Puppetfile

# Ubuntu Bionic with Systemd - Puppet 5
- name: ubuntu18-puppet5
# Ubuntu Xenial with Systemd - Puppet 7 - Python 3.6
- name: ubuntu16-puppet7-python36
driver:
platform: ubuntu
dockerfile: build/ubuntu18-puppet5/Dockerfile.kitchen
dockerfile: build/ubuntu16-puppet7/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/ubuntu18-puppet5/Puppetfile
puppetfile_path: build/ubuntu16-puppet7/Puppetfile
manifest: test/fullinstall_python36.pp

# Ubuntu Bionic with Systemd - Puppet 6
- name: ubuntu18-puppet6
Expand All @@ -129,6 +118,17 @@ platforms:
provisioner:
puppetfile_path: build/ubuntu18-puppet6/Puppetfile

# Ubuntu Bionic with Systemd - Puppet 7
- name: ubuntu18-puppet7
driver:
platform: ubuntu
dockerfile: build/ubuntu18-puppet7/Dockerfile.kitchen
run_command: /sbin/init
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
provisioner:
puppetfile_path: build/ubuntu18-puppet7/Puppetfile

suites:
- name: default

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
- PDK Sync to 1.18.1 (Enhancement)
Contributed by @nmaludy

- Added support for Puppet 7 (Enhancement)
Contributed by @nmaludy

- Deprecated Puppet 5. Removed Puppet 5 from build matrix (Enhancement)
Contributed by @nmaludy

## 1.7.0 (Jun 26, 2020)

- Refactored the system StackStorm repository handling. This replaces the `PackageCloud`
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ forge. We manage the module dependenies using a `Puppetfile` for each OS we supp
These `Puppetfile` can be used both with [r10k](https://github.com/puppetlabs/r10k)
and [librarian-puppet](http://librarian-puppet.com/).

* RHEL/CentOS 7 - Puppet 5 - [build/centos7-puppet5/Puppetfile](build/centos7-puppet5/Puppetfile)
* RHEL/CentOS 7 - Puppet 6 - [build/centos7-puppet6/Puppetfile](build/centos7-puppet6/Puppetfile)
* Ubuntu 16.04 - Puppet 5 - [build/ubuntu16-puppet5/Puppetfile](build/ubuntu16-puppet5/Puppetfile)
* RHEL/CentOS 7 - Puppet 7 - [build/centos7-puppet7/Puppetfile](build/centos7-puppet7/Puppetfile)
* Ubuntu 16.04 - Puppet 6 - [build/ubuntu16-puppet6/Puppetfile](build/ubuntu16-puppet6/Puppetfile)
* Ubuntu 18.04 - Puppet 5 - [build/ubuntu18-puppet5/Puppetfile](build/ubuntu18-puppet5/Puppetfile)
* Ubuntu 16.04 - Puppet 7 - [build/ubuntu16-puppet7/Puppetfile](build/ubuntu16-puppet7/Puppetfile)
* Ubuntu 18.04 - Puppet 6 - [build/ubuntu18-puppet6/Puppetfile](build/ubuntu18-puppet6/Puppetfile)
* Ubuntu 18.04 - Puppet 7 - [build/ubuntu18-puppet7/Puppetfile](build/ubuntu18-puppet7/Puppetfile)

### Beginning with st2

Expand Down Expand Up @@ -419,8 +419,8 @@ $res = run_task('st2::key_get', $stackstorm_target,

### Supported Puppet versions

* Puppet 5
* Puppet 6
* Puppet 7

#### :warning: End-of-Support Notice - Mistral

Expand All @@ -435,6 +435,15 @@ Support for CentOS 6 has been dropped as of StackStorm `3.3.0`.

As of version `1.8` this module no longer supports CentOS 6, so changes will not be tested against this platform.

#### :warning: Deprecation Notice - Puppet 5

Puppet 5 reaches End of Life on 2021-12-31. As of version `2.0` use of Puppet 5 with this module
is officially deprecated.

* This module no longer tests against Puppet 5 in its build matrix.
* The next major release of the module will drop support for Puppet 5 by adjusting the
minimum supported Puppet version in `metadata.json`.

#### :warning: Deprecation Notice - Puppet 4

Puppet 4 reached End of Life on 2018-12-31. As of version `1.4` use of Puppet 4 with this module
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-puppet5 -f build/puppet5/Dockerfile .
# docker build -t stackstorm/puppet-st2-puppet7 -f build/puppet7/Dockerfile .

FROM stackstorm/packagingtest:centos7-systemd

Expand All @@ -8,16 +8,16 @@ RUN yum -y install gcc gcc-c++ make which openssl
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
RUN /bin/bash -l -c "rvm install 2.4.4"
RUN /bin/bash -l -c "rvm use 2.4.4 --default"
RUN /bin/bash -l -c "rvm install 2.7.2"
RUN /bin/bash -l -c "rvm use 2.7.2 --default"
RUN /bin/bash -l -c "gem install bundler --no-rdoc --no-ri"

# install puppet
RUN yum -y install https://yum.puppet.com/puppet5/puppet5-release-el-7.noarch.rpm
RUN yum -y install https://yum.puppet.com/puppet7/puppet7-release-el-7.noarch.rpm
RUN yum -y install puppet-agent
ENV PATH="/opt/puppetlabs/bin:${PATH}"

# print versions (ruby 2.4.x, puppet 5.x)
# print versions (ruby 2.x, puppet x)
RUN /bin/bash -l -c "ruby --version"
RUN /bin/bash -l -c "gem --version"
RUN /bin/bash -l -c "bundle --version"
Expand All @@ -30,7 +30,7 @@ WORKDIR $APP_HOME
COPY . $APP_HOME

# use bundler to install our gems
ENV PUPPET_GEM_VERSION "~> 5.0"
ENV PUPPET_GEM_VERSION "~> 7.0"
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=2 \
BUNDLE_PATH=/bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-puppet5 -f build/puppet5/Dockerfile.kitchen .
# docker build -t stackstorm/puppet-st2-puppet7 -f build/puppet7/Dockerfile.kitchen .

FROM stackstorm/packagingtest:centos7-systemd

Expand All @@ -24,14 +24,14 @@ RUN yum -y upgrade
RUN sed -i '/nodocs/d' /etc/yum.conf

# install puppet
RUN yum -y install https://yum.puppet.com/puppet5/puppet5-release-el-7.noarch.rpm
RUN yum -y install https://yum.puppet.com/puppet7/puppet7-release-el-7.noarch.rpm
RUN yum -y install puppet-agent
ENV PATH="/opt/puppetlabs/bin:${PATH}"
RUN ln -s /opt/puppetlabs/bin/facter /usr/bin/
RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/

# print versions (ruby 2.4.x, puppet 5.x)
# print versions (ruby 2.5.x, puppet 7.x)
RUN puppet --version
RUN sudo -E puppet --version
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-ubuntu16-puppet5 -f build/ubuntu16-puppet5/Dockerfile.kitchen .
# docker build -t stackstorm/puppet-st2-ubuntu16-puppet7 -f build/ubuntu16-puppet7/Dockerfile.kitchen .

FROM stackstorm/packagingtest:xenial-systemd

Expand All @@ -19,9 +19,9 @@ RUN echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/auth
RUN sudo apt-get -y update

# install puppet
# https://puppet.com/docs/puppet/5.5/puppet_platform.html#apt-based-systems
RUN wget https://apt.puppetlabs.com/puppet5-release-xenial.deb
RUN sudo dpkg -i puppet5-release-xenial.deb
# https://puppet.com/docs/puppet/7.0/puppet_platform.html
RUN wget https://apt.puppetlabs.com/puppet7-release-xenial.deb
RUN sudo dpkg -i puppet7-release-xenial.deb
RUN sudo apt-get -y update
RUN sudo apt-get -y install puppet-agent

Expand All @@ -32,6 +32,6 @@ RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/

# print versions (ruby 2.4.x, puppet 5.x)
# print versions (ruby 2.5.x, puppet 7.x)
RUN puppet --version
RUN sudo -E puppet --version
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# usage (from the root of the puppet-st2/ directory):
# docker build -t stackstorm/puppet-st2-ubuntu18-puppet5 -f build/ubuntu18-puppet5/Dockerfile.kitchen .
# docker build -t stackstorm/puppet-st2-ubuntu18-puppet7 -f build/ubuntu18-puppet7/Dockerfile.kitchen .

FROM stackstorm/packagingtest:bionic-systemd

Expand All @@ -19,9 +19,9 @@ RUN echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/auth
RUN sudo apt-get -y update

# install puppet
# https://puppet.com/docs/puppet/5.5/puppet_platform.html#apt-based-systems
RUN wget https://apt.puppetlabs.com/puppet5-release-bionic.deb
RUN sudo dpkg -i puppet5-release-bionic.deb
# https://puppet.com/docs/puppet/7.0/puppet_platform.html
RUN wget https://apt.puppetlabs.com/puppet7-release-bionic.deb
RUN sudo dpkg -i puppet7-release-bionic.deb
RUN sudo apt-get -y update
RUN sudo apt-get -y install puppet-agent

Expand All @@ -32,6 +32,6 @@ RUN ln -s /opt/puppetlabs/bin/hiera /usr/bin/
RUN ln -s /opt/puppetlabs/bin/mco /usr/bin/
RUN ln -s /opt/puppetlabs/bin/puppet /usr/bin/

# print versions (ruby 2.4.x, puppet 5.x)
# print versions (ruby 2.5.x, puppet 7.x)
RUN puppet --version
RUN sudo -E puppet --version
File renamed without changes.
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.7.0 < 7.0.0"
"version_requirement": ">= 4.10.0 < 8.0.0"
}
],
"pdk-version": "1.19.0.pre (102)",
Expand Down

0 comments on commit 62b40fe

Please sign in to comment.