12 Commits

Author SHA1 Message Date
fd2ebc4ad3 Merge pull request 'Cache dependencies on CI' (#6) from chore/cache_bundle_on_ci into master
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Reviewed-on: #6
2020-11-26 15:44:19 +00:00
c86480e72b Cache dependencies on CI
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
https://florian-latifi.at/2018/02/21/using-drone-to-build-and-deploy-a-jekyll-site/
https://git.florian-latifi.at/flortsch/jekyll-blog/src/branch/master/.drone.yml
2020-11-21 23:17:12 +01:00
5933c387b6 Set correct email address for devise
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-21 17:17:33 +01:00
e855e3cf61 Merge pull request 'Gracefully fail config build when master secret not available' (#5) from bugfix/config_without_master_key into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5
2020-11-21 15:28:55 +00:00
91c3f8da2d Gracefully fail config build when master secret not available
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
When the credentials are not accessible, e.g. on CI, parsing the
database config fails otherwise.
2020-11-21 16:22:11 +01:00
8bd69b2adb Add missing postgres gem
Some checks failed
continuous-integration/drone/push Build is failing
Needed in production
2020-11-21 14:12:09 +01:00
8493dfcf9b Add missing string quotes
Some checks failed
continuous-integration/drone/push Build is failing
2020-11-21 14:07:01 +01:00
6550a8b4f8 Merge pull request 'Add production config and credentials' (#4) from chore/production_prep into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #4
2020-11-21 13:03:16 +00:00
fa8650b43a Improve email config
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
Add specific auth options, specify sender address
2020-11-20 22:47:35 +01:00
8a938831e9 Add production config and credentials
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2020-11-20 22:43:47 +01:00
151bd58cb4 Speed up bundle-install on CI
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-19 19:04:24 +01:00
98b5af54ea Add Drone CI to service grid
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-19 17:28:44 +01:00
10 changed files with 66 additions and 9 deletions

View File

@@ -3,12 +3,35 @@ type: docker
name: CI build
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- vendor
- name: rspec
image: guildeducation/rails:2.7.1-12.19.0
commands:
- bundle install
- bundle install --jobs=3 --retry=3 --deployment
- yarn install
- bundle exec rspec
when:
branch:
- master
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- vendor
volumes:
- name: cache
host:
path: /var/lib/drone/tmp

View File

@@ -3,8 +3,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
@@ -31,6 +29,8 @@ gem 'devise_ldap_authenticatable'
gem 'net-ldap'
group :development, :test do
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
@@ -53,5 +53,9 @@ group :test do
gem 'database_cleaner'
end
group :production do
# Use postgresql as the database for Active Record
gem 'pg', '~> 1.2.3'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

View File

@@ -131,6 +131,7 @@ GEM
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
pg (1.2.3)
public_suffix (4.0.6)
puma (4.3.6)
nio4r (~> 2.0)
@@ -255,6 +256,7 @@ DEPENDENCIES
letter_opener_web
listen (~> 3.2)
net-ldap
pg (~> 1.2.3)
puma (~> 4.1)
rails (~> 6.0.3, >= 6.0.3.4)
rspec-rails

View File

@@ -25,7 +25,7 @@ class Admin::LdapUsersController < Admin::BaseController
private
def ldap_client
ldap_client ||= Net::LDAP.new host: ENV['LDAP_HOST'],
ldap_client ||= Net::LDAP.new host: ldap_config['host'],
port: ldap_config['port'],
encryption: ldap_config['ssl'],
auth: {

View File

@@ -17,6 +17,12 @@
Code hosting and collaboration for software projects
</p>
</div>
<div class="grid-item gitea">
<h3><%= link_to "Drone CI", "https://drone.kosmos.org" %></h3>
<p>
Continuous integration for software projects, tied to our Gitea
</p>
</div>
<div class="grid-item wiki">
<h3><%= link_to "Wiki", "https://wiki.kosmos.org" %></h3>
<p>

View File

@@ -1 +1 @@
2Xf7uhBU+61XZL2HMF8Xs9fhVkpOhNfV5PKkHPu4uASpP1zwEJZcRyTJrhBVvJ29Y3m+3hhNAI2OeiYFDPepMDWcocrVjS+am/Gt9DW2tbhYZo0nN9lMU6EymQ5tl9ROgnvcPukwf823/Mrb6zPBysHruOlhdRc7JmW6EXuxL6tUhGsSJmaRfGiMWwiioJsyHCB2VsesKZlSDxItnhuX5d8gBABJyNdzi+Pyepz7MWkWp6ux80jOANq5uljn8bP5CLgUZKoGgveKzZdIs2uNb0wSIohSn+Ckfm+QhMm6mlEocAkHPt+nToiNAmSnx7p/l1sqKNFXslXHJKdkFFr8tx/R45aGPA/nL6R16DOnjtsJ84JXeh13VwR/0ZkyzsM2dQIwCvwo3xjdgBi46HWMwXwm6Y3A+ni6sK5BEvmAT4qu--AoOw35tpM//TeoWI--Uz4fvyRgmc2ewK6d7OFo6A==
LWyKwPZq9Kd97rn/7+q3MEkh7kITScDMHD3JvVuaV3A4YIHJHU+460k+PaEGlsH1xkbuClGiAb57rk1XLyDnmVGtbSueYOtinkw6kar8ZfKWZob061LwGjpMVRQkS49TjCUZlqCFrXeKxlH03mXWBnqAj9RUIPrm7eibb3c7qmJFglR1380RSVsfZnp8A3QwGm4Wh9OWtpUa6P2lne0jQsOuSe8ur3DUF0LplzS4CbkMxAUDOom+pXB13AlxOH9NQE7F4dsYHugHkh1tG3r3ER3xAUD/9Kn6UZZP7BnwUs3zqhoZdULRpRgA5dK7ueTIAnO/jtJDF4562VS8ECo7AnNoVxNe8/mBMFIOUfqg+db/72N2pIk3r4lK7Uzm/4jJ5/99ItnQjHQPcApiwZXIr3OyDLUvq5+d0UVmAMXdwcAjvctVQXFx5imG149Y0ISHKWVm1ca37aAspxWPU+CIj8/HW0yEpjp3vhwDUbjCaZeAPm8UQC14MxZwSK3N+EUSQXdltiweFynabDB7zGGQsjMM8LwMtyo9bTBzJA78Cl96MDyd20i1zSF9ntLuKulwGm3oZowpbNuvo2anY6r9yBlDJBOEISbtXv2tLX4SqcM=--bRcsE4K/29XzyZat--+G3iQCLBqgSwLaQ+7+4YvA==

View File

@@ -22,4 +22,9 @@ test:
production:
<<: *default
database: db/production.sqlite3
adapter: postgresql
database: akkounts
port: 5432
host: <%= Rails.application.credentials.postgres[:host] rescue nil %>
username: <%= Rails.application.credentials.postgres[:username] rescue nil %>
password: <%= Rails.application.credentials.postgres[:password] rescue nil %>

View File

@@ -59,6 +59,23 @@ Rails.application.configure do
config.action_mailer.perform_caching = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "mail.gandi.net",
port: "587",
authentication: "plain",
enable_starttls_auto: true,
user_name: Rails.application.credentials.smtp[:username],
password: Rails.application.credentials.smtp[:password]
}
config.action_mailer.default_url_options = {
host: "accounts.kosmos.org",
protocol: "https",
from: "accounts@kosmos.org"
}
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false

View File

@@ -49,7 +49,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
config.mailer_sender = 'accounts@kosmos.org'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'

View File

@@ -50,7 +50,7 @@ production:
port: 636
attribute: cn
base: ou=kosmos.org,cn=users,dc=kosmos,dc=org
admin_user: "cn=Directory Manager"
admin_password: writtenbychef
admin_user: <%= Rails.application.credentials.ldap[:username] rescue nil %>
admin_password: <%= Rails.application.credentials.ldap[:password] rescue nil %>
ssl: simple_tls
# <<: *AUTHORIZATIONS