-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enterprise to master. #1316
base: master
Are you sure you want to change the base?
Enterprise to master. #1316
Changes from 36 commits
11175e2
c73e9ee
4a759ca
5ee50d2
ba2c4dc
26be255
a89750c
82d5198
52adedb
b968fac
40153e7
95b0da0
2bce53f
41af887
6e817cc
d8b682f
eaefc8a
c12eb15
8d8d693
978635f
e036f1b
0bd5566
ef4b8f8
a6be270
cd697da
415f12c
fe48847
edfd3a7
22f7893
fedd96c
9deeb71
09ac6dd
ab08a8c
c567088
b3b45c1
83d6944
27fec3b
063ffb3
e830a80
ad89c7b
74fb28d
e4d67d7
ec37998
68eef36
43ef552
45efe5c
f435814
b192120
5721958
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,17 @@ FROM ruby:3.2.2-slim | |
|
||
LABEL maintainer Travis CI GmbH <[email protected]> | ||
|
||
# packages required for bundle install | ||
RUN ( \ | ||
mkdir -p /app/vendor /app/cache; \ | ||
groupadd -r travis -g 1000 && \ | ||
useradd -u 1000 -r -g travis -s /bin/sh -c "travis user" -d "/app" travis;\ | ||
chown -R travis:travis /app; \ | ||
apt-get update ; \ | ||
apt-get install -y --no-install-recommends git make gcc g++ libpq-dev libjemalloc-dev libcurl4\ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
) | ||
|
||
USER travis | ||
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 | ||
|
||
# throw errors if Gemfile has been modified since Gemfile.lock | ||
|
@@ -28,4 +32,4 @@ RUN gem install --user-install executable-hooks | |
|
||
COPY . /app | ||
|
||
CMD ./script/server-buildpacks | ||
CMD ["./script/server-buildpacks"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ruby:3.2.2-slim | ||
|
||
LABEL maintainer Travis CI GmbH <[email protected]> | ||
|
||
RUN ( \ | ||
mkdir -p /app/vendor /app/cache; \ | ||
groupadd -r travis -g 1000 && \ | ||
useradd -u 1000 -r -g travis -s /bin/sh -c "travis user" -d "/app" travis;\ | ||
chown -R travis:travis /app; \ | ||
apt-get update ; \ | ||
apt-get upgrade -y ; \ | ||
apt-get install -y --no-install-recommends git make gcc g++ libpq-dev libjemalloc-dev xz-utils \ | ||
&& rm -rf /var/lib/apt/lists/*; \ | ||
gem update --system; \ | ||
bundle config set app_config /app; \ | ||
bundle config set cache_path /app; \ | ||
bundle config --global frozen 1; \ | ||
bundle config set deployment 'true'; \ | ||
chown -R travis:travis /usr/local/bundle; \ | ||
) | ||
|
||
|
||
|
||
WORKDIR /app | ||
|
||
USER travis | ||
COPY Gemfile* /app/ | ||
RUN ( \ | ||
bundle config set without 'development test'; \ | ||
bundler install --verbose --retry=3; \ | ||
bundle config set frozen true; \ | ||
) | ||
USER root | ||
RUN ( apt-get remove -y gcc g++ make git perl xz-utils && apt-get -y autoremove; \ | ||
bundle clean && rm -rf /app/vendor/bundle/ruby/2.7.0/cache/*; \ | ||
for i in `find /app/vendor/ -name \*.o -o -name \*.c -o -name \*.h`; do rm -f $i; done; \ | ||
) | ||
|
||
USER travis | ||
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 | ||
|
||
COPY . /app | ||
|
||
CMD ["./script/server-buildpacks"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'active_support/all' | ||
|
||
module Travis::API::V3 | ||
module Extensions | ||
module Preferences | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'json' | ||
|
||
module Travis::API::V3 | ||
class Models::UserSettings < Models::JsonSlice | ||
child Models::UserSetting | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,14 @@ def for_owner(relation) | |
|
||
def for_user(user) | ||
set_custom_timeout(host_timeout) | ||
jobs = V3::Models::Job.where("jobs.id in (select id from most_recent_job_ids_for_user_repositories_by_states(#{user.id}, ?))", states) | ||
if ENV['TCIE_BETA_MOST_RECENT_JOBS_LW'] == 'true' | ||
puts "USING LW JOBS!!\n\n" | ||
jobs = V3::Models::Job.where("jobs.id in (select id from most_recent_job_ids_for_user_repositories_by_states_lw(#{user.id}, ?))", states) | ||
else | ||
puts "USING REGULAR JOBS!!!\n\n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls remove these three puts - this was tcie debug There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
jobs = V3::Models::Job.where("jobs.id in (select id from most_recent_job_ids_for_user_repositories_by_states(#{user.id}, ?))", states) | ||
end | ||
puts jobs.inspect | ||
|
||
sort filter(jobs) | ||
end | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -470,9 +470,5 @@ module Routes | |
get :stats, '/stats' | ||
end | ||
|
||
hidden_resource :leads do | ||
route '/leads' | ||
post :create | ||
end | ||
end | ||
end |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,8 @@ def fallback_logs_api_auth_token | |
amqp: { username: 'guest', password: 'guest', host: 'localhost', prefetch: 1 }, | ||
closeio: { key: 'key' }, | ||
gdpr: {}, | ||
database: { adapter: 'postgresql', database: "travis_#{Travis.env}", encoding: 'unicode', min_messages: 'warning', variables: { statement_timeout: 10_000 } }, | ||
db: { max_statement_timeout_in_seconds: 15, slow_host_max_statement_timeout_in_seconds: 60}, | ||
database: { adapter: 'postgresql', database: "travis_#{Travis.env}", encoding: 'unicode', min_messages: 'warning', variables: { statement_timeout: ENV['TRAVIS_DB_STATEMENT_TIMEOUT'] || 10000 } }, | ||
db: { max_statement_timeout_in_seconds: 15, slow_host_max_statement_timeout_in_seconds: ENV['TRAVIS_MAX_DB_STATEMENT_TIMEOUT'] || 15}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change default to 60 like it was before There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
log_options: { s3: { access_key_id: '', secret_access_key: ''}}, | ||
s3: { access_key_id: '', secret_access_key: ''}, | ||
pusher: { app_id: 'app-id', key: 'key', secret: 'secret' }, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require 'metriks' | ||
require 'travis/support' | ||
|
||
module Travis | ||
module Event | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.