1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 23:30:05 +02:00

ci: better run-parallel error log

This commit is contained in:
Sérgio Ramos 2017-06-01 15:57:28 +01:00
parent 46ff73d82a
commit 0503802282
36 changed files with 60 additions and 77 deletions

View File

@ -22,11 +22,14 @@ dependencies:
test: test:
pre: pre:
# mkdir lint reports # mkdir lint reports
- mkdir -p $CIRCLE_TEST_REPORTS/lint - mkdir -p $CIRCLE_TEST_REPORTS/lint:
parallel: true
# mkdir test reports # mkdir test reports
- mkdir -p $CIRCLE_TEST_REPORTS/test - mkdir -p $CIRCLE_TEST_REPORTS/test:
parallel: true
# mkdir coverage artifact folders # mkdir coverage artifact folders
- ls -1 packages | xargs -I % mkdir -p $CIRCLE_ARTIFACTS/"%" - ls -1 packages | xargs -I % mkdir -p $CIRCLE_ARTIFACTS/"%":
parallel: true
override: override:
# lint # lint
- ./scripts/parallel-run --cmd="lint-ci": - ./scripts/parallel-run --cmd="lint-ci":
@ -48,7 +51,6 @@ deployment:
- sudo chmod +x /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose
# install and setup triton # install and setup triton
- yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log - yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
development: development:
branch: master branch: master
commands: commands:

View File

@ -18,7 +18,7 @@
"lint": "redrun -s lint:*", "lint": "redrun -s lint:*",
"test": "lerna run test", "test": "lerna run test",
"lint-ci": "eslint scripts/* --format junit --output-file $CIRCLE_TEST_REPORTS/lint/container-pilot-dashboard.xml", "lint-ci": "eslint scripts/* --format junit --output-file $CIRCLE_TEST_REPORTS/lint/container-pilot-dashboard.xml",
"test-ci": "exit 0", "test-ci": "echo 0",
"clean": "lerna clean --yes", "clean": "lerna clean --yes",
"bootstrap": "lerna bootstrap", "bootstrap": "lerna bootstrap",
"dev": "redrun -p dev:*", "dev": "redrun -p dev:*",

View File

