Repository: flink-web Updated Branches: refs/heads/asf-site f98238ab8 -> 415ee8916
Improved 'How to contribute' and contribution guidelines (code, documentation, website) This closes #11 Project: http://git-wip-us.apache.org/repos/asf/flink-web/repo Commit: http://git-wip-us.apache.org/repos/asf/flink-web/commit/f2411e25 Tree: http://git-wip-us.apache.org/repos/asf/flink-web/tree/f2411e25 Diff: http://git-wip-us.apache.org/repos/asf/flink-web/diff/f2411e25 Branch: refs/heads/asf-site Commit: f2411e25cecee0d0d93d6943ca266d1f05dcfb64 Parents: f98238a Author: Fabian Hueske <[email protected]> Authored: Mon Sep 28 18:01:09 2015 +0200 Committer: Fabian Hueske <[email protected]> Committed: Thu Oct 8 12:49:26 2015 +0200 ---------------------------------------------------------------------- _includes/navbar.html | 4 +- coding-guidelines.md | 46 ------ contribute-code.md | 296 +++++++++++++++++++++++++++++++++++++++ contribute-documentation.md | 66 +++++++++ css/flink.css | 4 + how-to-contribute.md | 200 ++++++++++---------------- improve-website.md | 102 ++++++++++++++ 7 files changed, 543 insertions(+), 175 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/_includes/navbar.html ---------------------------------------------------------------------- diff --git a/_includes/navbar.html b/_includes/navbar.html index 4aa7f75..8c8568f 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -83,7 +83,9 @@ <li class="divider"></li> <li role="presentation" class="dropdown-header"><strong>Contribute</strong></li> <li><a href="{{ site.baseurl }}/how-to-contribute.html">How to Contribute</a></li> - <li><a href="{{ site.baseurl }}/coding-guidelines.html">Coding Guidelines</a></li> + <li><a href="{{ site.baseurl }}/contribute-code.html">Contribute Code</a></li> + <li><a href="{{ site.baseurl }}/contribute-documentation.html">Contribute Documentation</a></li> + <li><a href="{{ site.baseurl }}/improve-website.html">Improve the Website</a></li> </ul> </li> http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/coding-guidelines.md ---------------------------------------------------------------------- diff --git a/coding-guidelines.md b/coding-guidelines.md deleted file mode 100644 index f1010b8..0000000 --- a/coding-guidelines.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "Coding Guidelines" ---- - -These are the coding and style guidelines that we follow. - -## Guidelines for pull requests and patches - -- **JIRA issue and commit message**. A pull request should relate to a JIRA issue; create an issue if none exists for the change you want to make. The latest commit message should reference that issue. An example commit message would be *[FLINK-633] Fix NullPointerException for empty UDF parameters*. That way, the pull request automatically gives a description of what it does, for example what bug does it fix in what way. -- **Documentation Updates**. Many changes in the system will also affect the documentation (both JavaDocs and the user documentation in the `docs/` directory.). Pull requests and patches are required to update the documentation accordingly, otherwise the change can not be accepted to the source code. -- **No WIP pull requests**. We consider pull requests as requests to merge the referenced code *as is* into the current *stable* master branch. Therefore, a pull request should not be "work in progress". Open a pull request if you are confident that it can be merged into the current master branch without problems. If you rather want comments on your code, post a link to your working branch. -- **Single change per PR**. Please do not combine various unrelated changes in a single pull request. Rather, open multiple individual pull requests. This ensures that pull requests are *topic related*, can be merged more easily, and typically result in topic-specific merge conflicts only. -- **Tests need to pass**. Any pull request where the tests do not pass or which does not compile will not undergo any further review. We recommend to connect your private GitHub accounts with [Travis CI](http://travis-ci.org/) (like the Flink GitHub repository). Travis will run tests for all tested environments whenever you push something into *your* Github repository. -- **No reformattings**. Please keep reformatting of source files to a minimum. Diffs become unreadable if you (or your IDE automatically) remove or replace whitespaces, reformat code, or comments. Also, other patches that affect the same files become un-mergeable. Please configure your IDE such that code is not automatically reformatted. Pull requests with excessive or unnecessary code reformatting might be rejected. -- **Tests for new features are required**. All new features need to be backed by tests, *strictly*. It is very easy that a later merge accidentally throws out a feature or breaks it. This will not be caught if the feature is not guarded by tests. Anything not covered by a test is considered cosmetic. -- **Cleanup**. Before opening a pull request follow this checklist: - - Rebase onto the latest version of the master branch - - Clean up your commits, i.e., squash them in a reasonable way and give meaningful commit messages - - Run *all* tests either locally with ```mvn clean verify``` or use Travis CI to check the build -- **Append review commits**. When you get comments on the pull request asking for changes, append commits for these changes. *Do not rebase and squash them.* It allows people to review the cleanup work independently. Otherwise reviewers have to go through the entire set of diffs again. -- **Javadocs for public methods**. Public methods and classes that are part of the user-facing API need to have JavaDocs. Please write meaningful docs. Good docs are concise and informative. -- **Meaningful error messages**. Give meaningful exception messages. Try to imagine why an exception could be thrown (what a user did wrong) and give a message that will help a user to resolve the problem. -- **Follow the coding style** (see below). The checkstyle plugin verifies these rules when you build the code. If your code does not follow the checkstyle rules, Maven will not compile it and consequently the build will fail. - -## Coding Style Guidelines - -- **Apache license headers**. Make sure you have Apache License headers in your files. The RAT plugin is checking for that when you build the code. -- **Tabs vs. spaces**. We are using tabs for indentation, not spaces. We are not religious there, it just happened to be that we started with tabs, and it is important to not mix them (merge/diff conflicts). -- **Blocks**. All statements after `if`, `for`, `while`, `do`, ... must always be encapsulated in a block with curly braces (even if the block contains one statement): - - ```java -for (...) { - ... -} -``` - If you are wondering why, recall the famous [*goto bug*](https://www.imperialviolet.org/2014/02/22/applebug.html) in Apple's SSL library. -- **No wildcard imports**. Do not use wildcard imports in the core files. They can cause problems when adding to the code and in some cases even during refactoring. Exceptions are the Tuple classes, Tuple-related utilities, and Flink user programs, when importing operators/functions. Tests are a special case of the user programs. -- **No unused imports**. Remove all unused imports. -- **Use Guava Checks**. To increase homogeneity, consistently use Guava methods checkNotNull and checkArgument rather than Apache Commons Validate. -- **No raw generic types**. Do not use raw generic types, unless strictly necessary (sometime necessary for signature matches, arrays). -- **Supress warnings**. Add annotations to suppress warnings, if they cannot be avoided (such as "unchecked", or "serial"). -- **Comments**. Add comments to your code. What is it doing? Add JavaDocs or inherit them by not adding any comments to the methods. Do not automatically generate comments and avoid unnecessary comments like: - - ```java -i++; // increment by one -``` http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/contribute-code.md ---------------------------------------------------------------------- diff --git a/contribute-code.md b/contribute-code.md new file mode 100644 index 0000000..8c822b0 --- /dev/null +++ b/contribute-code.md @@ -0,0 +1,296 @@ +--- +title: "Contributing Code" +--- + +Apache Flink is maintained, improved, and extended by code contributions of volunteers. The Apache Flink community encourages anybody to contribute source code. In order to ensure a pleasant contribution experience for contributors and reviewers and to preserve the high quality of the code base, we follow a contribution process that is explained in this document. + +This document contains everything you need to know about contributing code to Apache Flink. It describes the process of preparing, testing and submitting a contribution, explains coding guidelines and code style of Flink's code base, and gives instructions to setup a development environment. + +**IMPORTANT**: Please read this document carefully before starting to work on a code contribution. It is important to follow the process and guidelines explained below. Otherwise, your pull request might not be accepted or might require substantial rework. + +{% toc %} + +## Code Contribution Process + +### Before you start coding... + +... please make sure there is a JIRA issue that corresponds to your contribution. This is a *general rule* that the Flink community follows for all code contributions, including bug fixes, improvements, or new features, with an exception for *trivial* hot fixes. If you would like to fix a bug that you found or if you would like to add a new feature or improvement to Flink, please follow the [File a bug report]({{ site.baseurl }}/how-to-contribute.html#file-a-bug-report) or [Propose an improvement or a new feature]({{ site.baseurl }}/how-to-contribute.html#propose-an-improvement-or-a-new-feature) guidelines to open an issue in [Flink's JIRA](http://issues.apache.org/jira/browse/FLINK) before starting with the implementation. + +If the description of a JIRA issue indicates that its resolution will touch sensible parts of the code base, be sufficiently complex, or add significant amounts of new code, the Flink community might request a design document (most contributions should not require a design document). The purpose of this document is to ensure that the overall approach to address the issue is sensible and agreed upon by the community. JIRA issues that require a design document are tagged with the **`requires-design-doc`** label. The label can be attached by any community member who feels that a design document is necessary. A good description helps to decide whether a JIRA issue requires a design document or not. The design document must be added or attached to or link from the JIRA issue and cover the following aspects: + +- Overview of the general approach +- List of API changes (changed interfaces, new and deprecated configuration parameters, changed behavior, ...) +- Main components and classes to be touched +- Known limitations of the proposed approach + +A design document can be added by anybody, including the reporter of the issue or the person working on it. + +Contributions for JIRA issues that require a design document will not be added to Flink's code base before a design document has been accepted by the community with [lazy consensus](http://www.apache.org/foundation/glossary.html#LazyConsensus). Please check if a design document is required before starting to code. + + +### While coding... + +... please respect the following rules: + +- Take any discussion or requirement that is recorded in the JIRA issue into account. +- Follow the design document (if a design document is required) as close as possible. Please update the design document and seek consensus, if your implementation deviates too much from the solution proposed by the design document. Minor variations are OK but should be pointed out when the contribution is submitted. +- Closely follow the [coding guidelines]( {{site.base}}/contribute-code.html#coding-guidelines) and the [code style]({{ site.base }}/contribute-code.html#code-style). +- Do not mix unrelated issues into one contribution. + +**Please feel free to ask questions at any time.** Either send a mail to the [dev mailing list]( {{ site.base }}/community.html#mailing-lists ) or comment on the JIRA issue. + +The following instructions will help you to [setup a development environment]( {{ site.base }}/contribute-code.html#setup-a-development-environment). + + + + +### Verifying the compliance of your code + +It is very important to verify the compliance of changes before submitting your contribution. This includes: + +- Making sure the code builds. +- Verifying that all existing and new tests pass. +- Check that the code style is not violated. +- Making sure no unrelated or unnecessary reformatting changes are included. + +You can build the code, run the tests, and check (parts of) the code style by calling + +``` +mvn clean verify +``` + +Please note, that some tests in Flink's code base are flaky and can fail by chance. The Flink community is working hard on improving these tests but sometimes this is not possible, e.g., when tests include external dependencies. We maintain all tests that are known to be flaky in JIRA and attach the **`test-stability`** label. Please check (and extend) this list of [known flaky tests](https://issues.apache.org/jira/issues/?jql=project%20%3D%20FLINK%20AND%20resolution%20%3D%20Unresolved%20AND%20labels%20%3D%20test-stability%20ORDER%20BY%20priority%20DESC) if you encounter a test failure that seems to be unrelated to your changes. + +Please note, that we run additional build profiles for different combinations of Java, Scala, and Hadoop versions to validate your contribution. We encourage every contributor to use a *continuous integration* service that will automatically test the code in your repository whenever you push a change. The [Best practices]( {{site.base}}/contribute-code.html#best-practices ) guide shows how to integrate [Travis](https://travis-ci.org/) with your Github repository. + +In addition to the automated tests, please check the diff of your changes and remove all unrelated changes such as unnecessary reformatting. + + + + +### Preparing and submitting your contribution + +To make the changes easily mergeable, please rebase them to the latest version of the main repositories master branch. Please do also respect the [commit message guidelines]( {{ site.base }}/contribute-code.html#coding-guidelines ), clean up your commit history, and squash your commits to an appropriate set. Please verify your contribution one more time after rebasing and commit squashing as described above. + +The Flink project accepts code contributions through the [GitHub Mirror](https://github.com/apache/flink), in the form of [Pull Requests](https://help.github.com/articles/using-pull-requests). Pull requests are a simple way to offer a patch, by providing a pointer to a code branch that contains the change. + +To open a pull request, push our contribution back into your fork of the Flink repository. + +``` +git push origin myBranch +``` + +Go the website of your repository fork (`https://github.com/<your-user-name>/flink`) and use the *"Create Pull Request"* button to start creating a pull request. Make sure that the base fork is `apache/flink master` and the head fork selects the branch with your changes. Give the pull request a meaningful description and send it. + +It is also possible to attach a patch to a [JIRA]({{site.FLINK_ISSUES_URL}}) issue. + +----- + +## Coding guidelines + +### Pull requests and commit message +{:.no_toc} + +- **Single change per PR**. Please do not combine various unrelated changes in a single pull request. Rather, open multiple individual pull requests where each PR refers to a JIRA issue. This ensures that pull requests are *topic related*, can be merged more easily, and typically result in topic-specific merge conflicts only. + +- **No WIP pull requests**. We consider pull requests as requests to merge the referenced code *as is* into the current *stable* master branch. Therefore, a pull request should not be "work in progress". Open a pull request if you are confident that it can be merged into the current master branch without problems. If you rather want comments on your code, post a link to your working branch. + +- **Commit message**. A pull request must relate to a JIRA issue; create an issue if none exists for the change you want to make. The latest commit message should reference that issue. An example commit message would be *[FLINK-633] Fix NullPointerException for empty UDF parameters*. That way, the pull request automatically gives a description of what it does, for example what bug does it fix in what way. + +- **Append review commits**. When you get comments on the pull request asking for changes, append commits for these changes. *Do not rebase and squash them.* It allows people to review the cleanup work independently. Otherwise reviewers have to go through the entire set of diffs again. + +### Exceptions and error messages +{:.no_toc} + +- **Exception swallowing**. Do not swallow exceptions and print the stacktrace. Instead check how exceptions are handled by similar classes. + +- **Meaningful error messages**. Give meaningful exception messages. Try to imagine why an exception could be thrown (what a user did wrong) and give a message that will help a user to resolve the problem. + +### Tests +{:.no_toc} + +- **Tests need to pass**. Any pull request where the tests do not pass or which does not compile will not undergo any further review. We recommend to connect your private GitHub accounts with [Travis CI](http://travis-ci.org/) (like the Flink GitHub repository). Travis will run tests for all tested environments whenever you push something into *your* Github repository. Please note the previous [comment about flaky tests]( {{site.base}}/contribute-code.html#verifying-the-compliance-of-your-code). + +- **Tests for new features are required**. All new features need to be backed by tests, *strictly*. It is very easy that a later merge accidentally throws out a feature or breaks it. This will not be caught if the feature is not guarded by tests. Anything not covered by a test is considered cosmetic. + +- **Use appropriate test mechanisms**. Please use unit tests to test isolated functionality, such as methods. Unit tests should execute in subseconds and should be preferred whenever possible. The name of unit test classes have to on `*Test`. Use integration tests to implement long-running tests. Flink offers test utilities for end-to-end tests that start a Flink instance and run a job. These tests are pretty heavy and can significantly increase build time. Hence, they should be added with care. The name of unit test classes have to on `*ITCase`. + +### Documentation +{:.no_toc} + +- **Documentation Updates**. Many changes in the system will also affect the documentation (both JavaDocs and the user documentation in the `docs/` directory.). Pull requests and patches are required to update the documentation accordingly, otherwise the change can not be accepted to the source code. See the [Contribute documentation]({{site.base}}/contribute-documentation.html) guide for how to update the documentation. + +- **Javadocs for public methods**. All public methods and classes need to have JavaDocs. Please write meaningful docs. Good docs are concise and informative. Please do also update JavaDocs if you change the signature or behavior of a documented method. + +### Code formatting +{:.no_toc} + +- **No reformattings**. Please keep reformatting of source files to a minimum. Diffs become unreadable if you (or your IDE automatically) remove or replace whitespaces, reformat code, or comments. Also, other patches that affect the same files become un-mergeable. Please configure your IDE such that code is not automatically reformatted. Pull requests with excessive or unnecessary code reformatting might be rejected. + + + +----- + +## Code style + +- **Apache license headers**. Make sure you have Apache License headers in your files. The RAT plugin is checking for that when you build the code. +- **Tabs vs. spaces**. We are using tabs for indentation, not spaces. We are not religious there, it just happened to be that we started with tabs, and it is important to not mix them (merge/diff conflicts). +- **Blocks**. All statements after `if`, `for`, `while`, `do`, ... must always be encapsulated in a block with curly braces (even if the block contains one statement): + + ```java +for (...) { + ... +} +``` + If you are wondering why, recall the famous [*goto bug*](https://www.imperialviolet.org/2014/02/22/applebug.html) in Apple's SSL library. +- **No wildcard imports**. Do not use wildcard imports in the core files. They can cause problems when adding to the code and in some cases even during refactoring. Exceptions are the Tuple classes, Tuple-related utilities, and Flink user programs, when importing operators/functions. Tests are a special case of the user programs. +- **No unused imports**. Remove all unused imports. +- **Use Guava Checks**. To increase homogeneity, consistently use Guava methods checkNotNull and checkArgument rather than Apache Commons Validate. +- **No raw generic types**. Do not use raw generic types, unless strictly necessary (sometime necessary for signature matches, arrays). +- **Supress warnings**. Add annotations to suppress warnings, if they cannot be avoided (such as "unchecked", or "serial"). +- **Comments**. Add comments to your code. What is it doing? Add JavaDocs or inherit them by not adding any comments to the methods. Do not automatically generate comments and avoid unnecessary comments like: + + ```java +i++; // increment by one +``` + +----- + +## Best practices + +- Travis: Flink is pre-configured for [Travis CI](http://docs.travis-ci.com/), which can be easily enabled for your private repository fork (it uses GitHub for authentication, so you so not need an additional account). Simply add the *Travis CI* hook to your repository (*settings --> webhooks & services --> add service*) and enable tests for the `flink` repository on [Travis](https://travis-ci.org/profile). + +----- + +## Setup a development environment + +### Requirements for developing and building Flink + +* Unix-like environment (We use Linux, Mac OS X, Cygwin) +* git +* Maven (at least version 3.0.4) +* Java 7 or 8 + +### Clone the repository +{:.no_toc} + +Apache Flink's source code is stored in a [git](http://git-scm.com/) repository which is mirrored to [Github](https://github.com/apache/flink). The common way to exchange code on Github is to fork a the repository into your personal Github account. For that, you need to have a [Github](https://github.com) account or create one for free. Forking a repository means that Github creates a copy of the forked repository for you. This is done by clicking on the *fork* button on the upper right of the [repository website](https://github.com/apache/flink). Once you have a fork of Flink's repository in your personal account, you can clone that repository to your local machine. + +``` +git clone https://github.com/<your-user-name>/flink.git +``` + +The code is downloaded into a directory called `flink`. + + +### Setup an IDE and import the source code +{:.no_toc} + +The Flink committers use IntelliJ IDEA and Eclipse IDE to develop the Flink code base. + +Minimal requirements for an IDE are: + +- Support for Java and Scala (also mixed projects) +- Support for Maven with Java and Scala + +#### IntelliJ IDEA + +The IntelliJ IDE supports Maven out of the box and offers a plugin for Scala development. + +- IntelliJ download: [https://www.jetbrains.com/idea/](https://www.jetbrains.com/idea/) +- IntelliJ Scala Plugin: [http://plugins.jetbrains.com/plugin/?id=1347](http://plugins.jetbrains.com/plugin/?id=1347) + +Check out our [Setting up IntelliJ](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#intellij-idea) guide for details. + +#### Eclipse Scala IDE + +For Eclipse users, we recommend using Scala IDE 3.0.3, based on Eclipse Kepler. While this is a slightly older version, +we found it to be the version that works most robustly for a complex project like Flink. + +Further details, and a guide to newer Scala IDE versions can be found in the +[How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#eclipse) docs. + +**Note:** Before following this setup, make sure to run the build from the command line once +(`mvn clean install -DskipTests`, see above) + +1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See + [How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#eclipse) for download links and instructions. +2. Add the "macroparadise" compiler plugin to the Scala compiler. + Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to + the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar"). + Note: If you do not have the jar file, you probably did not run the command line build. +3. Import the Flink Maven projects ("File" -> "Import" -> "Maven" -> "Existing Maven Projects") +4. During the import, Eclipse will ask to automatically install additional Maven build helper plugins. +5. Close the "flink-java8" project. Since Eclipse Kepler does not support Java 8, you cannot develop this project. + +#### Import the source code + +Apache Flink uses Apache Maven as build tool. Most IDE are capable of importing Maven projects. + + +### Build the code +{:.no_toc} + +To build Flink from source code, open a terminal, navigate to the root directory of the Flink source code, and call + +``` +mvn clean package +``` + +This will build Flink and run all tests. Flink is now installed in `build-target`. + +To build Flink without executing the tests you can call + +``` +mvn -DskipTests clean package +``` + + +----- + + +## How to use Git as a committer + +Only the infrastructure team of the ASF has administrative access to the GitHub mirror. Therefore, comitters have to push changes to the git repository at the ASF. + +### Main source repositories +{:.no_toc} + +**ASF writable**: https://git-wip-us.apache.org/repos/asf/flink.git + +**ASF read-only**: git://git.apache.org/repos/asf/flink.git + +**ASF read-only**: https://github.com/apache/flink.git + +Note: Flink does not build with Oracle JDK 6. It runs with Oracle JDK 6. + +If you want to build for Hadoop 1, activate the build profile via `mvn clean package -DskipTests -Dhadoop.profile=1`. + +----- + +## Snapshots (Nightly Builds) + +Apache Flink `{{ site.FLINK_VERSION_LATEST }}` is our latest development version. + +You can download a packaged version of our nightly builds, which include +the most recent development code. You can use them if you need a feature +before its release. Only builds that pass all tests are published here. + +- **Hadoop 1**: <a href="{{ site.FLINK_DOWNLOAD_URL_HADOOP_1_LATEST }}" class="ga-track" id="download-hadoop1-nightly">{{ site.FLINK_DOWNLOAD_URL_HADOOP_1_LATEST | split:'/' | last }}</a> +- **Hadoop 2 and YARN**: <a href="{{ site.FLINK_DOWNLOAD_URL_HADOOP_2_LATEST }}" class="ga-track" id="download-hadoop2-nightly">{{ site.FLINK_DOWNLOAD_URL_HADOOP_2_LATEST | split:'/' | last }}</a> + +Add the **Apache Snapshot repository** to your Maven `pom.xml`: + +```xml +<repositories> + <repository> + <id>apache.snapshots</id> + <name>Apache Development Snapshot Repository</name> + <url>https://repository.apache.org/content/repositories/snapshots/</url> + <releases><enabled>false</enabled></releases> + <snapshots><enabled>true</enabled></snapshots> + </repository> +</repositories> +``` + +You can now include Apache Flink as a Maven dependency (see above) with version `{{ site.FLINK_VERSION_LATEST }}` (or `{{ site.FLINK_VERSION_HADOOP_1_LATEST}}` for compatibility with old Hadoop 1.x versions). http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/contribute-documentation.md ---------------------------------------------------------------------- diff --git a/contribute-documentation.md b/contribute-documentation.md new file mode 100644 index 0000000..d0af39e --- /dev/null +++ b/contribute-documentation.md @@ -0,0 +1,66 @@ +--- +title: "Contribute Documentation" +--- + +Good documentation is crucial for any kind of software. This is especially true for sophisticated software systems such as distributed data processing engines like Apache Flink. The Apache Flink community aims to provide concise, precise, and complete documentation and welcomes any contribution to improve Apache Flink's documentation. + +{% toc %} + +## Obtain the documentation sources + +Apache Flink's documentation is maintained in the same [git](http://git-scm.com/) repository as the code base. This is done to ensure that code and documentation can be easily kept in sync. + +The easiest way to contribute documentation is to fork [Flink's mirrored repository on Github](https://github.com/apache/flink) into your own Github account by clicking on the fork button at the top right. If you have no Github account, you can create one for free. + +Next, clone your fork to your local machine. + +``` +git clone https://github.com/<your-user-name>/flink.git +``` + +The documentation is located in the `docs/` subdirectory of the Flink code base. + +## Before you start working on the documentation ... + +... please make sure there exists a [JIRA](https://issues.apache.org/jira/browse/FLINK) issue that corresponds to your contribution. We require all documentation changes to refer to a JIRA issue, except for trivial fixes such as typos. + +## Update or extend the documentation + +The Flink documentation is written in [Markdown](http://daringfireball.net/projects/markdown/). Markdown is a lightweight markup language which can be translated to HTML. + +In order to update or extend the documentation you have to modify the Markdown (`.md`) files. Please verify your changes by starting the build script in preview mode. + +``` +cd docs +./build_docs.sh -p +``` + +The script compiles the Markdown files into static HTML pages and starts a local webserver. Open your browser at `http://localhost:4000` to view the compiled documentation including your changes. The served documentation is automatically re-compiled and updated when you modify and save Markdown files and refresh your browser. + +Please feel free to ask any questions you have on the developer mailing list. + +## Submit your contribution + +The Flink project accepts documentation contributions through the [GitHub Mirror](https://github.com/apache/flink) as [Pull Requests](https://help.github.com/articles/using-pull-requests). Pull requests are a simple way of offering a patch by providing a pointer to a code branch that contains the changes. + +To prepare and submit a pull request follow these steps. + +1. Commit your changes to your local git repository. The commit message should point to the corresponding JIRA issue by starting with `[FLINK-XXXX]`. + +2. Push your committed contribution to your fork of the Flink repository at Github. + + ``` + git push origin myBranch + ``` + +3. Go the website of your repository fork (`https://github.com/<your-user-name>/flink`) and use the "Create Pull Request" button to start creating a pull request. Make sure that the base fork is `apache/flink master` and the head fork selects the branch with your changes. Give the pull request a meaningful description and submit it. + +It is also possible to attach a patch to a [JIRA]({{site.FLINK_ISSUES_URL}}) issue. + + + + + + + + http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/css/flink.css ---------------------------------------------------------------------- diff --git a/css/flink.css b/css/flink.css index 7e04d60..5b68542 100644 --- a/css/flink.css +++ b/css/flink.css @@ -51,6 +51,10 @@ h3, h4, h5, h6 { font-size: 120%; } +blockquote { + font-size: 100%; +} + /*============================================================================= Table of Contents =============================================================================*/ http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/how-to-contribute.md ---------------------------------------------------------------------- diff --git a/how-to-contribute.md b/how-to-contribute.md index a75170e..2e35687 100644 --- a/how-to-contribute.md +++ b/how-to-contribute.md @@ -1,197 +1,141 @@ --- -title: "How To Contribute" +title: "Contributions Welcome!" --- -The Flink project welcomes all sort of contributions in the form of code (improvements, features, bugfixes), tests, documentation, and community participation (discussions & questions). +Apache Flink is developed by an open and friendly community. Everybody is cordially welcome to join the community and contribute to Apache Flink. There are several ways to interact with the community and to contribute to Flink including asking questions, filing bug reports, proposing new features, joining discussions on the mailing lists, contributing code or documentation, improving the website, or testing release candidates. {% toc %} -## Easy Issues for Starters +## Ask questions! -We maintain all known issues and feature drafts in the [Flink JIRA project](https://issues.apache.org/jira/issues/?jql=project+%3D+FLINK). +The Apache Flink community is eager to help and to answer your questions. We have a [user mailing list]({{ site.baseurl }}/community.html#mailing-lists ), hang out in an [IRC channel]({{ site.baseurl }}/community.html#irc), and watch Stack Overflow on the [[apache-flink]](http://stackoverflow.com/questions/tagged/apache-flink) tag. -We also try to maintain a [list of simple "starter issues"](https://issues.apache.org/jira/issues/?jql=project%20%3D%20FLINK%20AND%20resolution%20%3D%20Unresolved%20AND%20labels%20%3D%20starter%20ORDER%20BY%20priority%20DESC) that we believe are good tasks for new contributors. Those tasks are meant to allow people to get into the project and become familiar with the process of contributing. Feel free to ask questions about issues that you would be interested in working on. +----- -In addition, you can find a list of ideas for projects and improvements in the [projects Wiki page](https://cwiki.apache.org/confluence/display/FLINK/Project+Ideas). +## File a bug report -## Contributing Code & Documentation +Please let us know if you experienced a problem with Flink and file a bug report. Open [Flink's JIRA](http://issues.apache.org/jira/browse/FLINK) and click on the blue **Create** button at the top. Please give detailed information about the problem you encountered and, if possible, add a description that helps to reproduce the problem. Thank you very much. -This section gives you a brief introduction in how to contribute code and documentation to Flink. We maintain both the code and the documentation in the same repository, so the process is essentially the same for both. We use [git](http://git-scm.com/) for the code and documentation version control. The documentation is located in the `docs/` subdirectory of the git repository. +----- -The Flink project accepts code contributions through the [GitHub Mirror](https://github.com/apache/flink), in the form of [Pull Requests](https://help.github.com/articles/using-pull-requests). Pull requests are basically a simpler way of offering a patch, by providing a pointer to a code branch that contains the change. +## Propose an improvement or a new feature -It is also possible to attach a patch to a [JIRA]({{site.FLINK_ISSUES_URL}}) issue. +Our community is constantly looking for feedback to improve Apache Flink. If you have an idea how to improve Flink or have a new feature in mind that would be beneficial for Flink users, please open an issue in [Flink's JIRA](http://issues.apache.org/jira/browse/FLINK). The improvement or new feature should be described in appropriate detail and include the scope and its requirements if possible. Detailed information is important for a few reasons: +- It ensures your requirements are met when the improvement or feature is implemented. +- It helps to estimate the effort and to design a solution that addresses your needs. +- It allow for constructive discussions that might arise around this issue. -### Setting up the Infrastructure and Creating a Pull Request +Detailed information is also required, if you plan to contribute the improvement or feature you proposed yourself. Please read the [Contribute code]({{ site.base }}/contribute-code.html) guide in this case as well. -1. The first step is to create yourself a copy of the Flink code base. We suggest to fork the [Flink GitHub Mirror Repository](https://github.com/apache/flink) into your own [GitHub](https://github.com) account. You need to register on GitHub for that, if you have no account so far. +----- -2. Next, clone your repository fork to your local machine. +## Help others and join the discussions - ``` -git clone https://github.com/<your-user-name>/flink.git -``` +Most communication in the Apache Flink community happens on two mailing lists: -3. It is typically helpful to switch to a *topic branch* for the changes. To create a dedicated branch based on the current master, use the following command: +- The user mailing lists `[email protected]` is the place where users of Apache Flink ask questions and seek for help or advice. Joining the user list and helping other users is a very good way to contribute to Flink's community. Furthermore, there is the [[apache-flink]](http://stackoverflow.com/questions/tagged/apache-flink) tag on Stack Overflow if you'd like to help Flink users (and harvest some points) there. +- The development mailing list `[email protected]` is the place where Flink developers exchange ideas and discuss new features, upcoming releases, and the development process in general. If you are interested in contributing code to Flink, you should join this mailing list. - ``` -git checkout -b myBranch master -``` +You are very welcome to [subscribe to both mailing lists]({{ site.baseurl }}/community.html#mailing-lists). In addition to the user list, there is also a [Flink IRC]({{ site.baseurl }}/community.html#irc) channel that you can join to talk to other users and contributors. -4. Now you can create your changes, compile the code, and validate the changes. Here are some pointers on how to [build the code](https://github.com/apache/flink/#building-apache-flink-from-source). -In addition to that, we recommend setting up Eclipse (or IntelliJ) using the "Import Maven Project" feature: +----- - * Select "Import" from the "File" menu. - * Expand the "Maven" node, select "Existing Maven Projects", and click the "Next" button. - * Select the root directory by clicking on the "Browse" button and navigate to the top folder of the cloned Flink git repository. - * Ensure that all projects are selected and click the "Finish" button.<br/><br/><!-- newline hack --> +## Test a release candidate - If you want to work on the Scala code you will need the following plugins: +Apache Flink is continuously improved by its active community. Every few weeks, we release a new version of Apache Flink with bug fixes, improvements, and new features. The process of releasing a new version consists of the following steps: - **Eclipse 4.x**: +1. Building a new release candidate and starting a vote (usually for 72 hours). +2. Testing the release candidate and voting (`+1` if no issues were found, `-1` if the release candidate has issues). +3. Going back to step 1 if the release candidate had issues otherwise we publish the release. - * scala-ide: `http://download.scala-ide.org/sdk/e38/scala210/stable/site` - * m2eclipse-scala: `http://alchim31.free.fr/m2e-scala/update-site` - * build-helper-maven-plugin: `https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.15.0/N/0.15.0.201206251206/`<br/><br/><!-- newline hack --> +Our wiki contains a page that summarizes the [test procedure for a release](https://cwiki.apache.org/confluence/display/FLINK/Releasing). Release testing is a big effort if done by a small group of people but can be easily scaled out to more people. The Flink community encourages everybody to participate in the testing of a release candidate. By testing a release candidate, you can ensure that the next Flink release is working properly for your setup and help to improve the quality of releases. - **Eclipse 3.7**: +----- - * scala-ide: `http://download.scala-ide.org/sdk/e37/scala210/stable/site` - * m2eclipse-scala: `http://alchim31.free.fr/m2e-scala/update-site` - * build-helper-maven-plugin: `https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201109282148/`<br/><br/><!-- newline hack --> +## Contribute code - If you don't have the plugins your project will have build errors, but you can just close the Scala projects and ignore them. +Apache Flink is maintained, improved, and extended by code contributions of volunteers. The Apache Flink community encourages anybody to contribute source code. In order to ensure a pleasant contribution experience for contributors and reviewers and to preserve the high quality of the code base, we follow a contribution process that is explained in our [Contribute code]( {{ site.base }}/contribute-code.html) guide. The guide does also include instructions to setup a development environment, our coding guidelines and code style, and explains how to submit a code contribution. -5. After you have finalized your contribution, verify the compliance with the contribution guidelines (see below), and make the commit. To make the changes easily mergeable, please rebase them to the latest version of the main repository's master branch. Assuming you created a topic branch (step 3), you can follow this sequence of commands to do that: -switch to the master branch, update it to the latest revision, switch back to your topic branch, and rebase it on top of the master branch. +**Please read the [Contribute code]( {{ site.base }}/contribute-code.html) guide before you start to work on a code contribution.** - ``` -git checkout master -git pull https://github.com/apache/flink.git master -git checkout myBranch -git rebase master -``` -Have a look [here](https://help.github.com/articles/using-git-rebase) for more information about rebasing commits. +Please do also read the [Submit a Contributor License Agreement]({{ site.baseurl }}/how-to-contribute.html#submit-a-contributor-license-agreement) Section. +### Looking for an issue to work on? +{:.no_toc} -6. Push the contribution back into your fork of the Flink repository. +We maintain a list of all known bugs, proposed improvements and suggested features in [Flink's JIRA](https://issues.apache.org/jira/browse/FLINK/?selectedTab=com.atlassian.jira.jira-projects-plugin:issues-panel). Issues that we believe are good tasks for new contributors are tagged with a special "starter" tag. Those tasks are supposed to be rather easy to solve and will help you to become familiar with the project and the contribution process. - ``` -git push origin myBranch -``` -Go the website of your repository fork (`https://github.com/<your-user-name>/flink`) and use the "Create Pull Request" button to start creating a pull request. Make sure that the base fork is `apache/flink master` and the head fork selects the branch with your changes. Give the pull request a meaningful description and send it. +Please have a look at the list of [starter issues](https://issues.apache.org/jira/issues/?jql=project%20%3D%20FLINK%20AND%20resolution%20%3D%20Unresolved%20AND%20labels%20%3D%20starter%20ORDER%20BY%20priority%20DESC), if you are looking for an issue to work on. You can of course also choose [any other issue](https://issues.apache.org/jira/issues/?jql=project%20%3D%20FLINK%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC) to work on. Feel free to ask questions about issues that you would be interested in working on. +----- -### Verifying the Compliance of your Code +## Contribute documentation -Before sending a patch or pull request, please verify that it complies with the guidelines of the project. While we try to keep the set of guidelines small and easy, it is important to follow those rules in order to guarantee good code quality, to allow efficient reviews, and to allow committers to easily merge your changes. +Good documentation is crucial for any kind of software. This is especially true for sophisticated software systems such as distributed data processing engines like Apache Flink. The Apache Flink community aims to provide concise, precise, and complete documentation and welcomes any contribution to improve Apache Flink's documentation. -Please have a look at the [coding guidelines]({{ site.baseurl }}/coding-guidelines.html) for a guide to the format of code and pull requests. +- Please report missing, incorrect, or out-dated documentation as a [JIRA issue](http://issues.apache.org/jira/browse/FLINK). +- Flink's documentation is written in Markdown and located in the `docs` folder in [Flink's source code repository]({{ site.baseurl }}/community.html#main-source-repositories). See the [Contribute documentation]({{ site.base }}/contribute-documentation.html) guidelines for detailed instructions for how to update and improve the documentation and to contribute your changes. -Most important of all, verify that your changes are correct and do not break existing functionality. Run the existing tests by calling `mvn verify` in the root directory of the repository, and make sure that the tests succeed. We encourage every contributor to use a *continuous integration* service that will automatically test the code in your repository whenever you push a change. Flink is pre-configured for [Travis CI](http://docs.travis-ci.com/), which can be easily enabled for your private repository fork (it uses GitHub for authentication, so you don't need an additional account). Simply add the *Travis CI* hook to your repository (*settings --> webhooks & services --> add service*) and enable tests for the "flink" repository on [Travis](https://travis-ci.org/profile). +----- -When contributing documentation, please review the rendered HTML versions of the documents you changed. You can look at the HTML pages by using the rendering script in preview mode. +## Improve the website -``` -cd docs -./build_docs.sh -p -``` -Now, open your browser at `http://localhost:4000` and check out the pages you changed. +The [Apache Flink website](http://flink.apache.org) presents Apache Flink and its community. It serves several purposes including: -## Contribute changes to the Website +- Informing visitors about Apache Flink and its features. +- Encouraging visitors to download and use Flink. +- Encouraging visitors to engage with the community. -The website of Apache Flink is hosted in a separate Git repository. We suggest making a fork of the [flink-web GitHub mirror repository](https://github.com/apache/flink-web). +We welcome any contribution to improve our website. -To make changes to the website, you have to checkout its source code first. The website resides in the `asf-site` branch of the repository: +- Please open a [JIRA issue](http://issues.apache.org/jira/browse/FLINK) if you think our website could be improved. +- Please follow the [Improve the website]({{ site.baseurl }}/improve-website.html) guidelines if you would like to update and improve the website. -``` -git clone -b asf-site https://github.com/<your-user-name>/flink-web.git -cd flink-web -``` +----- -The `flink-web` directory contains the files that we use to build the website. We use [Jekyll](http://jekyllrb.com/) to generate static HTML files for the website. +## More ways to contribute... -### Files and Directories in the website git repository +There are many more ways to contribute to the Flink community. For example you can -The files and directories in the website git repository have the following roles: +- give a talk about Flink and tell others how you use it. +- organize a local Meetup or user group. +- talk to people about Flink. +- ... -- all files ending with `.md` are [Markdown](http://daringfireball.net/projects/markdown/) files. Those are the input for the HTML files. -- regular directories (not starting with an underscore (`_`)) contain also `.md` files. The directory structure is also represented in the generated HTML files. -- the `_posts` directory contains one Markdown file for each blog post on the website. To contribute a post, just add a new file there. -- the `_includes/` directory contains includeable files such as the navigation bar or the footer. -- the `docs/` directory contains copies of the documentation of Flink for different releases. There is a directory inside `docs/` for each stable release and the latest SNAPSHOT version. The build script is taking care of the maintenance of this directory. -- the `content/` directory contains the generated HTML files from Jekyll. It is important to place the files in this directory since the Apache Infrastructure to host the Flink website is pulling the HTML content from his directory. (For committers: When pushing changes to the website repository, push also the updates in the `content/` directory!) -- see the section below for the `build.sh` script. +----- +## Submit a Contributor License Agreement -### The `build.sh` script +Please submit a contributor license agreement to the Apache Software Foundation (ASF) if you would like to contribute to Apache Flink. The following quote from [http://www.apache.org/licenses](http://www.apache.org/licenses/#clas) gives more information about the ICLA and CCLA and why they are necessary. -The `build.sh` script creates HTML files from the input Markdown files. Use the `-p` flag to let Jekyll serve a **p**review of the website on `http://localhost:4000/`. +> The ASF desires that all contributors of ideas, code, or documentation to the Apache projects complete, sign, and submit (via postal mail, fax or email) an [Individual Contributor License Agreement](http://www.apache.org/licenses/icla.txt) (CLA) [ [PDF form](http://www.apache.org/licenses/icla.pdf) ]. The purpose of this agreement is to clearly define the terms under which intellectual property has been contributed to the ASF and thereby allow us to defend the project should there be a legal dispute regarding the software at some future time. A signed CLA is required to be on file before an individual is given commit rights to an ASF project. +> +> For a corporation that has assigned employees to work on an Apache project, a [Corporate CLA](http://www.apache.org/licenses/cla-corporate.txt) (CCLA) is available for contributing intellectual property via the corporation, that may have been assigned as part of an employment agreement. Note that a Corporate CLA does not remove the need for every developer to sign their own CLA as an individual, to cover any of their contributions which are not owned by the corporation signing the CCLA. +> +> ... -The build script also takes care of maintaining the `docs/` directory. Set the `-u` flag to **u**pdate documentation. This includes fetching the Flink git repository and copying different versions of the documentation. +----- ## How to become a committer -There is no strict protocol for becoming a committer. Candidates for new committers are typically people that are active contributors and community members. - -Being an active community member means participating on mailing list discussions, helping to answer questions, being respectful towards others, and following the meritocratic principles of community management. Since the "Apache Way" has a strong focus on the project community, this part is very important. - -Of course, contributing code to the project is important as well. A good way to start is contributing improvements, new features, or bugfixes. You need to show that you take responsibility for the code that you contribute, add tests/documentation, and help maintaining it. - -Finally, candidates for new committers are suggested by current committers, mentors, or PMC members, and voted upon by the PMC. - - -### How to use git as a committer +Committers are community members that have write access to the project's repositories, i.e., they can modify the code, documentation, and website by themselves and also accept other contributions. -Only the infrastructure team of the ASF has administrative access to the GitHub mirror. Therefore, comitters have to push changes to the git repository at the ASF. - -#### Main source repositories - -**ASF writable**: `https://git-wip-us.apache.org/repos/asf/flink.git` - -**ASF read-only**: `git://git.apache.org/repos/asf/flink.git` - -**ASF read-only**: `https://github.com/apache/flink.git` - -Note: Flink does not build with Oracle JDK 6. It runs with Oracle JDK 6. +There is no strict protocol for becoming a committer. Candidates for new committers are typically people that are active contributors and community members. -If you want to build for Hadoop 1, activate the build profile via `mvn clean package -DskipTests -Dhadoop.profile=1`. +Being an active community member means participating on mailing list discussions, helping to answer questions, verifying release candidates, being respectful towards others, and following the meritocratic principles of community management. Since the "Apache Way" has a strong focus on the project community, this part is *very* important. -#### Website repositories +Of course, contributing code and documentation to the project is important as well. A good way to start is contributing improvements, new features, or bug fixes. You need to show that you take responsibility for the code that you contribute, add tests and documentation, and help maintaining it. -**ASF writable**: `https://git-wip-us.apache.org/repos/asf/flink-web.git` +Candidates for new committers are suggested by current committers or PMC members, and voted upon by the PMC. -**ASF read-only**: `git://git.apache.org/repos/asf/flink-web.git` +If you would like to become a committer, you should engage with the community and start contributing to Apache Flink in any of the above ways. You might also want to talk to other committers and ask for their advice and guidance. -**ASF read-only**: `https://github.com/apache/flink-web.git` -Details on how to set the credentials for the ASF git repostiory are [linked here](https://git-wip-us.apache.org/). -To merge pull requests from our Flink GitHub mirror, there is a script in the source `./tools/merge_pull_request.sh.template`. Rename it to `merge_pull_request.sh` with the appropriate settings and use it for merging. -## Snapshots (Nightly Builds) -Apache Flink `{{ site.FLINK_VERSION_LATEST }}` is our latest development version. -You can download a packaged version of our nightly builds, which include -the most recent development code. You can use them if you need a feature -before its release. Only builds that pass all tests are published here. -- **Hadoop 1**: <a href="{{ site.FLINK_DOWNLOAD_URL_HADOOP_1_LATEST }}" class="ga-track" id="download-hadoop1-nightly">{{ site.FLINK_DOWNLOAD_URL_HADOOP_1_LATEST | split:'/' | last }}</a> -- **Hadoop 2 and YARN**: <a href="{{ site.FLINK_DOWNLOAD_URL_HADOOP_2_LATEST }}" class="ga-track" id="download-hadoop2-nightly">{{ site.FLINK_DOWNLOAD_URL_HADOOP_2_LATEST | split:'/' | last }}</a> -Add the **Apache Snapshot repository** to your Maven `pom.xml`: -```xml -<repositories> - <repository> - <id>apache.snapshots</id> - <name>Apache Development Snapshot Repository</name> - <url>https://repository.apache.org/content/repositories/snapshots/</url> - <releases><enabled>false</enabled></releases> - <snapshots><enabled>true</enabled></snapshots> - </repository> -</repositories> -``` -You can now include Apache Flink as a Maven dependency (see above) with version `{{ site.FLINK_VERSION_LATEST }}` (or `{{ site.FLINK_VERSION_HADOOP_1_LATEST}}` for compatibility with old Hadoop 1.x versions). http://git-wip-us.apache.org/repos/asf/flink-web/blob/f2411e25/improve-website.md ---------------------------------------------------------------------- diff --git a/improve-website.md b/improve-website.md new file mode 100644 index 0000000..86a4f02 --- /dev/null +++ b/improve-website.md @@ -0,0 +1,102 @@ +--- +title: "Improving the Website" +--- + +The [Apache Flink website](http://flink.apache.org) presents Apache Flink and its community. It serves several purposes including: + +- Informing visitors about Apache Flink and its features. +- Encouraging visitors to download and use Flink. +- Encouraging visitors to engage with the community. + +We welcome any contribution to improve our website. This document contains all information that is necessary to improve Flink's website. + +{% toc %} + +## Obtain the website sources + +The website of Apache Flink is hosted in a dedicated [git](http://git-scm.com/) repository which is mirrored to Github at [https://github.com/apache/flink-web](https://github.com/apache/flink-web). + +The easiest way to contribute website updates is to fork [the mirrored website repository on Github](https://github.com/apache/flink-web) into your own Github account by clicking on the fork button at the top right. If you have no Github account, you can create one for free. + +Next, clone your fork to your local machine. + +``` +git clone https://github.com/<your-user-name>/flink-web.git +``` + +The `flink-web` directory contains the cloned repository. The website resides in the `asf-site` branch of the repository. Run the following commands to enter the directory and switch to the `asf-site` branch. + +``` +cd flink-web +git checkout asf-site +``` + +## Directory structure and files + +Flink's website is written in [Markdown](http://daringfireball.net/projects/markdown/). Markdown is a lightweight markup language which can be translated to HTML. We use [Jekyll](http://jekyllrb.com/) to generate static HTML files from Markdown. + +The files and directories in the website git repository have the following roles: + +- All files ending with `.md` are Markdown files. These files are translated into static HTML files. +- Regular directories (not starting with an underscore (`_`)) contain also `.md` files. The directory structure is reflected in the generated HTML files and the published website. +- The `_posts` directory contains blog posts. Each blog post is written as one Markdown file. To contribute a post, add a new file there. +- The `_includes/` directory contains includeable files such as the navigation bar or the footer. +- The `docs/` directory contains copies of the documentation of Flink for different releases. There is a directory inside `docs/` for each stable release and the latest SNAPSHOT version. The build script is taking care of the maintenance of this directory. +- The `content/` directory contains the generated HTML files from Jekyll. It is important to place the files in this directory since the Apache Infrastructure to host the Flink website is pulling the HTML content from his directory. (For committers: When pushing changes to the website git, push also the updates in the `content/` directory!) + +## Update or extend the documentation + +You can update and extend the website by modifying or adding Markdown files or any other resources such as CSS files. To verify your changes start the build script in preview mode. + +``` +./build.sh -p +``` + +The script compiles the Markdown files into HTML and starts a local webserver. Open your browser at `http://localhost:4000` to view the website including your changes. The served website is automatically re-compiled and updated when you modify and save any file and refresh your browser. + +Please feel free to ask any questions you have on the developer mailing list. + +## Submit your contribution + +The Flink project accepts website contributions through the [GitHub Mirror](https://github.com/apache/flink-web) as [Pull Requests](https://help.github.com/articles/using-pull-requests). Pull requests are a simple way of offering a patch by providing a pointer to a code branch that contains the changes. + +To prepare and submit a pull request follow these steps. + +1. Commit your changes to your local git repository. **Please Make sure that your commit does not include translated files (any files in the `content/` directory).** Unless your contribution is a major rework of the website, please squash it into a single commit. + +2. Push the commit to a dedicated branch of your fork of the Flink repository at Github. + + ``` + git push origin myBranch + ``` + +3. Go the website of your repository fork (`https://github.com/<your-user-name>/flink-web`) and use the "Create Pull Request" button to start creating a pull request. Make sure that the base fork is `apache/flink-web asf-site` and the head fork selects the branch with your changes. Give the pull request a meaningful description and submit it. + +## Committer section + +**This section is only relevant for committers.** + +### ASF website git repositories +{:.no_toc} + +**ASF writable**: https://git-wip-us.apache.org/repos/asf/flink-web.git + +**ASF read-only**: git://git.apache.org/repos/asf/flink-web.git + +Details on how to set the credentials for the ASF git repository are [linked here](https://git-wip-us.apache.org/). + +### Merging a pull request +{:.no_toc} + +Contributions are expected to be done on the source files only (no modifications on the compiled files in the `content/` directory.). Before pushing a website change, please run the build script + +``` +./build.sh +``` + +add the changes to the `content/` directory as an additional commit and push the changes to the ASF base repository. + +### Updating the documentation directory +{:.no_toc} + +The build script does also take care of maintaining the `docs/` directory. Set the `-u` flag to update documentation. This includes fetching the Flink git repository and copying different versions of the documentation.
