Move user-specific instances to their own subdomains to avoid issues with Let's Encrypt

This commit is contained in:
R. Tyler Croy 2017-12-11 15:47:59 -08:00
parent 2de5a6b918
commit 0e89b71ece
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
4 changed files with 12 additions and 13 deletions

View File

@ -5,5 +5,5 @@
import jenkins.model.*
if (System.env.get('GITHUB_USER')) {
JenkinsLocationConfiguration.get().setUrl("https://codevalet.io/u/${System.env.get('GITHUB_USER')}/")
JenkinsLocationConfiguration.get().setUrl("https://${System.env.get('GITHUB_USER'}.codevalet.io/")
}

View File

@ -39,13 +39,13 @@ items:
spec:
tls:
- hosts:
- codevalet.io
- '@@USER@@.codevalet.io'
secretName: ingress-tls
rules:
- host: codevalet.io
- host: '@@USER@@.codevalet.io'
http:
paths:
- path: '/u/@@USER@@'
- path: '/'
backend:
serviceName: 'jenkins-@@USER@@'
servicePort: 80
@ -133,7 +133,7 @@ items:
- name: SENTRY_PUBLIC_DSN
value: 'https://6879decf237b4307ad697c8dc56731c3@sentry.io/206607'
- name: JENKINS_OPTS
value: '--prefix=/u/@@USER@@'
value: ''
- name: DATADOG_API_KEY
valueFrom:
secretKeyRef:

View File

@ -86,7 +86,6 @@ module CodeValet
end
get '/github/authenticate' do
puts request.inspect
env['warden'].authenticate!
if session[:jenkins] && env['warden'].user
@ -99,7 +98,7 @@ module CodeValet
login = session[:admin_instance]
session[:admin_instance] = nil
end
href = "https://codevalet.io/u/#{login}/#{redirect_path}"
href = "https://#{login}.codevalet.io/#{redirect_path}"
end
redirect to(href)
end
@ -119,7 +118,7 @@ module CodeValet
login = params['instance']
session[:admin_instance] = login
end
href = "https://codevalet.io/u/#{login}/#{redirect_path}"
href = "https://#{login}.codevalet.io/#{redirect_path}"
end
redirect to(href)
end

View File

@ -7,7 +7,7 @@
:title => 'Max the Code Monkey',
:align => :right}
%p
Code Valet is a radically transparent CI/CD service for GitHub users. Get
Code Valet is a radically transparent CI/CD service for GitHub users. Get
instant feedback on bad commits, with minimal setup or configuration required.
.alert.alert-warning
Code Valet is currently in private alpha. If youre interested in helping us alpha test, sign up for the Code Valet newsletter.
@ -23,8 +23,8 @@
%h2
Quickstart
%p
Integrating with Code Valet is easy. To get started, sign up with your GitHub
account, select a project to build, and define how to build it, either visually
Integrating with Code Valet is easy. To get started, sign up with your GitHub
account, select a project to build, and define how to build it, either visually
or declaratively.
.col-sm-4
%h2
@ -77,6 +77,6 @@
%a{:href => 'https://en.wikipedia.org/wiki/Continuous_delivery'}
continuous delivery model.
%p
Using Code Valet ultimately helps the Jenkins community improve its support
for wider variety of platforms by increasing the diversity of projects built
Using Code Valet ultimately helps the Jenkins community improve its support
for wider variety of platforms by increasing the diversity of projects built
by Jenkins.