See the Windows agent docs for more details.
10 | 11 | When asked, enter your agent token: 12 | 13 | ```markdown 14 | {{ props.token || 'INSERT-YOUR-AGENT-TOKEN-HERE' }} 15 | ``` 16 | -------------------------------------------------------------------------------- /app/components/shared/FormInputHelp.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import classNames from 'classnames'; 4 | 5 | const FormInputHelp = ({ className, children, ...props }) => { 6 | if (!children) { 7 | return null; 8 | } 9 | 10 | return ( 11 |15 | {children} 16 |
17 | ); 18 | }; 19 | 20 | FormInputHelp.propTypes = { 21 | className: PropTypes.string, 22 | children: PropTypes.node 23 | }; 24 | 25 | export default FormInputHelp; 26 | -------------------------------------------------------------------------------- /app/components/shared/FormTextarea.js: -------------------------------------------------------------------------------- 1 | import AutosizingTextarea from './AutosizingTextarea'; 2 | import collapsible from './collapsibleFormComponent'; 3 | import labelled from './labelledFormComponent'; 4 | 5 | const FormTextarea = labelled('textarea'); 6 | FormTextarea.Autosize = labelled(AutosizingTextarea); 7 | FormTextarea.Autosize.proxyMethods = ['updateAutoresize']; 8 | 9 | FormTextarea.Collapsible = collapsible('textarea'); 10 | FormTextarea.Collapsible.Autosize = collapsible(AutosizingTextarea); 11 | FormTextarea.Collapsible.Autosize.proxyMethods = ['updateAutoresize']; 12 | 13 | export default FormTextarea; 14 | -------------------------------------------------------------------------------- /app/components/shared/Autocomplete/error-message.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import classNames from 'classnames'; 4 | 5 | export default class ErrorMessage extends React.PureComponent { 6 | static displayName = "Autocomplete.ErrorMessage"; 7 | 8 | static propTypes = { 9 | children: PropTypes.node.isRequired, 10 | className: PropTypes.string 11 | }; 12 | 13 | render() { 14 | const classes = classNames(this.props.className, "px2 py2 dark-gray"); 15 | 16 | return ( 17 |See the macOS agent docs for more details.
15 | -------------------------------------------------------------------------------- /app/queries/PipelineSchedule.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Relay from 'react-relay/classic'; 4 | 5 | // Note: Ensure whatever variable you use as the $slug is unique and doesn't 6 | // match any existing variables in any other queries otherwise React Relay 7 | // Router doesn't work very well. 8 | 9 | export const query = () => Relay.QL` 10 | query { 11 | pipelineSchedule(slug: $pipelineScheduleSlug) 12 | } 13 | `; 14 | 15 | export const prepareParams = (params: Object) => { 16 | return { 17 | ...params, 18 | pipelineScheduleSlug: [params.organization, params.pipeline, params.schedule].join("/") 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /app/queries/OrganizationMember.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Relay from 'react-relay/classic'; 4 | 5 | // Note: Ensure whatever variable you use as the $slug is unique and doesn't 6 | // match any existing variables in any other queries otherwise React Relay 7 | // Router doesn't work very well. 8 | 9 | export const query = () => Relay.QL` 10 | query { 11 | organizationMember(slug: $organizationMemberSlug) 12 | } 13 | `; 14 | 15 | export const prepareParams = (params: Object) => { 16 | return { 17 | ...params, 18 | organizationMemberSlug: [params.organization, params.organizationMember].join("/") 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /app/components/shared/PageHeader/description.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import classNames from 'classnames'; 4 | 5 | export default class Description extends React.PureComponent { 6 | static displayName = 'PageHeader.Description'; 7 | static propTypes = { 8 | children: PropTypes.node.isRequired, 9 | className: PropTypes.string 10 | }; 11 | 12 | render() { 13 | const { className, children } = this.props; 14 | 15 | return ( 16 |See the Linux agent docs for more details.
19 | -------------------------------------------------------------------------------- /app/images/mark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/components/shared/Icon/svgContent.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Logger from 'app/lib/Logger'; 4 | import escape from 'escape-html'; 5 | 6 | // NOTE: We cast `require` to an Object here so we can call `context`, 7 | // as Flow doesn't understand Webpack's require extensions. 8 | const context = (require: Object).context('!raw-loader!./', false, /\.svg$/); 9 | 10 | export default function svgContent(name: string, title?: string){ 11 | let icon = context('./placeholder.svg'); 12 | 13 | try { 14 | icon = context(`./${name}.svg`); 15 | } catch (err) { 16 | Logger.error(`[Icon] No icon defined for "${name}"`, err); 17 | } 18 | 19 | return (title ? `Alternatively all our installers are capable of running your builds within isolated Docker containers. Simply install the relevant agent for your system and see our Docker docs for more details.
17 | -------------------------------------------------------------------------------- /app/css/rouge.css: -------------------------------------------------------------------------------- 1 | .rouge-table pre { 2 | font-family: var(--font-family-mono); 3 | font-size: 12px; 4 | line-height: 17px; 5 | background: inherit; 6 | border: 0; 7 | } 8 | 9 | .rouge-gutter { 10 | min-width: 25px; 11 | padding-right: 8px; 12 | text-align: right; 13 | } 14 | 15 | .rouge-gutter pre { 16 | color: #999; 17 | } 18 | 19 | .rouge-code-json .p { 20 | color: #555; 21 | } 22 | 23 | .rouge-code-json .s2 { 24 | color: #D64292 25 | } 26 | 27 | .rouge-code-graphql .p { 28 | color: #555; 29 | } 30 | 31 | .rouge-code-graphql .s2 { 32 | color: #D64292; 33 | } 34 | 35 | .rouge-code-graphql .k { 36 | color: #B11A04; 37 | } 38 | 39 | .rouge-code-graphql .n { 40 | color: #1F61A0; 41 | } 42 | 43 | .rouge-code-graphql .k + .w + .n { 44 | color: #D2054E; 45 | } 46 | -------------------------------------------------------------------------------- /app/components/shared/FormInputLabel.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import classNames from 'classnames'; 4 | 5 | class FormInputLabel extends React.PureComponent { 6 | static propTypes = { 7 | label: PropTypes.node.isRequired, 8 | children: PropTypes.node, 9 | errors: PropTypes.bool, 10 | required: PropTypes.bool 11 | }; 12 | 13 | render() { 14 | return ( 15 | 22 | ); 23 | } 24 | } 25 | 26 | export default FormInputLabel; 27 | -------------------------------------------------------------------------------- /app/lib/words.spec.js: -------------------------------------------------------------------------------- 1 | /* global describe, it, expect */ 2 | import { indefiniteArticleFor } from './words'; 3 | 4 | const TEST_WORDS = [ 5 | 'pipeline', 6 | 'organization', 7 | 'request', 8 | 'dog', 9 | 'cat', 10 | 'ant', 11 | 'clock' 12 | ]; 13 | 14 | describe('indefiniteArticleFor', () => { 15 | describe('correctly identifies indefinite articles', () => { 16 | TEST_WORDS.forEach((word) => { 17 | it(`for “${word}”`, () => { 18 | const articleForWord = indefiniteArticleFor(word); 19 | const articleForUppercaseWord = indefiniteArticleFor(word.toUpperCase()); 20 | 21 | expect(articleForWord).toMatchSnapshot(); 22 | expect(articleForUppercaseWord).toMatchSnapshot(); 23 | expect(articleForWord).toEqual(articleForUppercaseWord); 24 | }); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /app/components/agent/shared.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export function getColourForConnectionState(connectionState: string, prefix: string = '') { 4 | switch (connectionState) { 5 | case 'connected': 6 | return `${prefix}lime`; 7 | case 'disconnected': 8 | case 'stopped': 9 | case 'lost': 10 | case 'never_connected': 11 | return `${prefix}gray`; 12 | case 'stopping': 13 | return `${prefix}orange`; 14 | } 15 | } 16 | 17 | const CONNECTION_STATE_LABELS = { 18 | 'connected': 'Connected', 19 | 'disconnected': 'Disconnected', 20 | 'stopped': 'Stopped', 21 | 'stopping': 'Stopping…', 22 | 'never_connected': 'Never Connected', 23 | 'lost': 'Lost Connection' 24 | }; 25 | 26 | export function getLabelForConnectionState(connectionState: string) { 27 | return CONNECTION_STATE_LABELS[connectionState]; 28 | } 29 | -------------------------------------------------------------------------------- /app/components/layout/Navigation/dropdown-button.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import classNames from 'classnames'; 4 | 5 | export default class DropdownButton extends React.PureComponent { 6 | static displayName = "Navigation.DropdownButton"; 7 | 8 | static propTypes = { 9 | style: PropTypes.object, 10 | className: PropTypes.string, 11 | children: PropTypes.node, 12 | onMouseEnter: PropTypes.func 13 | }; 14 | 15 | render() { 16 | return ( 17 | 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/queries/Build.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Relay from 'react-relay/classic'; 4 | 5 | // Note: Ensure whatever variable you use as the $slug is unique and doesn't 6 | // match any existing variables in any other queries otherwise React Relay 7 | // Router doesn't work very well. 8 | 9 | export const query = () => Relay.QL` 10 | query { 11 | build(slug: $buildSlug) 12 | } 13 | `; 14 | 15 | // Since relay doesn't currently support root fields with multiple 16 | // parameters, it means we can't have queries like: build(org: "...", 17 | // pipeline: "...", number: "12"), so we have to do this hacky thing where we 18 | // include them all in the `buildSlug` param. 19 | export const prepareParams = (params: Object) => { 20 | return { 21 | ...params, 22 | buildSlug: [params.organization, params.pipeline, params.number].join("/") 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /app/components/shared/PermissionDescription.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | import Icon from './Icon'; 5 | 6 | export default class PermissionDescription extends React.PureComponent { 7 | static propTypes = { 8 | allowed: PropTypes.bool.isRequired, 9 | permission: PropTypes.string.isRequired 10 | }; 11 | 12 | render() { 13 | const { allowed, permission } = this.props; 14 | 15 | const icon = allowed ? 'permission-small-tick' : 'permission-small-cross'; 16 | const words = allowed ? `Can ${permission}.` : `Can not ${permission}.`; 17 | 18 | return ( 19 |12 | {errors.reduce( 13 | (acc, item, index) => { 14 | const separator = ( 15 | index > 0 16 | ? [', '] 17 | : [] 18 | ); 19 | 20 | return acc.concat(separator).concat([item]); 21 | }, 22 | [] 23 | )} 24 |
25 | ); 26 | }; 27 | 28 | FormInputErrors.propTypes = { 29 | className: PropTypes.string, 30 | errors: PropTypes.arrayOf(PropTypes.node.isRequired) 31 | }; 32 | 33 | FormInputErrors.defaultProps = { 34 | errors: [] 35 | }; 36 | 37 | export default FormInputErrors; 38 | -------------------------------------------------------------------------------- /flow-typed/npm/query-string_v5.1.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 104549010077e5ab3f721b14eec18869 2 | // flow-typed version: d566ab41b9/query-string_v5.1.x/flow_>=v0.32.x 3 | 4 | declare module 'query-string' { 5 | declare type ArrayFormat = 'none' | 'bracket' | 'index' 6 | declare type ParserOptions = {| 7 | arrayFormat?: ArrayFormat, 8 | |} 9 | 10 | declare type StringifyOptions = {| 11 | arrayFormat?: ArrayFormat, 12 | encode?: boolean, 13 | strict?: boolean, 14 | sort?: false | (A, B) => number, 15 | |} 16 | 17 | declare module.exports: { 18 | extract(input: string): string, 19 | parse(input: string, options?: ParserOptions): { [name: string]: string | Array| {state} | 15 |
This mutation is deprecated. {field.deprecationReason}
} 26 |{field.description || 'No description available.'}
27 |{JSON.stringify(field, null, ' ')}
28 | This query is deprecated. {field.deprecationReason}
} 26 |{field.description || 'No description available.'}
27 |{JSON.stringify(field, null, ' ')}
30 |