Skip to content
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

TravisCi Web enterprise merge. #2814

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1e6b9a2
Update OS for enterprise ship:docker
DamianSzymanski Mar 18, 2021
5b613ab
security updates (#2607)
GbArc Apr 21, 2021
a295ba5
gem updates (#2609)
GbArc May 10, 2021
3fe76b3
app management url and installation check update (#2610)
GbArc May 10, 2021
0096d05
docker fix+trivy
GbArc Jul 7, 2021
659da26
trivy fix
GbArc Jul 7, 2021
a61611b
Gem update 280721 (#2626)
GbArc Jul 29, 2021
ab6dd38
update to use latest docker
GbArc Oct 21, 2021
a05bd04
github apps management url update (#2648)
GbArc Jan 31, 2022
57b7f23
sharing envs to forks (#2679)
GbArc Mar 10, 2022
8c7910f
removed user management button
GbArc Mar 30, 2022
a8df3a3
removed stripe script for enterprise
GbArc Apr 26, 2022
f97e687
upgrade-gems (#2677)
makemp May 17, 2022
87ac658
gem updates (#2702)
GbArc May 19, 2022
b9621c4
rack update -> 2.2.3.1
GbArc Jun 8, 2022
a68bf27
up trivy cmd
GbArc Jun 8, 2022
d50f9e6
BSFY-141 merge - add restarted by (#2726)
GbArc Sep 7, 2022
d6dca64
reduce image size (#2732)
GbArc Oct 5, 2022
df54ddb
logs merge from master (#2748)
GbArc Dec 14, 2022
04a2ee9
sinatra 2.2.3 (#2753)
GbArc Dec 28, 2022
b7a5f29
fix for missing repo migration count max value. Fix for invalid org i…
GbArc Jan 9, 2023
01aeb68
review and add orgs link fix
GbArc Jan 9, 2023
cbd8d92
managing email subscriptions for whole org
gbarc-dt May 26, 2023
55923b0
test/lint fixes
gbarc-dt May 26, 2023
d74fe51
removed resubscribe list
gbarc-dt May 31, 2023
b20420b
maintenance mode (#2771)
GbArc May 31, 2023
a4f5614
dockerfile corrected
gbarc-dt Jun 1, 2023
36153db
Supp-718
mkdtravis Jul 19, 2023
ce6f416
Cherry pick restarted by feature (#2789)
piccadilly-circus Oct 12, 2023
a2ae888
Added log limit using env var (#2792)
piccadilly-circus Dec 6, 2023
3543d26
Random failing tests (#2793)
piccadilly-circus Dec 6, 2023
984dc45
repo tooltips + trigger build closing (#2798)
GbArc Feb 21, 2024
a00dcc6
TravisCI Web merge. Enterprise to master.
Mar 25, 2024
aa70ef1
TravisCI Web merge. Enterprise to master.
Mar 25, 2024
6a4be41
TravisCI Web merge. Enterprise to master.
Mar 26, 2024
1d915c9
TravisCI Web. Removing changes from package.json.
Mar 27, 2024
3064a32
TravisCI Admin v2. Issue with double keys in JS.
Mar 29, 2024
4bfa8ad
TravisCI Web. Rollback import.
Mar 29, 2024
f893716
TravisCI Web. Import skip.
Mar 29, 2024
591fd1d
TravisCI Web. Removing duplicated method.
Mar 29, 2024
dfcabcd
lint fix
gbarc-dt Mar 29, 2024
1a8f4f1
ruby v corrected ship:docker
gbarc-dt Mar 29, 2024
d39a1db
fixes / ship:docker
gbarc-dt Apr 5, 2024
0e4ff0f
dbg ship:docker
gbarc-dt Apr 5, 2024
a27c9c7
dbg ship:docker
gbarc-dt Apr 5, 2024
e092bf7
focal ship:docker
gbarc-dt Apr 5, 2024
abc8399
log-scanner config change ship:docker
gbarc-dt Apr 12, 2024
2ef27f9
rm subs ship:docker
gbarc-dt Apr 17, 2024
1dbc73f
typo ship:docker
gbarc-dt Apr 17, 2024
d380af1
publicmode fix ship:docker
gbarc-dt Apr 18, 2024
7e8ff28
endpointPortfolio from env
gbarc-dt Apr 29, 2024
5141c73
rmdbg
gbarc-dt Apr 30, 2024
746154e
lint fix
gbarc-dt May 14, 2024
1c3abc7
removed duplicate
gbarc-dt May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tmp
# dependencies
bower_components
node_modules
tests

# misc
.env*
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
language: node_js
node_js: 10
group: edge

env:
global:
Expand All @@ -21,6 +22,7 @@ cache:
before_install:
- npm config set spin false
- npm install -g greenkeeper-lockfile@1
- gem install bundler:2.3.7

install:
- npm ci
Expand Down Expand Up @@ -49,6 +51,7 @@ jobs:
env: TRY_CONFIG=ember-data-beta
- node_js: 10
- stage: ":ship: it to quay.io"
dist: focal
before_install: skip
install: skip
before_script: skip
Expand Down
70 changes: 70 additions & 0 deletions Dockerfile.tcie
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
FROM ruby:3.2.2 as build

LABEL maintainer Travis CI GmbH <[email protected]>

ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.7.0
ENV YARN_VERSION 0.22.0

RUN ( \
groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node; \
curl --version;)
RUN ( \
curl -SLOv "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs; )
RUN ( \
curl -fSL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \
&& mv yarn.js /usr/local/bin/yarn \
&& chmod +x /usr/local/bin/yarn; \
mkdir -p /app; \
)
COPY package.json /app
COPY package-lock.json /app
COPY . /app

WORKDIR /app

RUN (\
npm install --silent -g ember-cli; \
npm ci; \
ember build --environment=production; \
ls -l /app; \
ls -l /app/dist; \
)

FROM ruby:3.2.2-slim

LABEL maintainer Travis CI GmbH <[email protected]>

RUN ( \
gem install bundler:2.3.7; \
bundle config --global frozen 1; \
mkdir -p /app/dist; \
)

WORKDIR /app

COPY --from=build /app/dist/ /app/dist/
COPY --from=build /app/maintenance/ /app/maintenance/
COPY Gemfile* /app/
COPY waiter /app/waiter
COPY public /app/public
COPY ssl /app/ssl

RUN (\

cp -a public/* dist/; \
rm -rf public; \
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/*; \
bundle install --without assets development test; \
sed -i "/stripe.com\/v3/d" /app/dist/index.html; \
apt-get remove -y gcc g++ make git perl xz-utils && apt-get -y autoremove; \
)


CMD ["bundle", "exec", "puma", "-I", "lib", "-p", "${PORT:-4000}", "-t", "${PUMA_MIN_THREADS:-8}:${PUMA_MAX_THREADS:-12}", "-w", "${PUMA_WORKERS:-2}", "--preload", "waiter/config.ru" ]
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem 'rack-ssl', '~> 1.4'
gem 'sanitize'
gem 'sinatra'
gem 'travis-web', path: 'waiter'
gem 'nokogiri', '~> 1.13.6'

group :development, :test do
gem 'rake'
Expand Down
104 changes: 55 additions & 49 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,84 @@ GEM
specs:
ansi (1.5.0)
ast (2.4.2)
base64 (0.2.0)
crass (1.0.6)
diff-lcs (1.5.0)
diff-lcs (1.5.1)
docile (1.4.0)
foreman (0.87.2)
hashr (2.0.1)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
mini_portile2 (2.8.5)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nio4r (2.5.9)
nokogiri (1.15.2-x86_64-linux)
nio4r (2.7.1)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
power_assert (2.0.3)
puma (6.3.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.7)
racc (1.7.3)
rack (2.2.9)
rack-mobile-detect (0.4.0)
rack
rack-protection (3.0.6)
rack
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack-ssl (1.4.1)
rack
rack-test (2.1.0)
rack (>= 1.3)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
rake (13.1.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.54.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-performance (1.18.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.27.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sanitize (6.0.1)
sanitize (6.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
simplecov (0.22.0)
Expand All @@ -94,30 +98,32 @@ GEM
terminal-table
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sinatra (3.0.6)
sinatra (3.2.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.6)
rack-protection (= 3.2.0)
tilt (~> 2.0)
sinatra-contrib (3.0.6)
multi_json
sinatra-contrib (3.2.0)
multi_json (>= 0.0.2)
mustermann (~> 3.0)
rack-protection (= 3.0.6)
sinatra (= 3.0.6)
rack-protection (= 3.2.0)
sinatra (= 3.2.0)
tilt (~> 2.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
test-unit (3.6.1)
test-unit (3.6.2)
power_assert
tilt (2.2.0)
unicode-display_width (2.4.2)
tilt (2.3.0)
unicode-display_width (2.5.0)

PLATFORMS
aarch64-linux
x86_64-linux

DEPENDENCIES
foreman
hashr
nokogiri (~> 1.13.6)
puma (~> 6)
rack-mobile-detect
rack-protection (~> 3.0)
Expand All @@ -140,4 +146,4 @@ RUBY VERSION
ruby 3.2.2p53

BUNDLED WITH
2.4.14
2.4.10
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DOCKER ?= docker

.PHONY: docker-build
docker-build:
$(DOCKER) build -t $(DOCKER_DEST) .
$(DOCKER) build --pull --no-cache -t $(DOCKER_DEST) . -f Dockerfile.tcie

.PHONY: docker-login
docker-login:
Expand Down
4 changes: 0 additions & 4 deletions app/components/billing/authorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export default Component.extend({
return this.isSubscribed && this.hasSubscriptionPermissions && !this.freeV2Plan && !this.isTrial && !this.cancellationRequested;
}),

hasSubscriptionPermissions: computed('account.hasSubscriptionPermissions', 'account.permissions', function () {
return this.account.hasSubscriptionPermissions && (!this.account.isOrganization || this.account.permissions.plan_create);
}),

hasSubscriptionPermissions: computed('account.hasSubscriptionPermissions', 'account.permissions', function () {
return this.account.hasSubscriptionPermissions && (!this.account.isOrganization || this.account.permissions.plan_create);
}),
Expand Down
24 changes: 20 additions & 4 deletions app/components/owner/repositories.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default Component.extend({
isOwnerVcsTypeEmpty: empty('owner.vcsType'),
isNotGithubRepository: not('isGithubRepository'),
hasGitHubAppsInstallation: notEmpty('owner.installation'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it removed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goo question, probably merge issue. Exists on master. Done.


isEnterprise: reads('features.enterpriseVersion'),
isNotEnterprise: not('isEnterprise'),
isPro: reads('features.proVersion'),
Expand Down Expand Up @@ -102,13 +101,30 @@ export default Component.extend({
let isOrganization = this.get('owner.isOrganization');
let ownerGithubId = this.get('owner.githubId');
let installationGithubId = this.get('owner.installation.githubId');
let sourceEndpoint = `${config.sourceEndpoint}`;

if (sourceEndpoint === 'undefined') {
sourceEndpoint = 'https://github.com';
}

if (!installationGithubId) {
let ownerId = this.get('owner.id');
let ownerType = this.get('owner.type');
const installations = this.store.peekAll('installation').filterBy('owner.id', ownerId) || null;
if (installations) {
const installation = installations.findBy('owner.type', ownerType) || null;
if (installation) {
installationGithubId = installation.githubId;
}
}
}

if (appName && appName.length) {
if (!installationGithubId && appName && appName.length) {
return `${config.githubAppsEndpoint}/${appName}/installations/new/permissions?suggested_target_id=${ownerGithubId}`;
} else if (isOrganization) {
return `https://github.com/organizations/${login}/settings/installations/${installationGithubId}`;
return `${sourceEndpoint}/organizations/${login}/settings/installations/${installationGithubId}`;
} else {
return `https://github.com/settings/installations/${installationGithubId}`;
return `${sourceEndpoint}/settings/installations/${installationGithubId}`;
}
}
),
Expand Down
1 change: 0 additions & 1 deletion app/instance-initializers/enterprise-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export function initialize(appInstance) {
featureFlags['landing-page-cta'] = false;
featureFlags['show-running-jobs-in-sidebar'] = true;
featureFlags['debug-builds'] = false;
featureFlags['log-scanner'] = false;
featureFlags['broadcasts'] = false;
featureFlags['beta-features'] = false;
}
Expand Down
13 changes: 10 additions & 3 deletions app/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { or, reads } from '@ember/object/computed';
export default Owner.extend({
api: service(),
accounts: service(),
features: service(),
permissionsService: service('permissions'),
wizardStateService: service('wizardState'),

Expand Down Expand Up @@ -100,11 +101,17 @@ export default Owner.extend({
if (this.isSyncing) {
this.schedulePoll();
} else {
const enterprise = !!this.get('features.enterpriseVersion');
this.permissionsService.fetchPermissions.perform();
this.wizardStateService.fetch.perform();
if (!enterprise) {
this.wizardStateService.fetch.perform();
}
this.accounts.fetchOrganizations.perform();
this.accounts.fetchSubscriptions.perform();
this.accounts.fetchV2Subscriptions.perform();

if (!enterprise) {
this.accounts.fetchSubscriptions.perform();
this.accounts.fetchV2Subscriptions.perform();
}

this.applyReposFilter();
Travis.trigger('user:synced', this);
Expand Down
Loading