Skip to content

Commit

Permalink
AEIM-3241 - Upgrade to puppet 6 and update dependencies
Browse files Browse the repository at this point in the history
Also added a github actions CI workflow as an alternative to Travis. Had
to remove ec2tagfacts from the fixtures file due to a strange bug where
github's servers kept showing sh errors like this:

    nebula::role::mgetit_log
      on debian-9-x86_64
    sh: 30: Syntax error: Unterminated quoted string
    sh: 30: Syntax error: Unterminated quoted string
    sh: 30: Syntax error: Unterminated quoted string
    sh: 30: Syntax error: Unterminated quoted string
    sh: 30: Syntax error: Unterminated quoted string
    sh: 30: Syntax error: Unterminated quoted string
        is expected to compile using default hieradata

This would happen for each individual test, and each error would take a
few seconds, so the entire suite would time out every time. This
happened using docker compose, vanilla docker, and just with github's
ruby action, and I never managed to replicate it on my own workstation,
so we remain completely ignorant as to why this happened.

But removing ec2tagfacts from the fixtures file fixed it without
breaking any tests, so away it goes.
  • Loading branch information
daaang committed Jan 19, 2021
1 parent c9a20f3 commit 799ad80
Show file tree
Hide file tree
Showing 16 changed files with 230 additions and 157 deletions.
62 changes: 37 additions & 25 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,61 @@ fixtures:
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
ref: "4.25.1"
ref: "6.5.0"
apache:
repo: "puppetlabs/apache"
ref: "3.4.0"
ref: "5.8.0"
apt:
repo: "puppetlabs/apt"
ref: "4.5.1"
ref: "7.6.0"
archive:
repo: "puppet/archive"
ref: "3.2.1"
ref: "4.6.0"
concat:
repo: "puppetlabs/concat"
ref: "4.2.0"
ref: "6.3.0"
docker:
repo: "puppetlabs/docker"
ref: "3.4.0"
ref: "3.12.1"
firewall:
repo: "puppetlabs/firewall"
ref: "1.1.3"
ref: "2.7.0"
inifile:
repo: "puppetlabs/inifile"
ref: "1.1.3"
ref: "4.3.1"
lvm:
repo: "puppetlabs/lvm"
ref: "1.0.1"
mysql:
repo: "puppetlabs/mysql"
ref: "8.0.0"
ref: "10.8.0"
ntp:
repo: "puppetlabs/ntp"
ref: "7.4.0"
ref: "8.4.0"
postgresql:
repo: "puppetlabs/postgresql"
ref: "5.2.1"
ref: "6.8.0"
puppetdb:
repo: "puppetlabs/puppetdb"
ref: "6.0.2"
ref: "7.7.0"
reboot:
repo: "puppetlabs/reboot"
ref: "2.0.0"
ref: "3.1.0"
logrotate:
repo: "puppet/logrotate"
ref: "3.4.0"
ref: "5.0.0"
letsencrypt:
repo: "puppet/letsencrypt"
ref: "5.0.0"
ref: "6.0.0"
nginx:
repo: "puppet/nginx"
ref: "0.15.0"
ref: "2.1.1"
php:
repo: "puppet/php"
ref: "6.0.2"
ref: "7.1.0"
debconf:
repo: "stm/debconf"
ref: "2.1.0"
ref: "3.2.0"
kmod:
repo: "camptocamp/kmod"
ref: "2.1.0"
Expand All @@ -78,19 +78,31 @@ fixtures:
ref: "2.2.0"
resolv_conf:
repo: "saz/resolv_conf"
ref: "3.1.0"
ec2tagfacts:
repo: "bryana/ec2tagfacts"
ref: "0.3.0"
ref: "4.2.1"
java:
repo: "puppetlabs/java"
ref: "3.3.0"
ref: "6.4.0"
java_ks:
repo: "puppetlabs/java_ks"
ref: "2.3.0"
ref: "3.3.0"
confluence:
repo: "puppet/confluence"
ref: "3.2.0"
jira:
repo: "puppet/jira"
ref: "3.5.2"
ref: "4.0.1"
augeas_core:
repo: "puppetlabs/augeas_core"
ref: "1.1.1"
cron_core:
repo: "puppetlabs/cron_core"
ref: "1.0.5"
host_core:
repo: "puppetlabs/host_core"
ref: "1.0.3"
mount_core:
repo: "puppetlabs/mount_core"
ref: "1.0.4"
sshkeys_core:
repo: "puppetlabs/sshkeys_core"
ref: "2.2.0"
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Run CI

