-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Take a copy of the source files to build in an isolated directory | ||
mkdir -p /build | ||
cp -R /vmod-queryfilter/* /build | ||
cd /build | ||
|
||
cat << EOF > /etc/yum.repos.d/varnish.repo | ||
[varnish] | ||
name=Varnish Repository | ||
baseurl=https://packagecloud.io/varnishcache/varnish41/el/6/\$basearch | ||
enabled=1 | ||
fastestmirror_enabled=0 | ||
gpgcheck=0 | ||
gpgkey=https://packagecloud.io/varnishcache/varnish41/gpgkey | ||
EOF | ||
|
||
yum -q makecache -y --disablerepo='*' --enablerepo='varnish' | ||
yum install varnish -y | ||
|
||
# Varnish version installed | ||
VERSION=$(rpm --queryformat "%{VERSION}" -q varnish) | ||
|
||
wget "https://github.com/varnishcache/varnish-cache/archive/varnish-$VERSION.tar.gz" | ||
tar -xzf "varnish-$VERSION.tar.gz" | ||
|
||
cd "varnish-cache-varnish-$VERSION" | ||
export VARNISHSRC=$(pwd) | ||
./autogen.sh && ./configure && make | ||
|
||
cd .. | ||
|
||
./autogen.sh | ||
./configure VARNISHSRC=$VARNISHSRC | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# Take a copy of the source files to build in an isolated directory | ||
mkdir -p /build | ||
cp -R /vmod-queryfilter/* /build | ||
cd /build | ||
|
||
curl -L https://packagecloud.io/varnishcache/varnish52/gpgkey | apt-key add - | ||
|
||
cat << EOF > /etc/apt/sources.list.d/varnish.list | ||
deb https://packagecloud.io/varnishcache/varnish5/ubuntu/ trusty main | ||
deb-src https://packagecloud.io/varnishcache/varnish5/ubuntu/ trusty main | ||
EOF | ||
|
||
apt-get update -y | ||
apt-get install varnish varnish-dev -y --force-yes | ||
|
||
./autogen.sh | ||
./configure VARNISHSRC=/usr/include/varnish/ | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,9 @@ vmod_queryfilter.3 | |
|
||
# Things not to ignore | ||
!m4/ax_* | ||
|
||
# Kitchen CI | ||
.bundle/ | ||
.kitchen/ | ||
vendor/ | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
driver: | ||
name: docker | ||
privileged: true | ||
use_sudo: false | ||
# Share the code into the Kitchen Container | ||
volume: | ||
- $(pwd):/vmod-queryfilter | ||
|
||
platforms: | ||
- name: centos-6.9 | ||
provisioner: | ||
script: .build/centos6.sh | ||
driver_config: | ||
provision_command: | ||
# Update & install epel-release & yum-utils | ||
- yum update -y | ||
- yum install epel-release -y | ||
- yum install pygpgme yum-utils wget python-docutils ncurses-devel pcre-devel libedit-devel -y | ||
# Install build tools | ||
- yum groupinstall 'Development Tools' -y | ||
|
||
- name: debian-8 | ||
provisioner: | ||
script: .build/debian8.sh | ||
driver_config: | ||
image: debian:8 | ||
provision_command: | ||
# Update & install require packages | ||
- apt-get update && apt-get upgrade -y | ||
- apt-get install curl gnupg apt-transport-https debian-archive-keyring -y | ||
# Install build tools | ||
- apt-get install build-essential autotools-dev libtool automake -y | ||
|
||
|
||
provisioner: | ||
name: shell | ||
|
||
verifier: | ||
name: inspec | ||
|
||
suites: | ||
- name: centos | ||
excludes: ["debian-8"] | ||
- name: debian | ||
excludes: ["centos-6.9"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
language: ruby | ||
dist: trusty | ||
|
||
matrix: | ||
include: | ||
- rvm: 2.3 | ||
env: suite=centos-69 | ||
# - rvm: 2.3 | ||
# env: suite=debian-8 | ||
|
||
sudo: required | ||
services: docker | ||
|
||
before_script: | ||
- gem install bundler | ||
- bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --retry=3 | ||
|
||
script: bundle exec kitchen test "$suite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'inspec' | ||
gem 'test-kitchen' | ||
gem 'kitchen-docker' | ||
gem 'kitchen-inspec' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters