Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F904944
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 29, 5:58 PM
Size
22 KB
Mime Type
text/x-diff
Expires
Sun, Aug 31, 5:58 PM (21 h, 40 m)
Engine
blob
Format
Raw Data
Handle
252342
Attached To
rDOCKERWEBDNS webdns_docker
View Options
diff --git a/ci/bundle_helper/Dockerfile b/ci/bundle_helper/Dockerfile
new file mode 100644
index 0000000..a4cf0cd
--- /dev/null
+++ b/ci/bundle_helper/Dockerfile
@@ -0,0 +1,15 @@
+FROM debian:jessie
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -q 2 && apt-get install -y --no-install-recommends git \
+ bundler \
+ ruby-dev \
+ libgmp-dev \
+ build-essential \
+ nodejs \
+ mysql-client
+RUN git clone https://repo.grnet.gr/source/webdns.git /srv/webdns
+RUN apt-get install -y --no-install-recommends capistrano unicorn rails ruby-mysql2 ruby-jquery-rails libmysqlclient-dev
+
+WORKDIR /srv/webdns
+ENTRYPOINT ["bundle","install","--deployment"]
diff --git a/ci/ruby_tests/rake/Dockerfile b/ci/ruby_tests/rake/Dockerfile
new file mode 100644
index 0000000..afaf409
--- /dev/null
+++ b/ci/ruby_tests/rake/Dockerfile
@@ -0,0 +1,21 @@
+FROM debian:jessie
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -q 2 && apt-get install -y --no-install-recommends git \
+ bundler \
+ ruby-dev \
+ libgmp-dev \
+ build-essential \
+ nodejs \
+ mysql-client
+RUN git clone https://repo.grnet.gr/source/webdns.git /srv/webdns
+RUN apt-get install -y --no-install-recommends capistrano unicorn rails ruby-mysql2 ruby-jquery-rails
+WORKDIR /srv/webdns
+RUN bundle install
+
+EXPOSE 8080
+COPY seeds_policies.rb /
+COPY seeds_users.rb /
+COPY entrypoint.sh /
+RUN chmod u+x /entrypoint.sh
+ENTRYPOINT ["/entrypoint.sh"]
diff --git a/ci/ruby_tests/rake/entrypoint.sh b/ci/ruby_tests/rake/entrypoint.sh
new file mode 100644
index 0000000..46863c9
--- /dev/null
+++ b/ci/ruby_tests/rake/entrypoint.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+if [ -z "${MYSQL_HOST}" ]; then
+ echo "You need to specify a mysql host."
+ exit
+fi
+
+MYSQL_DATABASE=${MYSQL_DATABASE-dns}
+MYSQL_USER=${MYSQL_USER-dns}
+MYSQL_PORT=${MYSQL_PORT-3306}
+MYSQL_PASSWORD=${MYSQL_PASSWORD-12345}
+
+MYSQL_TEST_DATABASE="${MYSQL_DATABASE}_test"
+
+sleep 20
+
+cat << EOF > /srv/webdns/config/database.yml
+development:
+ database: ${MYSQL_DATABASE}
+ adapter: mysql2
+ encoding: utf8
+ username: ${MYSQL_USER}
+ password: ${MYSQL_PASSWORD}
+ host: ${MYSQL_HOST}
+
+test:
+ database: ${MYSQL_TEST_DATABASE}
+ adapter: mysql2
+ encoding: utf8
+ username: ${MYSQL_USER}
+ password: ${MYSQL_PASSWORD}
+ host: ${MYSQL_HOST}
+EOF
+
+/usr/bin/rake db:migrate
+/usr/bin/rails runner /seeds_users.rb
+#/usr/bin/rails runner seeds_policies.rb
+cd /srv/webdns
+rake test
diff --git a/ci/ruby_tests/rake/seeds_policies.rb b/ci/ruby_tests/rake/seeds_policies.rb
new file mode 100644
index 0000000..31aed85
--- /dev/null
+++ b/ci/ruby_tests/rake/seeds_policies.rb
@@ -0,0 +1,133 @@
+policies = {}
+policies[:default] = <<-POLICY
+<?xml version="1.0"?>
+<KASP>
+ <Policy name="default">
+ <Description>A default policy that will amaze you and your friends</Description>
+ <Signatures>
+ <Resign>PT7200S</Resign>
+ <Refresh>PT259200S</Refresh>
+ <Validity>
+ <Default>PT1209600S</Default>
+ <Denial>PT1209600S</Denial>
+ </Validity>
+ <Jitter>PT43200S</Jitter>
+ <InceptionOffset>PT3600S</InceptionOffset>
+ </Signatures>
+ <Denial>
+ <NSEC3>
+ <Resalt>PT8640000S</Resalt>
+ <Hash>
+ <Algorithm>1</Algorithm>
+ <Iterations>5</Iterations>
+ <Salt length="8"/>
+ </Hash>
+ </NSEC3>
+ </Denial>
+ <Keys>
+ <TTL>PT3600S</TTL>
+ <RetireSafety>PT3600S</RetireSafety>
+ <PublishSafety>PT3600S</PublishSafety>
+ <Purge>PT1209600S</Purge>
+ <KSK>
+ <Algorithm length="2048">8</Algorithm>
+ <Lifetime>PT31536000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </KSK>
+ <ZSK>
+ <Algorithm length="1024">8</Algorithm>
+ <Lifetime>PT7776000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </ZSK>
+ </Keys>
+ <Zone>
+ <PropagationDelay>PT43200S</PropagationDelay>
+ <SOA>
+ <TTL>PT3600S</TTL>
+ <Minimum>PT3600S</Minimum>
+ <Serial>unixtime</Serial>
+ </SOA>
+ </Zone>
+ <Parent>
+ <PropagationDelay>PT9999S</PropagationDelay>
+ <DS>
+ <TTL>PT3600S</TTL>
+ </DS>
+ <SOA>
+ <TTL>PT172800S</TTL>
+ <Minimum>PT10800S</Minimum>
+ </SOA>
+ </Parent>
+ </Policy>
+</KASP>
+POLICY
+policies[:lab] = <<-POLICY
+<?xml version="1.0"?>
+<KASP>
+ <Policy name="lab">
+ <Description>Quick turnaround policy for lab work</Description>
+ <Signatures>
+ <Resign>PT600S</Resign>
+ <Refresh>PT1800S</Refresh>
+ <Validity>
+ <Default>PT3600S</Default>
+ <Denial>PT3600S</Denial>
+ </Validity>
+ <Jitter>PT60S</Jitter>
+ <InceptionOffset>PT3600S</InceptionOffset>
+ </Signatures>
+ <Denial>
+ <NSEC3>
+ <Resalt>PT8640000S</Resalt>
+ <Hash>
+ <Algorithm>1</Algorithm>
+ <Iterations>5</Iterations>
+ <Salt length="8"/>
+ </Hash>
+ </NSEC3>
+ </Denial>
+ <Keys>
+ <TTL>PT300S</TTL>
+ <RetireSafety>PT360S</RetireSafety>
+ <PublishSafety>PT360S</PublishSafety>
+ <Purge>PT432000S</Purge>
+ <KSK>
+ <Algorithm length="2048">8</Algorithm>
+ <Lifetime>PT31536000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </KSK>
+ <ZSK>
+ <Algorithm length="1024">8</Algorithm>
+ <Lifetime>PT14400S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </ZSK>
+ </Keys>
+ <Zone>
+ <PropagationDelay>PT30S</PropagationDelay>
+ <SOA>
+ <TTL>PT300S</TTL>
+ <Minimum>PT300S</Minimum>
+ <Serial>counter</Serial>
+ </SOA>
+ </Zone>
+ <Parent>
+ <PropagationDelay>PT9999S</PropagationDelay>
+ <DS>
+ <TTL>PT3600S</TTL>
+ </DS>
+ <SOA>
+ <TTL>PT172800S</TTL>
+ <Minimum>PT10800S</Minimum>
+ </SOA>
+ </Parent>
+ </Policy>
+</KASP>
+POLICY
+
+policies.each_pair { |name, policy|
+ DnssecPolicy.create(name: name, policy: policy)
+}
diff --git a/ci/ruby_tests/rake/seeds_users.rb b/ci/ruby_tests/rake/seeds_users.rb
new file mode 100644
index 0000000..fe4e228
--- /dev/null
+++ b/ci/ruby_tests/rake/seeds_users.rb
@@ -0,0 +1,4 @@
+users = []
+users << User.create!(email: 'admin@example.com', password: 'adminadmin')
+g_admin = Group.create!(name: 'admin')
+g_admin.users << users.first
diff --git a/ci/ruby_tests/reek/Dockerfile b/ci/ruby_tests/reek/Dockerfile
new file mode 100644
index 0000000..7c7cee6
--- /dev/null
+++ b/ci/ruby_tests/reek/Dockerfile
@@ -0,0 +1,22 @@
+FROM debian:jessie
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -q 2 && apt-get install -y --no-install-recommends git \
+ bundler \
+ ruby-dev \
+ libgmp-dev \
+ build-essential \
+ nodejs \
+ mysql-client
+RUN git clone https://repo.grnet.gr/source/webdns.git /srv/webdns
+RUN apt-get install -y --no-install-recommends capistrano unicorn rails ruby-mysql2 ruby-jquery-rails
+WORKDIR /srv/webdns
+RUN bundle install
+RUN gem install reek -v 4.8.2
+
+EXPOSE 8080
+COPY seeds_policies.rb /
+COPY seeds_users.rb /
+COPY entrypoint.sh /
+RUN chmod u+x /entrypoint.sh
+ENTRYPOINT ["reek","/srv/webdns"]
diff --git a/ci/ruby_tests/reek/entrypoint.sh b/ci/ruby_tests/reek/entrypoint.sh
new file mode 100644
index 0000000..46863c9
--- /dev/null
+++ b/ci/ruby_tests/reek/entrypoint.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+if [ -z "${MYSQL_HOST}" ]; then
+ echo "You need to specify a mysql host."
+ exit
+fi
+
+MYSQL_DATABASE=${MYSQL_DATABASE-dns}
+MYSQL_USER=${MYSQL_USER-dns}
+MYSQL_PORT=${MYSQL_PORT-3306}
+MYSQL_PASSWORD=${MYSQL_PASSWORD-12345}
+
+MYSQL_TEST_DATABASE="${MYSQL_DATABASE}_test"
+
+sleep 20
+
+cat << EOF > /srv/webdns/config/database.yml
+development:
+ database: ${MYSQL_DATABASE}
+ adapter: mysql2
+ encoding: utf8
+ username: ${MYSQL_USER}
+ password: ${MYSQL_PASSWORD}
+ host: ${MYSQL_HOST}
+
+test:
+ database: ${MYSQL_TEST_DATABASE}
+ adapter: mysql2
+ encoding: utf8
+ username: ${MYSQL_USER}
+ password: ${MYSQL_PASSWORD}
+ host: ${MYSQL_HOST}
+EOF
+
+/usr/bin/rake db:migrate
+/usr/bin/rails runner /seeds_users.rb
+#/usr/bin/rails runner seeds_policies.rb
+cd /srv/webdns
+rake test
diff --git a/ci/ruby_tests/reek/seeds_policies.rb b/ci/ruby_tests/reek/seeds_policies.rb
new file mode 100644
index 0000000..31aed85
--- /dev/null
+++ b/ci/ruby_tests/reek/seeds_policies.rb
@@ -0,0 +1,133 @@
+policies = {}
+policies[:default] = <<-POLICY
+<?xml version="1.0"?>
+<KASP>
+ <Policy name="default">
+ <Description>A default policy that will amaze you and your friends</Description>
+ <Signatures>
+ <Resign>PT7200S</Resign>
+ <Refresh>PT259200S</Refresh>
+ <Validity>
+ <Default>PT1209600S</Default>
+ <Denial>PT1209600S</Denial>
+ </Validity>
+ <Jitter>PT43200S</Jitter>
+ <InceptionOffset>PT3600S</InceptionOffset>
+ </Signatures>
+ <Denial>
+ <NSEC3>
+ <Resalt>PT8640000S</Resalt>
+ <Hash>
+ <Algorithm>1</Algorithm>
+ <Iterations>5</Iterations>
+ <Salt length="8"/>
+ </Hash>
+ </NSEC3>
+ </Denial>
+ <Keys>
+ <TTL>PT3600S</TTL>
+ <RetireSafety>PT3600S</RetireSafety>
+ <PublishSafety>PT3600S</PublishSafety>
+ <Purge>PT1209600S</Purge>
+ <KSK>
+ <Algorithm length="2048">8</Algorithm>
+ <Lifetime>PT31536000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </KSK>
+ <ZSK>
+ <Algorithm length="1024">8</Algorithm>
+ <Lifetime>PT7776000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </ZSK>
+ </Keys>
+ <Zone>
+ <PropagationDelay>PT43200S</PropagationDelay>
+ <SOA>
+ <TTL>PT3600S</TTL>
+ <Minimum>PT3600S</Minimum>
+ <Serial>unixtime</Serial>
+ </SOA>
+ </Zone>
+ <Parent>
+ <PropagationDelay>PT9999S</PropagationDelay>
+ <DS>
+ <TTL>PT3600S</TTL>
+ </DS>
+ <SOA>
+ <TTL>PT172800S</TTL>
+ <Minimum>PT10800S</Minimum>
+ </SOA>
+ </Parent>
+ </Policy>
+</KASP>
+POLICY
+policies[:lab] = <<-POLICY
+<?xml version="1.0"?>
+<KASP>
+ <Policy name="lab">
+ <Description>Quick turnaround policy for lab work</Description>
+ <Signatures>
+ <Resign>PT600S</Resign>
+ <Refresh>PT1800S</Refresh>
+ <Validity>
+ <Default>PT3600S</Default>
+ <Denial>PT3600S</Denial>
+ </Validity>
+ <Jitter>PT60S</Jitter>
+ <InceptionOffset>PT3600S</InceptionOffset>
+ </Signatures>
+ <Denial>
+ <NSEC3>
+ <Resalt>PT8640000S</Resalt>
+ <Hash>
+ <Algorithm>1</Algorithm>
+ <Iterations>5</Iterations>
+ <Salt length="8"/>
+ </Hash>
+ </NSEC3>
+ </Denial>
+ <Keys>
+ <TTL>PT300S</TTL>
+ <RetireSafety>PT360S</RetireSafety>
+ <PublishSafety>PT360S</PublishSafety>
+ <Purge>PT432000S</Purge>
+ <KSK>
+ <Algorithm length="2048">8</Algorithm>
+ <Lifetime>PT31536000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </KSK>
+ <ZSK>
+ <Algorithm length="1024">8</Algorithm>
+ <Lifetime>PT14400S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </ZSK>
+ </Keys>
+ <Zone>
+ <PropagationDelay>PT30S</PropagationDelay>
+ <SOA>
+ <TTL>PT300S</TTL>
+ <Minimum>PT300S</Minimum>
+ <Serial>counter</Serial>
+ </SOA>
+ </Zone>
+ <Parent>
+ <PropagationDelay>PT9999S</PropagationDelay>
+ <DS>
+ <TTL>PT3600S</TTL>
+ </DS>
+ <SOA>
+ <TTL>PT172800S</TTL>
+ <Minimum>PT10800S</Minimum>
+ </SOA>
+ </Parent>
+ </Policy>
+</KASP>
+POLICY
+
+policies.each_pair { |name, policy|
+ DnssecPolicy.create(name: name, policy: policy)
+}
diff --git a/ci/ruby_tests/reek/seeds_users.rb b/ci/ruby_tests/reek/seeds_users.rb
new file mode 100644
index 0000000..fe4e228
--- /dev/null
+++ b/ci/ruby_tests/reek/seeds_users.rb
@@ -0,0 +1,4 @@
+users = []
+users << User.create!(email: 'admin@example.com', password: 'adminadmin')
+g_admin = Group.create!(name: 'admin')
+g_admin.users << users.first
diff --git a/ci/ruby_tests/rubocop/Dockerfile b/ci/ruby_tests/rubocop/Dockerfile
new file mode 100644
index 0000000..d3dbcea
--- /dev/null
+++ b/ci/ruby_tests/rubocop/Dockerfile
@@ -0,0 +1,22 @@
+FROM debian:jessie
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -q 2 && apt-get install -y --no-install-recommends git \
+ bundler \
+ ruby-dev \
+ libgmp-dev \
+ build-essential \
+ nodejs \
+ mysql-client
+RUN git clone https://repo.grnet.gr/source/webdns.git /srv/webdns
+RUN apt-get install -y --no-install-recommends capistrano unicorn rails ruby-mysql2 ruby-jquery-rails
+WORKDIR /srv/webdns
+RUN bundle install
+RUN gem uninstall rubocop && gem install rubocop -v 0.34.2
+
+EXPOSE 8080
+COPY seeds_policies.rb /
+COPY seeds_users.rb /
+COPY entrypoint.sh /
+RUN chmod u+x /entrypoint.sh
+ENTRYPOINT ["rubocop"]
diff --git a/ci/ruby_tests/rubocop/entrypoint.sh b/ci/ruby_tests/rubocop/entrypoint.sh
new file mode 100644
index 0000000..46863c9
--- /dev/null
+++ b/ci/ruby_tests/rubocop/entrypoint.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+if [ -z "${MYSQL_HOST}" ]; then
+ echo "You need to specify a mysql host."
+ exit
+fi
+
+MYSQL_DATABASE=${MYSQL_DATABASE-dns}
+MYSQL_USER=${MYSQL_USER-dns}
+MYSQL_PORT=${MYSQL_PORT-3306}
+MYSQL_PASSWORD=${MYSQL_PASSWORD-12345}
+
+MYSQL_TEST_DATABASE="${MYSQL_DATABASE}_test"
+
+sleep 20
+
+cat << EOF > /srv/webdns/config/database.yml
+development:
+ database: ${MYSQL_DATABASE}
+ adapter: mysql2
+ encoding: utf8
+ username: ${MYSQL_USER}
+ password: ${MYSQL_PASSWORD}
+ host: ${MYSQL_HOST}
+
+test:
+ database: ${MYSQL_TEST_DATABASE}
+ adapter: mysql2
+ encoding: utf8
+ username: ${MYSQL_USER}
+ password: ${MYSQL_PASSWORD}
+ host: ${MYSQL_HOST}
+EOF
+
+/usr/bin/rake db:migrate
+/usr/bin/rails runner /seeds_users.rb
+#/usr/bin/rails runner seeds_policies.rb
+cd /srv/webdns
+rake test
diff --git a/ci/ruby_tests/rubocop/seeds_policies.rb b/ci/ruby_tests/rubocop/seeds_policies.rb
new file mode 100644
index 0000000..31aed85
--- /dev/null
+++ b/ci/ruby_tests/rubocop/seeds_policies.rb
@@ -0,0 +1,133 @@
+policies = {}
+policies[:default] = <<-POLICY
+<?xml version="1.0"?>
+<KASP>
+ <Policy name="default">
+ <Description>A default policy that will amaze you and your friends</Description>
+ <Signatures>
+ <Resign>PT7200S</Resign>
+ <Refresh>PT259200S</Refresh>
+ <Validity>
+ <Default>PT1209600S</Default>
+ <Denial>PT1209600S</Denial>
+ </Validity>
+ <Jitter>PT43200S</Jitter>
+ <InceptionOffset>PT3600S</InceptionOffset>
+ </Signatures>
+ <Denial>
+ <NSEC3>
+ <Resalt>PT8640000S</Resalt>
+ <Hash>
+ <Algorithm>1</Algorithm>
+ <Iterations>5</Iterations>
+ <Salt length="8"/>
+ </Hash>
+ </NSEC3>
+ </Denial>
+ <Keys>
+ <TTL>PT3600S</TTL>
+ <RetireSafety>PT3600S</RetireSafety>
+ <PublishSafety>PT3600S</PublishSafety>
+ <Purge>PT1209600S</Purge>
+ <KSK>
+ <Algorithm length="2048">8</Algorithm>
+ <Lifetime>PT31536000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </KSK>
+ <ZSK>
+ <Algorithm length="1024">8</Algorithm>
+ <Lifetime>PT7776000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </ZSK>
+ </Keys>
+ <Zone>
+ <PropagationDelay>PT43200S</PropagationDelay>
+ <SOA>
+ <TTL>PT3600S</TTL>
+ <Minimum>PT3600S</Minimum>
+ <Serial>unixtime</Serial>
+ </SOA>
+ </Zone>
+ <Parent>
+ <PropagationDelay>PT9999S</PropagationDelay>
+ <DS>
+ <TTL>PT3600S</TTL>
+ </DS>
+ <SOA>
+ <TTL>PT172800S</TTL>
+ <Minimum>PT10800S</Minimum>
+ </SOA>
+ </Parent>
+ </Policy>
+</KASP>
+POLICY
+policies[:lab] = <<-POLICY
+<?xml version="1.0"?>
+<KASP>
+ <Policy name="lab">
+ <Description>Quick turnaround policy for lab work</Description>
+ <Signatures>
+ <Resign>PT600S</Resign>
+ <Refresh>PT1800S</Refresh>
+ <Validity>
+ <Default>PT3600S</Default>
+ <Denial>PT3600S</Denial>
+ </Validity>
+ <Jitter>PT60S</Jitter>
+ <InceptionOffset>PT3600S</InceptionOffset>
+ </Signatures>
+ <Denial>
+ <NSEC3>
+ <Resalt>PT8640000S</Resalt>
+ <Hash>
+ <Algorithm>1</Algorithm>
+ <Iterations>5</Iterations>
+ <Salt length="8"/>
+ </Hash>
+ </NSEC3>
+ </Denial>
+ <Keys>
+ <TTL>PT300S</TTL>
+ <RetireSafety>PT360S</RetireSafety>
+ <PublishSafety>PT360S</PublishSafety>
+ <Purge>PT432000S</Purge>
+ <KSK>
+ <Algorithm length="2048">8</Algorithm>
+ <Lifetime>PT31536000S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </KSK>
+ <ZSK>
+ <Algorithm length="1024">8</Algorithm>
+ <Lifetime>PT14400S</Lifetime>
+ <Repository>SoftHSM</Repository>
+ <Standby>0</Standby>
+ </ZSK>
+ </Keys>
+ <Zone>
+ <PropagationDelay>PT30S</PropagationDelay>
+ <SOA>
+ <TTL>PT300S</TTL>
+ <Minimum>PT300S</Minimum>
+ <Serial>counter</Serial>
+ </SOA>
+ </Zone>
+ <Parent>
+ <PropagationDelay>PT9999S</PropagationDelay>
+ <DS>
+ <TTL>PT3600S</TTL>
+ </DS>
+ <SOA>
+ <TTL>PT172800S</TTL>
+ <Minimum>PT10800S</Minimum>
+ </SOA>
+ </Parent>
+ </Policy>
+</KASP>
+POLICY
+
+policies.each_pair { |name, policy|
+ DnssecPolicy.create(name: name, policy: policy)
+}
diff --git a/ci/ruby_tests/rubocop/seeds_users.rb b/ci/ruby_tests/rubocop/seeds_users.rb
new file mode 100644
index 0000000..fe4e228
--- /dev/null
+++ b/ci/ruby_tests/rubocop/seeds_users.rb
@@ -0,0 +1,4 @@
+users = []
+users << User.create!(email: 'admin@example.com', password: 'adminadmin')
+g_admin = Group.create!(name: 'admin')
+g_admin.users << users.first
diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml
index af213d5..8a803e0 100644
--- a/docker-compose-ci.yml
+++ b/docker-compose-ci.yml
@@ -1,76 +1,103 @@
---
version: '2'
services:
mysql:
image: mysql:5.5
env_file:
- env
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
powerdns:
build: powerdns/.
depends_on:
- mysql
ports:
- '53:53'
env_file:
- env
environment:
- MYSQL_HOST=mysql
webdns:
build: webdns/.
depends_on:
- mysql
ports:
- '3000:3000'
env_file:
- env
environment:
- MYSQL_HOST=mysql
- RAILS_ENV=development
volumes:
- ./data/webdns:/srv/webdns
reverse-proxy:
image: traefik
command: --api --docker
ports:
- "81:80"
- "8081:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
+ webdns4_bundle_helper:
+ build: ci/bundle_helper/.
+ env_file:
+ - env
+ environment:
+ - RAILS_ENV=test
+ volumes:
+ - ./data/webdns:/srv/webdns
+
webdns-rake-test:
- build: webdns/.
+ build: ci/ruby_tests/rake/.
depends_on:
- mysql
ports:
- '3000:3000'
env_file:
- env
environment:
- MYSQL_HOST=mysql
- RAILS_ENV=test
volumes:
- ./data/webdns:/srv/webdns
+ webdns-rubocop-test:
+ build: ci/ruby_tests/rubocop/.
+ env_file:
+ - env
+ environment:
+ - RAILS_ENV=test
+ volumes:
+ - ./data/webdns:/srv/webdns
+
+ webdns-reek-test:
+ build: ci/ruby_tests/reek/.
+ env_file:
+ - env
+ environment:
+ - RAILS_ENV=test
+ volumes:
+ - ./data/webdns:/srv/webdns
+
webdns-browser-test:
build: webdns/.
depends_on:
- mysql
ports:
- '3000:3000'
env_file:
- env
environment:
- MYSQL_HOST=mysql
- RAILS_ENV=development
volumes:
- ./data/webdns:/srv/webdns
labels:
- traefik.frontend.rule=Host:web.dns.local
user: ${CURRENT_UID}
Event Timeline
Log In to Comment