on:
push:
branches: [$default-branch]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run lint
docker-compose --file docker-compose.test.yml run specs
25 changes: 18 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
FROM ruby:2.5-stretch
FROM ruby:2.5
ARG UNAME=app
ARG UID=1000
ARG GID=1000
ARG APP_HOME=/app
ARG GEM_HOME=/gems

RUN gem install 'bundler:~>1.17.3' 'bundler:~>2.0.2'
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -d $APP_HOME -u $UID -g $GID -o -s /bin/bash $UNAME
RUN mkdir -p $GEM_HOME && chown $UID:$GID $GEM_HOME

COPY Gemfile* /usr/src/nebula/
WORKDIR /usr/src/nebula
USER $UNAME
RUN gem install 'bundler:~>1.17.3' 'bundler:~>2.0.2'
COPY --chown=$UID:$GID Gemfile* ${APP_HOME}/
ENV BUNDLE_GEMFILE=${APP_HOME}/Gemfile
ENV BUNDLE_PATH=${GEM_HOME}
WORKDIR ${APP_HOME}

ENV BUNDLE_PATH /gems
RUN bundle install

COPY . /usr/src/nebula/
CMD ["/bin/bash"]
COPY --chown=$UID:$GID . ${APP_HOME}

CMD ["bundle exec rake spec"]
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ group :development do
gem "faker"
end

