Skip to content

Commit

Permalink
build(fixes): Fix TravisCI PF3 doc deploys (#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
redallen authored and jschuler committed Feb 18, 2019
1 parent 592ffdb commit e572db2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 31 deletions.
52 changes: 30 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
language: node_js
dist: xenial
language: node_js
node_js:
- "8" # Also included in .nvmrc, but this saves a few seconds
cache:
yarn: false
directories:
- node_modules # God help us...
- packages/patternfly-4/react-core/node_modules # PR docs
- packages/patternfly-4/react-docs/node_modules # PR docs
- packages/patternfly-4/react-core/node_modules # To build PF4 docs
- packages/patternfly-4/react-docs/node_modules # To build PF4 docs
- packages/react-icons/dist
- packages/react-icons/src/icons/
- packages/react-icons/src/icons
- packages/react-icons/src/index.js
- packages/react-icons/src/index.d.ts
- packages/patternfly-3/patternfly-react/dist
Expand All @@ -23,6 +23,13 @@ cache:
- packages/patternfly-4/react-tokens/dist
- packages/patternfly-4/react-docs/public # PF4 docs
- .out # PF3 docs
git:
depth: 10
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
notifications:
email: false

# Tests will come before build without a `stages` block.
stages:
Expand All @@ -32,54 +39,55 @@ stages:
if: branch = master && type != pull_request && fork = false

install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.7.0
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install --frozen-lockfile
jobs:
include:
- stage: Build
name: Build Dist
script:
- yarn build
- .circleci/clean_cache.sh

# Due to Travis limitations, nothing can be cached here since steps
# run in parallel.
- stage: Tests
name: (PF4) Jest Tests
install: skip
script:
- yarn test:pf4
- yarn coveralls
- yarn coveralls || true
- name: (PF3) Jest Tests
install: skip
script:
- yarn test:pf3
- yarn coveralls || true
- name: (PF4) Build PR Docs
if: branch = master && type != pull_request && fork = false
install: skip
script:
- yarn build:prdocs
- .circleci/clean_cache.sh
- name: (PF3) Jest Tests
- name: Lint
install: skip
script:
- yarn test:pf3
- yarn coveralls
- name: (PF3) Build Storybook
if: branch = master && type != pull_request && fork = false
- yarn lint
- name: Stylelint
install: skip
script:
- yarn build:storybook
- .circleci/clean_cache.sh
- yarn lint:style


- stage: Deploy
name: NPM and Github Release
install: skip
script: .circleci/release.sh
- name: Deploy Docs
- name: (PF3) Build Storybook and Deploy Docs
install: skip
script:
- yarn build:storybook
- cp -r .out .public/patternfly-3
- cp -r packages/patternfly-4/react-docs/public .public/patternfly-4
- cp -r packages/patternfly-4/react-docs/public/assets .public/assets
- cp -r .out .public/patternfly-3
- yarn run surge --project .public --domain patternfly-react.surge.sh;
git:
depth: 10
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
notifications:
email: false
- yarn run surge --project .public --domain patternfly-react.surge.sh
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"command": {
"publish": {
"message": "chore(release): releasing packages",
"message": "chore(release): releasing packages [ci skip]",
"conventionalCommits": true
}
},
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
},
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "yarn prebuild:pf4 && lerna run --parallel build --since",
"build": "yarn prebuild:pf4 && lerna run --parallel build",
"prebuild:pf4": "lerna run --scope='@patternfly/react-styles' build",
"build:docs": "yarn build && lerna run docbuild",
"build:prdocs": "lerna run pr-build",
Expand Down Expand Up @@ -152,6 +152,15 @@
"<rootDir>/packages/*.docs.*",
"<rootDir>/packages/react-docs/*.*"
],
"modulePaths": [
"<rootDir>/**/node_modules/",
"<rootDir>/packages/",
"<rootDir>/packages/patternfly-3/",
"<rootDir>/packages/patternfly-4/"
],
"roots": [
"<rootDir>/packages"
],
"setupFiles": [
"./test.env.js"
],
Expand All @@ -171,10 +180,6 @@
"transformIgnorePatterns": [
"node_modules/(?!@patternfly|@novnc|tippy.js)"
],
"roots": [
"<rootDir>/packages",
"<rootDir>/scripts"
],
"testURL": "http://localhost",
"preset": "ts-jest/presets/js-with-babel"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/patternfly-3/react-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@
"patternfly-react": "^2.29.13"
},
"peerDependencies": {
"patternfly-react": "^2.24.0",
"prop-types": "^15.6.1",
"react": "^16.3.2",
"react-dom": "^16.3.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`popover renders close-button, header and body 1`] = `
interactiveBorder={0}
isVisible={true}
lazy={true}
maxWidth="calc(var(--pf-c-popover--c-button--sibling--PaddingRight) + 18.75rem)"
maxWidth="calc(1.5rem + 18.75rem)"
onCreate={[Function]}
onHidden={[Function]}
onHide={[Function]}
Expand Down

0 comments on commit e572db2

Please sign in to comment.