Skip to content

Commit

Permalink
(maint) Updates to run container tests on ruby 2.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Rhodes committed May 29, 2019
1 parent e7ac81f commit 06f50c1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ matrix:
- stage: r10k tests
rvm: jruby
- stage: r10k container tests
language: generic
language: ruby
rvm: 2.5.5
env:
- DOCKER_COMPOSE_VERSION=1.24.0
script:
- cd docker && make lint && make build && make test
- |
set -ex
sudo rm /usr/local/bin/docker-compose
curl --location https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname --kernel-name`-`uname --machine` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
cd docker
make lint
make build
make test
set +x
10 changes: 8 additions & 2 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ build_date := $(shell date -u +%FT%T)
hadolint_available := $(shell hadolint --help > /dev/null 2>&1; echo $$?)
hadolint_command := hadolint --ignore DL3008 --ignore DL3018 --ignore DL4000 --ignore DL4001
hadolint_container := hadolint/hadolint:latest
pwd := $(shell pwd)
export BUNDLE_PATH = $(pwd)/.bundle/gems
export BUNDLE_BIN = $(pwd)/.bundle/bin
export GEMFILE = $(pwd)/Gemfile

ifeq ($(IS_NIGHTLY),true)
dockerfile := Dockerfile.nightly
Expand Down Expand Up @@ -45,8 +49,10 @@ ifeq ($(IS_LATEST),true)
endif

test: prep
@bundle install --path .bundle/gems
@PUPPET_TEST_DOCKER_IMAGE=$(NAMESPACE)/r10k:$(version) bundle exec rspec r10k/spec
@bundle install --path $$BUNDLE_PATH --gemfile $$GEMFILE
@PUPPET_TEST_DOCKER_IMAGE=$(NAMESPACE)/r10k:$(version) \
bundle exec --gemfile $$GEMFILE \
rspec r10k/spec

push-image: prep
@docker push $(NAMESPACE)/r10k:$(version)
Expand Down

0 comments on commit 06f50c1

Please sign in to comment.