gem 'puppet', '~> 5.5'
gem 'puppet', '~> 6.19'
gem 'puppet-strings'
gem 'semantic_puppet'
gem 'yard', '>= 0.9.20'
Expand Down
107 changes: 67 additions & 40 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@ GEM
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
ast (2.4.1)
codecov (0.1.21)
json
simplecov
coderay (1.1.3)
concurrent-ruby (1.1.7)
deep_merge (1.2.1)
diff-lcs (1.4.4)
docile (1.3.2)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
facter (2.5.7)
facterdb (1.4.0)
facter (< 4.0.0)
facter (4.0.46)
hocon (~> 1.3)
thor (>= 1.0.1, < 2.0)
facterdb (1.5.0)
facter (< 5.0.0)
jgrep
faker (2.13.0)
faker (2.15.1)
i18n (>= 1.6, < 2)
fast_gettext (1.1.2)
gettext (3.2.9)
Expand All @@ -25,12 +32,15 @@ GEM
gettext (>= 3.0.2, < 3.3.0)
locale
hiera (3.6.0)
hirb (0.7.3)
hocon (1.3.1)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jgrep (1.5.3)
jgrep (1.5.4)
json (2.3.1)
json-schema (2.8.1)
addressable (>= 2.4)
Expand All @@ -42,51 +52,58 @@ GEM
method_source (0.8.2)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mime-types-data (3.2020.1104)
minitar (0.9)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.15.0)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (4.2.0)
net-telnet (0.2.0)
net-ssh (6.1.0)
net-telnet (0.1.1)
netrc (0.11.0)
parallel (1.19.2)
parallel (1.20.1)
parallel_tests (2.14.2)
parallel
parser (2.7.1.4)
ast (~> 2.4.1)
parser (2.5.1.2)
ast (~> 2.4.0)
pathspec (0.2.1)
powerpack (0.1.2)
powerpack (0.1.3)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (4.0.5)
puppet (5.5.21)
facter (> 2.0.1, < 4)
fast_gettext (~> 1.1.2)
public_suffix (4.0.6)
puppet (6.19.1)
concurrent-ruby (~> 1.0)
deep_merge (~> 1.0)
facter (> 2.0.1, < 5)
fast_gettext (~> 1.1)
hiera (>= 3.2.1, < 4)
httpclient (~> 2.8)
locale (~> 2.1)
multi_json (~> 1.10)
puppet-blacksmith (6.0.0)
puppet-modulebuilder (~> 0.1)
puppet-resource_api (~> 1.5)
semantic_puppet (~> 1.0)
puppet-blacksmith (6.1.0)
puppet-modulebuilder (~> 0.2)
rest-client (~> 2.0)
puppet-lint (2.4.2)
puppet-module-posix-default-r2.5 (0.5.0)
puppet-module-posix-dev-r2.5 (0.3.4)
puppet-module-posix-default-r2.5 (0.5.3)
puppet-module-posix-dev-r2.5 (0.3.14)
codecov (~> 0.1.10)
gettext-setup (~> 0.26)
metadata-json-lint (>= 2.0.2, < 3.0.0)
mocha (>= 1.0.0, < 1.2.0)
parallel_tests (>= 2.14.1, < 2.14.3)
parser (~> 2.5.1.2)
pry (~> 0.10.4)
puppet-blacksmith (>= 3.4.0)
puppet-lint (>= 2.3.0, < 3.0.0)
puppet-strings (~> 2.0)
puppet-syntax (>= 2.4.1, < 3.0.0)
puppet_pot_generator (~> 1.0)
puppetlabs_spec_helper (>= 2.8.0, < 3.0.0)
puppetlabs_spec_helper (>= 2.9.0, < 3.0.0)
rainbow (~> 2.0)
rspec-puppet (>= 2.3.2, < 3.0.0)
rspec-puppet-facts (~> 1.8)
Expand All @@ -95,10 +112,13 @@ GEM
rubocop-i18n (~> 1.2.0)
rubocop-rspec (~> 1.16.0)
simplecov (>= 0.14.1, < 1.0.0)
specinfra (= 2.67.3)
simplecov-console (~> 0.4.2)
specinfra (= 2.76.7)
puppet-modulebuilder (0.2.1)
minitar (~> 0.6)
pathspec (~> 0.2.1)
puppet-resource_api (1.8.13)
hocon (>= 1.0)
puppet-strings (2.5.0)
rgen
yard (~> 0.9.5)
Expand All @@ -122,19 +142,19 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rgen (0.8.2)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-puppet (2.7.10)
rspec-support (~> 3.10.0)
rspec-puppet (2.8.0)
rspec
rspec-puppet-facts (1.10.0)
facter
Expand All @@ -147,7 +167,7 @@ GEM
puppetlabs_spec_helper
rspec
rspec-puppet
rspec-support (3.9.3)
rspec-support (3.10.0)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.49.1)
Expand All @@ -164,18 +184,25 @@ GEM
ruby-progressbar (1.10.1)
semantic_puppet (1.0.2)
sfl (2.3)
simplecov (0.19.0)
simplecov (0.20.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
simplecov_json_formatter (~> 0.1)
simplecov-console (0.4.2)
ansi
hirb
simplecov
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
slop (3.6.0)
spdx-licenses (1.2.0)
specinfra (2.67.3)
specinfra (2.76.7)
net-scp
net-ssh (>= 2.7, < 5.0)
net-telnet
net-ssh (>= 2.7)
net-telnet (= 0.1.1)
sfl
text (1.3.1)
thor (1.0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
Expand All @@ -188,7 +215,7 @@ PLATFORMS
DEPENDENCIES
faker
fast_gettext
puppet (~> 5.5)
puppet (~> 6.19)
puppet-module-posix-default-r2.5
puppet-module-posix-dev-r2.5
puppet-strings
Expand Down
Loading

0 comments on commit 799ad80

Please sign in to comment.