vinothchandar commented on a change in pull request #1412: [HUDI-504] 
Restructuring and auto-generation of docs
URL: https://github.com/apache/incubator-hudi/pull/1412#discussion_r393269575
 
 

 ##########
 File path: .travis.yml
 ##########
 @@ -0,0 +1,42 @@
+language: ruby
+rvm:
+  - 2.6.3
+
+git:
+  clone: false
+
+env:
+  global:
+    - GIT_USER="CI BOT"
+    - GIT_EMAIL="[email protected]"
+    - GIT_REPO="apache"
+    - GIT_PROJECT="incubator-hudi"
+    - GIT_BRANCH="asf-site"
+    - DOCS_ROOT="`pwd`/${GIT_PROJECT}/docs"
+
+before_install:
+  - git config --global user.name ${GIT_USER}
+  - git config --global user.email ${GIT_EMAIL}
+  - git clone https://${GIT_TOKEN}@github.com/${GIT_REPO}/${GIT_PROJECT}.git
+  - cd ${GIT_PROJECT} && git checkout ${GIT_BRANCH}
+  - gem install bundler:2.0.2
+
+script:
+  - pushd ${DOCS_ROOT}
+  - bundle install
+  - bundle update --bundler
+  - bundle exec jekyll build _config.yml --source . --destination _site
+  - popd
+
+after_success:
 
 Review comment:
   >>I found a better way to control whether push build result or not, by using 
$TRAVIS_PULL_REQUEST env variable.
   
   Copying conversation from RFC.. I was still trying to understand 
https://docs.travis-ci.com/user/web-ui/#build-pushed-branches "Build pushed 
pull requests" option that we need to enable in travis CI. This is already ON 
and after each pull request is merged to `master`, a job runs. 
   
   I understand that's what we want to do here as well. i.e once the docs PR is 
approved, merged, then this job should run and auto generate the site.. 
   
   Few questions.. 
   
   1. How does this file interplay with `.travis.yml` on master.. Travis will 
only look into this file, since the PR's base is asf-site?
   2. TRAVIS_PULL_REQUEST is set to the pull request number if the current job 
is a pull request build, or false if it’s not. (from travis docs). Below you 
are exiting if its a PR and proceeding to build if it's a pushed pull request.. 
i.e the change has been landed on asf-site already and this job is triggered 
after that? 
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to