-
Notifications
You must be signed in to change notification settings - Fork 284
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
base: master
Are you sure you want to change the base?
Changes from 33 commits
1e6b9a2
5b613ab
a295ba5
3fe76b3
0096d05
659da26
a61611b
ab6dd38
a05bd04
57b7f23
8c7910f
a8df3a3
f97e687
87ac658
b9621c4
a68bf27
d50f9e6
d6dca64
df54ddb
04a2ee9
b7a5f29
01aeb68
cbd8d92
55923b0
d74fe51
b20420b
a4f5614
36153db
ce6f416
a2ae888
3543d26
984dc45
a00dcc6
aa70ef1
6a4be41
1d915c9
3064a32
4bfa8ad
f893716
591fd1d
dfcabcd
1a8f4f1
d39a1db
0e4ff0f
a27c9c7
e092bf7
abc8399
2ef27f9
1dbc73f
d380af1
7e8ff28
5141c73
746154e
1c3abc7
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ tmp | |
# dependencies | ||
bower_components | ||
node_modules | ||
tests | ||
|
||
# misc | ||
.env* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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 -SLO "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; \ | ||
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:2.7.5-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; \ | ||
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 && 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" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,28 @@ export default Component.extend({ | |
} | ||
}), | ||
|
||
hasEmailSubscription: computed('repository', 'repository.emailSubscribed', function () { | ||
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. duplicate |
||
return this.repository.emailSubscribed; | ||
}), | ||
|
||
emailSubscriptionDescription: computed('repository', 'repository.emailSubscribed', function () { | ||
return `${this.repository.emailSubscribed ? 'Disable ' : 'Enable '} build mails for ${this.repository.name}`; | ||
}), | ||
|
||
toggleRepositoryEmailSubscription: task(function* () { | ||
const repository = this.repository; | ||
try { | ||
if (repository.emailSubscribed) { | ||
yield repository.unsubscribe.perform(); | ||
} else { | ||
yield repository.subscribe.perform(); | ||
} | ||
yield repository.reload(); | ||
} catch (error) { | ||
this.set('apiError', error); | ||
} | ||
}), | ||
|
||
toggleRepositoryTask: task(function* () { | ||
const repository = this.repository; | ||
try { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ export default Component.extend({ | |
isMatchGithub: match('owner.vcsType', /Github\S+$/), | ||
isOwnerVcsTypeEmpty: empty('owner.vcsType'), | ||
isNotGithubRepository: not('isGithubRepository'), | ||
hasGitHubAppsInstallation: notEmpty('owner.installation'), | ||
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. why is it removed? 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. Goo question, probably merge issue. Exists on master. Done. |
||
|
||
isEnterprise: reads('features.enterpriseVersion'), | ||
isNotEnterprise: not('isEnterprise'), | ||
|
@@ -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 (appName && appName.length) { | ||
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 (!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}`; | ||
} | ||
} | ||
), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -498,3 +498,12 @@ $env-var-value-background: lighten($cement-grey, 20); | |
margin-left: 20px; | ||
} | ||
} | ||
|
||
.ember-tooltip { | ||
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. this will probably break some tooltips - don't add 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. Removed, but it's probably responsible for a tool tip added in enterpise .. but .. removed. Done. |
||
min-width: 200px; | ||
max-width: 1316px; | ||
|
||
.tooltip-inner { | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,102 @@ | |
</li> | ||
</ul> | ||
</section> | ||
<section class="settings-section"> | ||
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. duplicate? - check with the section above if there aren't any enterprise-only changes and put under a flag if so - if it's the same -> out 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. Is a additionall condition:
|
||
<h2 class="small-title"> | ||
Security settings | ||
</h2> | ||
<p> | ||
The {{vcs-vocab this.repo.vcsType 'pullRequest' lower=true}} ({{vcs-vocab this.repo.vcsType 'pr'}}) settings are applicable for git-based {{vcs-vocab this.repo.vcsType 'pullRequest' plural=true lower=true}} from forks of this repository filed against this repository. | ||
</p> | ||
<p> | ||
Sharing data with forks allows more comfortable collaboration when collaborators are forking from your repository, but builds initiated by the {{vcs-vocab this.repo.vcsType 'pullRequest' plural=true lower=true}} from forks against your base repository get access to your decrypted environmental variables and/or keys. | ||
</p> | ||
<p> | ||
Not sharing secrets is more secure but makes it much less convenient to collaborate using forks. | ||
</p> | ||
<ul class="settings-list--columns"> | ||
<li> | ||
<SettingsSwitch | ||
@active={{this.model.settings.share_encrypted_env_with_forks}} | ||
@repo={{this.repo}} | ||
@description="Share encrypted env variables with forks ({{vcs-vocab this.repo.vcsType 'pr' plural=true}})" | ||
@key="share_encrypted_env_with_forks" | ||
/> | ||
<ExternalLinkTo | ||
href="https://docs.travis-ci.com/user/web-ui/#share-encrypted-variables-with-forks-pull-request" | ||
title="about sharing encrypted environmental variables with forks ({{vcs-vocab this.repo.vcsType 'pullRequest' plural=true lower=true}})" | ||
class="settings-tooltip" | ||
> | ||
<EmberTooltip @text="Read more about sharing encrypted environmental variables with forks ({{vcs-vocab this.repo.vcsType 'pullRequest' plural=true lower=true}})" /> | ||
<SvgImage @name="icon-help" @class="icon-help" /> | ||
</ExternalLinkTo> | ||
</li> | ||
{{#if (or this.features.enterpriseVersion this.repo.private)}} | ||
<li> | ||
<SettingsSwitch | ||
@active={{this.model.settings.share_ssh_keys_with_forks}} | ||
@repo={{this.repo}} | ||
@description="Share SSH keys with forks ({{vcs-vocab this.repo.vcsType 'pr' plural=true}})" | ||
@key="share_ssh_keys_with_forks" | ||
/> | ||
<ExternalLinkTo | ||
href="https://docs.travis-ci.com/user/web-ui/#share-ssh-keys-with-forks-pull-request" | ||
title="about sharing SSH keys with forks ({{vcs-vocab this.repo.vcsType 'pullRequest'}})" | ||
class="settings-tooltip" | ||
> | ||
<EmberTooltip @text="Read more about sharing SSH keys with forks ({{vcs-vocab this.repo.vcsType 'pullRequest' plural=true lower=true}})" /> | ||
<SvgImage @name="icon-help" @class="icon-help" /> | ||
</ExternalLinkTo> | ||
</li> | ||
{{/if}} | ||
</ul> | ||
<p> | ||
Enable access to build job logs older than {{this.model.settings.job_log_access_older_than_days}} days. When set to OFF logs older than {{this.model.settings.job_log_access_older_than_days}} days are | ||
not available either via UI or API. Please consider if there's a risk of confidential information | ||
being leaked prior to enabling access to old build job logs. If you want to modify the time | ||
threshold, please contact support. | ||
</p> | ||
<ul class="settings-list--row"> | ||
<li> | ||
<SettingsSwitch | ||
@active={{this.model.settings.job_log_time_based_limit}} | ||
@repo={{this.repo}} | ||
@description="Enable access to old build job logs." | ||
@key="job_log_time_based_limit" | ||
/> | ||
<ExternalLinkTo | ||
href="https://docs.travis-ci.com/user/web-ui/#share-encrypted-variables-with-forks-pull-request" | ||
title="about enabling access to old build jobs" | ||
class="settings-tooltip" | ||
> | ||
<EmberTooltip @text="Read more about enabling access to old build jobs" /> | ||
<SvgImage @name="icon-help" @class="icon-help" /> | ||
</ExternalLinkTo> | ||
</li> | ||
</ul> | ||
<p> | ||
Enabling access to build job logs only for users with write/push permissions to this repository will limit access to build job logs via UI and API. When set to OFF, all users with read access to the | ||
repository can access the build job logs. | ||
</p> | ||
<ul class="settings-list--row"> | ||
<li> | ||
<SettingsSwitch | ||
@active={{this.model.settings.job_log_access_based_limit}} | ||
@repo={{this.repo}} | ||
@description="Limit access to build job logs (users with write/push access only)" | ||
@key="job_log_access_based_limit" | ||
/> | ||
<ExternalLinkTo | ||
href="https://docs.travis-ci.com/user/web-ui/#share-encrypted-variables-with-forks-pull-request" | ||
title="about limiting access to build job logs." | ||
class="settings-tooltip" | ||
> | ||
<EmberTooltip @text="Read more about limiting access to build job logs" /> | ||
<SvgImage @name="icon-help" @class="icon-help" /> | ||
</ExternalLinkTo> | ||
</li> | ||
</ul> | ||
</section> | ||
{{#if this.showAutoCancellationSwitches}} | ||
<section class="settings-section auto-cancellation"> | ||
<h2 class="small-title display-inline"> | ||
|
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.
ycie -> typo