@ -7,8 +7,8 @@
"scripts": { "scripts": {
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/babel-preset-joyent-portal.xml", "lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/babel-preset-joyent-portal.xml",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0" "test-ci": "echo 0"
}, },
"dependencies": { "dependencies": {
"babel-preset-react-app": "^3.0.0" "babel-preset-react-app": "^3.0.0"

View File

@ -8,8 +8,8 @@
"scripts": { "scripts": {
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cloudapi-gql.xml", "lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cloudapi-gql.xml",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0", "test-ci": "echo 0",
"start": "node src/index.js" "start": "node src/index.js"
}, },
"dependencies": { "dependencies": {

View File

@ -8,14 +8,14 @@
"scripts": { "scripts": {
"start": "PORT=3069 react-scripts start", "start": "PORT=3069 react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"lint:css": "exit 0", "lint:css": "echo 0",
"lint:js": "eslint . --fix", "lint:js": "eslint . --fix",
"lint": "redrun -s lint:*", "lint": "redrun -s lint:*",
"lint-ci:css": "exit 0", "lint-ci:css": "echo 0",
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-frontend.xml", "lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-frontend.xml",
"lint-ci": "redrun -p lint-ci:*", "lint-ci": "redrun -p lint-ci:*",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0", "test-ci": "echo 0",
"postinstall": "node scripts/postinstall" "postinstall": "node scripts/postinstall"
}, },
"dependencies": { "dependencies": {

View File

@ -1,12 +1,9 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const paths = require('./paths');
const originalConfig = require('./webpack.config.dev.original'); const originalConfig = require('./webpack.config.dev.original');
const FRONTEND_ROOT = process.cwd(); const FRONTEND_ROOT = process.cwd();
const FRONTEND = path.join(FRONTEND_ROOT, 'src'); const FRONTEND = path.join(FRONTEND_ROOT, 'src');
const STATIC = path.join(FRONTEND_ROOT, 'static');
const ESLINT = path.join(FRONTEND_ROOT, '.eslintrc');
const rules = originalConfig.module.rules.reduce((loaders, loader, index) => { const rules = originalConfig.module.rules.reduce((loaders, loader, index) => {
if (index === 3) { if (index === 3) {

View File

@ -1,6 +1,4 @@
import styled from 'styled-components';
import { Grid } from 'react-styled-flexboxgrid'; import { Grid } from 'react-styled-flexboxgrid';
import { breakpoints } from 'joyent-ui-toolkit'; import { breakpoints } from 'joyent-ui-toolkit';
export default Grid.extend` export default Grid.extend`

View File

@ -2,7 +2,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import styled from 'styled-components';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import remcalc from 'remcalc'; import remcalc from 'remcalc';

View File

@ -75,7 +75,6 @@ const DeploymentGroupList = ({
DeploymentGroupList.propTypes = { DeploymentGroupList.propTypes = {
deploymentGroups: PropTypes.arrayOf( deploymentGroups: PropTypes.arrayOf(
PropTypes.shape({ PropTypes.shape({
id: PropTypes.string,
id: PropTypes.string, id: PropTypes.string,
name: PropTypes.string name: PropTypes.string
}) })

View File

@ -28,8 +28,6 @@ export default handleActions(
quickActions quickActions
} }
}; };
return state;
} }
}, },
{} {}

View File

@ -1,5 +1,5 @@
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
import { enableBatching } from 'redux-batched-actions'; // import { enableBatching } from 'redux-batched-actions';
import { ApolloClient, createNetworkInterface } from 'react-apollo'; import { ApolloClient, createNetworkInterface } from 'react-apollo';
import state from './state'; import state from './state';
import { ui } from './reducers'; import { ui } from './reducers';

View File

@ -8,8 +8,8 @@
"scripts": { "scripts": {
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-mock-server.xml", "lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-mock-server.xml",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0", "test-ci": "echo 0",
"start": "node src/index.js", "start": "node src/index.js",
"dev": "nodemon src/index.js" "dev": "nodemon src/index.js"
}, },

View File

@ -8,8 +8,8 @@
"scripts": { "scripts": {
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-schema.xml", "lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-schema.xml",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0" "test-ci": "echo 0"
}, },
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {

View File

@ -7,8 +7,8 @@
"scripts": { "scripts": {
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-rdb-bootstrap.xml", "lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-rdb-bootstrap.xml",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0" "test-ci": "echo 0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^3.19.0", "eslint": "^3.19.0",

View File

@ -7,8 +7,8 @@
"scripts": { "scripts": {
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/eslint-config-joyent-portal.xml", "lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/eslint-config-joyent-portal.xml",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0" "test-ci": "echo 0"
}, },
"peerDependencies": { "peerDependencies": {
"babel-eslint": "^7.2.3", "babel-eslint": "^7.2.3",

View File

@ -18,8 +18,8 @@
"module": "dist/normalized-styled-components.es.js", "module": "dist/normalized-styled-components.es.js",
"entry": "src/index.js", "entry": "src/index.js",
"scripts": { "scripts": {
"lint:css": "exit 0", "lint:css": "echo 0",
"lint-ci:css": "exit 0", "lint-ci:css": "echo 0",
"lint:js": "eslint . --fix", "lint:js": "eslint . --fix",
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/normalized-styled-components.xml", "lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/normalized-styled-components.xml",
"lint": "redrun -s lint:*", "lint": "redrun -s lint:*",

View File

@ -301,12 +301,12 @@ exports[`renders <Menu /> correctly 1`] = `
`; `;
exports[`renders <Nav /> correctly 1`] = ` exports[`renders <Nav /> correctly 1`] = `
.jRYaVX { .eayfNy {
display: block; display: block;
} }
<menu <nav
className="src__Menu-jiUApB jRYaVX" className="src__Nav-iOoeuf eayfNy"
/> />
`; `;

View File

@ -66,7 +66,7 @@ it('renders <Header /> correctly', () => {
}); });
it('renders <Nav /> correctly', () => { it('renders <Nav /> correctly', () => {
const tree = renderer.create(<Menu />).toJSON(); const tree = renderer.create(<Nav />).toJSON();
expect(tree).toMatchStyledComponentsSnapshot(); expect(tree).toMatchStyledComponentsSnapshot();
}); });

View File

@ -10,7 +10,7 @@
"lint": "belly-button --fix", "lint": "belly-button --fix",
"lint-ci": "belly-button", "lint-ci": "belly-button",
"test": "lab -t 97", "test": "lab -t 97",
"test-ci": "exit 0" "test-ci": "echo 0"
}, },
"keywords": [], "keywords": [],
"author": "wyatt", "author": "wyatt",

View File

@ -10,7 +10,7 @@
"lint": "belly-button --fix", "lint": "belly-button --fix",
"lint-ci": "belly-button", "lint-ci": "belly-button",
"test": "lab -t 40", "test": "lab -t 40",
"test-ci": "exit 0" "test-ci": "echo 0"
}, },
"keywords": [], "keywords": [],
"author": "wyatt", "author": "wyatt",

View File

@ -7,14 +7,14 @@
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.js", "module": "dist/index.js",
"scripts": { "scripts": {
"lint:css": "exit 0", "lint:css": "echo 0",
"lint-ci:css": "exit 0", "lint-ci:css": "echo 0",
"lint:js": "eslint . --fix", "lint:js": "eslint . --fix",
"lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/ui-toolkit.xml", "lint-ci:js": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/ui-toolkit.xml",
"lint": "redrun -s lint:*", "lint": "redrun -s lint:*",
"lint-ci": "redrun -s lint-ci:*", "lint-ci": "redrun -s lint-ci:*",
"test": "exit 0", "test": "echo 0",
"test-ci": "exit 0", "test-ci": "echo 0",
"copy-fonts": "rm -rf dist; mkdir -p dist/typography; cp -r src/typography/libre-franklin dist/typography", "copy-fonts": "rm -rf dist; mkdir -p dist/typography; cp -r src/typography/libre-franklin dist/typography",
"compile": "babel src --out-dir dist --source-maps inline", "compile": "babel src --out-dir dist --source-maps inline",
"watch": "cross-env NODE_ENV=development redrun -s -c copy-fonts \"compile --watch\"", "watch": "cross-env NODE_ENV=development redrun -s -c copy-fonts \"compile --watch\"",

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Broadcast, Subscriber } from 'react-broadcast'; import { Broadcast, Subscriber } from 'react-broadcast';
import Baseline from '../baseline'; import Baseline from '../baseline';
import paperEffect from '../paper-effect'; import paperEffect from '../paper-effect';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import Baseline from '../baseline'; import Baseline from '../baseline';
import View from './view'; import View from './view';

View File

@ -1,5 +1,4 @@
import React from 'react'; import React from 'react';
import styled from 'styled-components';
import { Broadcast, Subscriber } from 'react-broadcast'; import { Broadcast, Subscriber } from 'react-broadcast';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Row, Col } from 'react-styled-flexboxgrid'; import { Row, Col } from 'react-styled-flexboxgrid';
import { Subscriber } from 'react-broadcast'; import { Subscriber } from 'react-broadcast';
import Baseline from '../baseline'; import Baseline from '../baseline';

View File

@ -4,7 +4,6 @@ import Baseline from '../baseline';
import { Col } from 'react-styled-flexboxgrid'; import { Col } from 'react-styled-flexboxgrid';
import is from 'styled-is'; import is from 'styled-is';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import styled from 'styled-components';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';

View File

@ -1,5 +1,4 @@
import { Subscriber } from 'react-broadcast'; import { Subscriber } from 'react-broadcast';
import styled from 'styled-components';
import Baseline from '../baseline'; import Baseline from '../baseline';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import is from 'styled-is'; import is from 'styled-is';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Fieldset } from 'normalized-styled-components'; import { Fieldset } from 'normalized-styled-components';
import Baseline from '../baseline'; import Baseline from '../baseline';

View File

@ -1,6 +1,5 @@
import React from 'react'; import React from 'react';
import { Subscriber } from 'react-broadcast'; import { Subscriber } from 'react-broadcast';
import styled from 'styled-components';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import Label from '../label'; import Label from '../label';

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Legend } from 'normalized-styled-components'; import { Legend } from 'normalized-styled-components';
import Baseline from '../baseline'; import Baseline from '../baseline';
import typography from '../typography'; import typography from '../typography';

View File

@ -2,7 +2,6 @@ import { Subscriber } from 'react-broadcast';
import is from 'styled-is'; import is from 'styled-is';
import Baseline from '../baseline'; import Baseline from '../baseline';
import breakpoints from '../breakpoints'; import breakpoints from '../breakpoints';
import styled from 'styled-components';
import Label from '../label'; import Label from '../label';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import styled from 'styled-components'; // import styled from 'styled-components';
class Modal extends Component { class Modal extends Component {
render() { render() {

View File

@ -1,4 +1,3 @@
import styled from 'styled-components';
import { Small } from 'normalized-styled-components'; import { Small } from 'normalized-styled-components';
import remcalc from 'remcalc'; import remcalc from 'remcalc';
import typography from '../typography'; import typography from '../typography';

View File

@ -1,5 +1,4 @@
import React from 'react'; import React from 'react';
import styled from 'styled-components';
import { Svg } from 'normalized-styled-components'; import { Svg } from 'normalized-styled-components';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';

View File

@ -156,21 +156,12 @@ const deploy = async () => {
}); });
// up project // up project
return execa( return execa('docker-compose', ['up', '-d', '--build', '--force-recreate'], {
'docker-compose', stdio: 'inherit',
[ env: Object.assign({}, env, {
'up', COMPOSE_PROJECT_NAME
'-d', })
'--build', });
'--force-recreate'
],
{
stdio: 'inherit',
env: Object.assign({}, env, {
COMPOSE_PROJECT_NAME
})
}
);
}; };
const run = async () => { const run = async () => {

View File

@ -3,6 +3,7 @@
const argv = require('yargs').argv; const argv = require('yargs').argv;
const forEach = require('apr-for-each'); const forEach = require('apr-for-each');
const main = require('apr-main'); const main = require('apr-main');
const intercept = require('apr-intercept');
const execa = require('execa'); const execa = require('execa');
const path = require('path'); const path = require('path');
@ -13,11 +14,21 @@ if (!argv.cmd) {
} }
const run = () => const run = () =>
forEach(argv._, file => forEach(argv._, async file => {
execa('yarn', ['run', argv.cmd], { const cwd = path.dirname(path.join(ROOT, file));
cwd: path.dirname(path.join(ROOT, file)),
stdio: 'inherit' const [err] = await intercept(
}) execa('yarn', ['run', argv.cmd], {
); stdio: 'inherit',
cwd
})
);
if (err) {
console.error(`cmd: ${argv.cmd} | cwd: ${cwd}`);
console.error(err);
throw err;
}
});
main(run()); main(run());