Skip to content

Commit 6d25dfd

Browse files
kszucsnealrichardson
authored andcommitted
ARROW-5646: [Crossbow][Documentation] Move the user guide to the Sphinx documentation
Closes apache#5216 from kszucs/ARROW-5646 and squashes the following commits: ee4b7a2 <Krisztián Szűcs> use txt extension dc0afbd <Krisztián Szűcs> address review comments faa8917 <Krisztián Szűcs> Move crossbow guide to the documentation Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
1 parent 9dec79b commit 6d25dfd

3 files changed

Lines changed: 275 additions & 188 deletions

File tree

dev/tasks/README.md

Lines changed: 1 addition & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -16,191 +16,4 @@ See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
1818

19-
# Arrow Packaging
20-
21-
The content of this directory aims for automating the historically error prone
22-
process of Arrow packaging.
23-
24-
Packages:
25-
- C++ and Python [conda-forge packages](conda-recipes) for Linux, Mac and
26-
Windows
27-
- Python [Wheels](python-wheels) for Linux, Mac and Windows
28-
- C++ and GLib [Linux packages](linux-packages) for multiple distributions
29-
- Java
30-
31-
## Architecture
32-
33-
### Executors
34-
35-
Individual jobs are executed on public CI services, currently:
36-
- Linux: TravisCI
37-
- Mac: TravisCI
38-
- Windows: AppVeyor
39-
40-
### Queue
41-
42-
Because of the nature of how the CI services work, the scheduling of jobs happens
43-
through an additional git repository, which acts like a job queue for the tasks.
44-
A job is a git commit on a particular git branch, containing only the required
45-
configuration file to run the requested build (currently `.travis.yml` or
46-
`appveyor.yml`).
47-
48-
### Scheduler
49-
50-
[Crossbow.py](crossbow.py) handles version generation, task rendering and
51-
submission. The tasks are defined in `tasks.yml`
52-
53-
54-
## Install
55-
56-
> The following guide depends on GitHub, but theoretically any git server can be
57-
> used.
58-
59-
1. [Create the queue
60-
repository](https://help.github.com/articles/creating-a-new-repository)
61-
2. Enable [TravisCI](https://travis-ci.org/getting_started),
62-
[Appveyor](https://www.appveyor.com/docs/) and
63-
[CircleCI](https://circleci.com/docs/2.0/getting-started/)
64-
integrations on it
65-
66-
- turn off Travis' [auto cancellation](https://docs.travis-ci.com/user/customizing-the-build/#Building-only-the-latest-commit) feature on branches
67-
68-
3. Clone the newly created, by default the scripts looks for `crossbow` next to
69-
arrow repository.
70-
71-
```bash
72-
git clone https://github.com/<user>/crossbow crossbow
73-
```
74-
75-
**Important note:** Crossbow currently requires HTTPS repository
76-
URLs. It will fail with an unintuitive error if you clone from a
77-
`git@` SSH URL. See ARROW-3572.
78-
79-
4. [Create a Personal Access
80-
Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
81-
5. Locally export the token as an environment variable:
82-
83-
```bash
84-
export CROSSBOW_GITHUB_TOKEN=<token>
85-
```
86-
87-
> or pass as an argument to the CLI script `--github-token`
88-
89-
6. Export the previously created GitHub token on both CI services:
90-
91-
Use `CROSSBOW_GITHUB_TOKEN` encrypted environment variable. You can set them
92-
at the following URLs, where `ghuser` is the GitHub username and `ghrepo` is
93-
the GitHub repository name (typically `crossbow`):
94-
95-
- TravisCI: `https://travis-ci.org/<ghuser>/<ghrepo>/settings`
96-
- Appveyor: `https://ci.appveyor.com/project/<ghuser>/<ghrepo>/settings/environment`
97-
- CircleCI: `https://circleci.com/gh/<ghuser>/<ghrepo>/edit#env-vars`
98-
99-
On Appveyor check the `skip branches without appveyor.yml` checkbox on the
100-
web UI under crossbow repository's settings.
101-
102-
7. Install Python 3.6:
103-
104-
Miniconda is preferred, see installation instructions:
105-
https://conda.io/docs/user-guide/install/index.html
106-
107-
8. Install the python dependencies for the script:
108-
109-
```bash
110-
conda install -c conda-forge -y jinja2 pygit2 click ruamel.yaml setuptools_scm github3.py python-gnupg toolz jira
111-
```
112-
113-
```bash
114-
# pygit2 requires libgit2: http://www.pygit2.org/install.html
115-
pip install jinja2 pygit2 click ruamel.yaml setuptools_scm github3.py python-gnupg toolz jira
116-
```
117-
118-
9. Try running it:
119-
```bash
120-
$ python crossbow.py --help
121-
```
122-
123-
124-
## Usage
125-
126-
The script does the following:
127-
128-
1. Detects the current repository, thus supports forks. The following snippet
129-
will build kszucs's fork instead of the upstream apache/arrow repository.
130-
131-
```bash
132-
$ git clone https://github.com/kszucs/arrow
133-
$ git clone https://github.com/kszucs/crossbow
134-
135-
$ cd arrow/dev/tasks
136-
$ python crossbow.py submit conda-win conda-linux conda-osx
137-
```
138-
139-
2. Gets the HEAD commit of the currently checked out branch and generates
140-
the version number based on [setuptools_scm](https://pypi.python.org/pypi/setuptools_scm).
141-
So to build a particular branch, just check out before running the script:
142-
143-
```bash
144-
git checkout ARROW-<ticket number>
145-
python dev/tasks/crossbow.py submit --dry-run conda-linux conda-osx
146-
```
147-
148-
> Note that the arrow branch must be pushed beforehand, because the script
149-
> will clone the selected branch.
150-
151-
3. Reads and renders the required build configurations with the parameters
152-
substituted.
153-
2. Create a branch per task, prefixed with the job id. For example
154-
to build conda recipes on linux it will create a new branch:
155-
`crossbow@build-<id>-conda-linux`.
156-
3. Pushes the modified branches to GitHub which triggers the builds.
157-
For authentication it uses GitHub OAuth tokens described in the install
158-
section.
159-
160-
161-
### Query the build status
162-
163-
```bash
164-
python crossbow.py status <build id / branch name>
165-
```
166-
167-
### Download the build artifacts
168-
169-
```bash
170-
python crossbow.py artifacts <build id / branch name>
171-
```
172-
173-
### Examples
174-
175-
The script accepts a pattern as a first argument to narrow the build scope:
176-
177-
Run multiple builds:
178-
179-
```bash
180-
$ python crossbow.py submit debian-stretch conda-linux-py36 wheel-win-py36
181-
Repository: https://github.com/kszucs/arrow@tasks
182-
Commit SHA: 810a718836bb3a8cefc053055600bdcc440e6702
183-
Version: 0.9.1.dev48+g810a7188.d20180414
184-
Pushed branches:
185-
- debian-stretch
186-
- conda-linux-py36
187-
- wheel-win-py36
188-
```
189-
190-
Just render without applying or committing the changes:
191-
192-
```bash
193-
$ python crossbow.py submit --dry-run task_name
194-
```
195-
196-
Run only `conda` package builds and a Linux one:
197-
198-
```bash
199-
$ python crossbow.py submit -g conda centos-7
200-
```
201-
202-
Run `wheel` builds:
203-
204-
```bash
205-
$ python crossbow.py submit --group wheel
206-
```
19+
See the usage guide under the [documentation page](../../docs/source/developers/crossbow.rst)

0 commit comments

Comments
 (0)