Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clobber old in-place docs build

...

  1. Make sure the documentation you want to push a rendered version of is already present in some commit in the ASF git repo at https://git-wip-us.apache.org/repos/asf/incubator-impala.git.

  2. Open a terminal.

  3. Every commit in git has a commit hash. You will be pushing the docs from a specific commit hash that you decide upon at this point in the process. Pick it as follows:

    1. Go to https://git-wip-us.apache.org/repos/asf/incubator-impala.git

    2. There is a section called "shortlog". In shortlog, every line corresponds to a commit. Each line contains a date, an author name, the first line of the commit, and then four links to "commit | commitdiff | tree | snapshot"

    3. Look for the commit you want to use in the shortlog section.

    4. If it is not there, click on the ellipses at the bottom of the shortlog section. This will take you to a longer list of commits in the same format. Look for the commit you want in that list.

    5. If you don't see it there, click the "next" button at the bottom.

    6. The above procedure only helps you find commits that are on the "master" branch. If you know your commit is on a different branch and not on master, you can search there. This is unlikely, though: most commits are to master.

    7. To search a given branch, go back to https://git-wip-us.apache.org/repos/asf/incubator-impala.git. There is a section called "heads" at the bottom of the page. Find the branch name you want to look inside of and click on it. This gives you a shortlog with "next" links on the bottom of each page. You can now search for the commit just like you did on master.

    8. Once you know which commit you are interested in, click on the blue link that is the first line of the commit. This takes you to a more detailed commit page. It will include a section with the commit's metadata, such as author and date. In that section there is a line starting with "commit" and ending with 40 random-looking hexadecimal characters. That is called the commit hash.

    9. In your terminal, type "COMMIT_HASH=". Then copy the commit hash, and then hit "Enter".

  4. Switch to the directory you use to interact with gerrit and apache.

  5. Type "git fetch https://git-wip-us.apache.org/repos/asf/incubator-impala.git" and hit enter.

  6. Type "git fetch https://git-wip-us.apache.org/repos/asf/incubator-impala.git $COMMIT_HASH" and hit enter.

  7. Type "git checkout FETCH_HEAD" and hit enter.

  8. Type "cd docs" and hit enter.

  9. Type "rm -rf build" and hit enter.

  10. Type "make" and hit enter.

  11. Type "cd .." and hit enter"

  12. Copy the build directory to a temporary space:

    1. Type "DOCS_STASH=$(mktemp -d)" and hit enter.

    2. Type "cp -r docs/build ${DOCS_STASH}" and hit enter.

  13. A git remote is a git repository on another computer that you can communicate with. Look at the git remotes that you have in this directory by typing "git remote -v" and hitting "Enter". For me, this looks like:

    1. $ git remote -v
      apache  https://git-wip-us.apache.org/repos/asf/incubator-impala.git (fetch)
      apache  https://git-wip-us.apache.org/repos/asf/incubator-impala.git (push)
      gerrit-asf      ssh://jbapple-cloudera@gerrit.cloudera.org:29418/Impala-ASF (fetch)
      gerrit-asf      ssh://jbapple-cloudera@gerrit.cloudera.org:29418/Impala-ASF (push)
      ...

    2. In that example, I used the command "git remote -v" to get a list of the remotes I had and their URLs. The user input is on the line that starts with a dollar sign. Do not type the dollar sign; it is just printed there by the terminal to indicate that it is ready for your input. The output from the git command is in the lines below that. The ellipses at the end are some extra info that I am leaving out because it is not relevant for this document.

    3. Each remote is listed with a name, a URL, and then either "(fetch)" or "(push)".

  14. Identify the name of the git remote that you use to correspond with gerrit. For me, this is "gerrit-asf". For you, this might be "asf-gerrit".

    1. Type "GERRIT_REMOTE_NAME=". Then type the name of the gerrit remote. Hit enter.

  15. Type "git fetch $GERRIT_REMOTE_NAME" and hit enter.

  16. Type "git checkout $GERRIT_REMOTE_NAME/asf-site" and hit enter.

  17. Think up a name for the branch you are about to create. This is only local, so make it something you can remember but don't worry about other people remembering it.

    1. Make sure it is a new name: type "git branch | grep ". Type the branch name. Hit enter.

      1. If there is any output, think up a new name and repeat.

    2. Once you have a name, type "DOCS_PUSH_BRANCH_NAME=". Type the branch name. Hit enter.

  18. Type "git checkout  -b $DOCS_PUSH_BRANCH_NAME" and hit enter.

  19. Copy the docs in by typing "cp -r ${DOCS_STASH}/build docs" and hitting enter.

  20. Type "git add docs/build" and hit enter.

  21. Now contribute to gerrit like you usually would:

    1. Type "git commit -a" and hit enter.

    2. Write a good commit message.

    3. Type "git push --no-thin $GERRIT_REMOTE_NAME HEAD:refs/for/asf-site" and hit enter. This will push a gerrit review and print to your screen the URL of the review.

    4. Go to that URL and add a reviewer.

  22. Review and submit procedures on asf-site are slightly different than on master:

    1. Once the patch has been +2ed by a committer, a committer also +1 verifies it.

    2. After that, a committer will hit the "Submit" in gerrit. There is no pre-merge Jenkins job on the asf-master branch.

    3. A committer then must then go to their terminal, checkout the "master" branch, and run "bin/push_to_asf.py". That works the same as commits to master. This will upload your patch to the Apache Impala website