Skip to content

Incremental docs publish, travis builds n more enhancements #10

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

Merged
merged 2 commits into from
Dec 8, 2016
Merged

Incremental docs publish, travis builds n more enhancements #10

merged 2 commits into from
Dec 8, 2016

Conversation

sivakumar-kailasam
Copy link
Member

@sivakumar-kailasam sivakumar-kailasam commented Dec 8, 2016

This PR introduces the following goodness,

  • Travis scripts that publish incremental docs. Modified the module to skip processing any version of docs that already exists in the target DB
  • Ability to run the module for a specific version of docs that can be passed as an arg. Eg node index.js 2.10
  • YUIdocs were fetched twice from S3, the redundant call is removed
  • Generate log msgs so that travis doesn't timeout
  • Increase timeout between requests so that requests don't fail
  • Removed unused deps, updated outdated ones & added npm script to fix file formatting using standard cli
  • Added yarn.lock & editorconfig file

Things that requires travis org admin access,

  • Enable travis for this repo
  • Set the following,
travis env set AWS_ACCESS_KEY_ID "$AWS_ACCESS_KEY_ID"
travis env set AWS_SECRET_ACCESS_KEY "$AWS_SECRET_ACCESS_KEY"
travis env set COUCH_USERNAME "$COUCH_USERNAME"
travis env set COUCH_PASSWORD "$COUCH_PASSWORD"
  • Replace the COUCH_URL in .travis.yml with actual db
  • If the target couch db is a new one, we need to populate it with at least v1 docs since generating docs for both v1.x and v2.x takes more than 50mins which is the max period for travis builds.

Addresses ember-learn/ember-api-docs#66

- Fetch needs to be run only once. Removing the redundant call
- Added the ability to gen docs for a specific version
- Travis build support
- Generate log msgs so that travis doesn't timeout
- Publish incremental docs ignoring existing versions of ember & ember-data in remote couch
- Increase timeout between requests so that requests don't fail
- Upgrade outdated npm deps, remove unused ones
- Add an editorConfig
- autoformat npm script to use standard's autofix feature
@sivakumar-kailasam
Copy link
Member Author

An additional step of flushing travis in heroku is to be added to the .travis.yml. Will raise it in another PR.

Copy link
Contributor

@Gaurav0 Gaurav0 left a comment

Choose a reason for hiding this comment

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

Looks awesome! Thanks so much!

@@ -84,6 +84,58 @@ function filterReleaseDocs (document) {
return versionRegex.test(tag) && /-docs\.json/.test(key)
}

module.exports = function fetch () {
return getObjects().then(downloadReleaseDocs)
function getNewDocsToIndex (db, docs) {
Copy link
Contributor

Choose a reason for hiding this comment

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

possible to move this to separate file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

@toddjordan toddjordan merged commit a6fa6a1 into ember-learn:master Dec 8, 2016
@sivakumar-kailasam sivakumar-kailasam deleted the improvements branch December 9, 2016 02:22
@acorncom acorncom mentioned this pull request Dec 9, 2016
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants