Table of Contents |
---|
Proposers
...
To address these gaps, restructuring of the docs is needed to make the process easier.
...
Migration with Travis-ci, it can build the asf-site
...
branch
...
and execute callback scripts.
The diagram below shows
...
the workflow.
Branch configuration
The hudi.conf file mentioned above contains a hudi_branches_nightly variable that configures the branches to build nightly:
# format: (branch, alias) or branch
hudi_branches_nightly = [
('master', '0.5.2-SNAPSHOT'),
('release-1.5.1', 'stable'),
('release-1.5.0')
]
The docs will be served under the following URLs:
- https://ci.apache.org/projects/hudi/hudi-docs-BRANCH (e.g. hudi-docs-master)
- https://ci.apache.org/projects/hudi/hudi-docs-release-0.5.1
- https://ci.apache.org/projects/hudi/hudi-docs-release-0.5.0
File structure
Eventually, we will have all .md of docs files on master, thus allowing the docs change with code change to be committed in a single PR.
Apache buildbot build branchs and deploy website to https://ci.apache.org/projects/hudi/hudi-docs-XXX nightly.
Note
- We need to keep asf-site as it is, asf-site is used for https://hudi.apache.org which always service for the latest stable release.
- Once PR to the docs at master branch merged, we can use buildbot to build the site manually or nightly, https://ci.apache.org/projects/hudi/hudi-docs-master.
- When a contributor submits a code change to the site, will not has the staging site.
Test Plan
...
Key Points
There are several key points need to consider:
- How to migration with travis-ci
- How to use git command safely in travis-ci (important)
To use git command safely, hidden the password, we need use bellow form.
Code Block | ||
---|---|---|
| ||
git clone https://${GIT_TOKEN}@github.com/${GIT_REPO}/${GIT_PROJECT}.git |
Steps to get the {GIT_TOKEN}
Steps - 01 : Enable two-factor authentication
https://help.github.com/en/github/authenticating-to-github/about-two-factor-authentication
Steps - 02 : Generate personal access tokens
Steps to migration with travis-ci
Steps - 01 : Active repository
Steps - 02 : Add {GIT_TOKEN} to environment variables
Steps - 03 : Add .travis.yml file to asf-site branch
Code Block | ||
---|---|---|
| ||
language: ruby
rvm:
- 2.6.3
git:
clone: false
env:
global:
- GIT_USER="CI BOT"
- GIT_EMAIL="cibot@test.com"
- 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:
- \cp -rf ${DOCS_ROOT}/_site/* test-content
- git add -A
- git commit -am "Travis CI build asf-site"
- git push origin asf-site --force
branches:
only:
- asf-site |
Steps - 04 : Check whether ci works well or not
End
Hope, this will works well
Test
had test https://github.com/lamber-ken/lamber-ken.github.io, when commits, it will generate docs and push the content to asf-site branch.