README.md 4.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
A
Alek Storm 已提交
19

20
# Apache Releases
A
Alek Storm 已提交
21

22 23
You'll probably want to run these commands manually and understand what
they do prior to doing so.
A
Alek Storm 已提交
24

25 26 27 28 29
For coordinating on releases, on more operational topics that require more
synchronous communications, we tend to use the `#apache-releases` channel
on the Superset Slack. People crafting releases and those interested in
partaking in the process should join the channel.

30 31
## Release setup

32 33
First you need to setup a few things. This is a one-off and doesn't
need to be done at every release.
A
Alek Storm 已提交
34 35

```bash
36
    # Create PGP Key, and use your @apache.org email address
37
    gpg --gen-key
38

39
    # Checkout ASF dist repo
40 41 42

    svn checkout https://dist.apache.org/repos/dist/dev/incubator/superset/ ~/svn/superset_dev

43
    svn checkout https://dist.apache.org/repos/dist/release/incubator/superset/ ~/svn/superset
44
    cd ~/svn/superset
45 46


47 48 49
    # Add your GPG pub key to KEYS file. Replace "Maxime Beauchemin" with your name
    export FULLNAME="Maxime Beauchemin"
    (gpg --list-sigs $FULLNAME && gpg --armor --export $FULLNAME ) >> KEYS
50 51


52 53
    # Commit the changes
    svn commit -m "Add PGP keys of new Superset committer"
A
Alek Storm 已提交
54 55
```

56 57
## Crafting tarball and signatures

58 59 60
Now let's craft a source release
```bash
    # Assuming these commands are executed from the root of the repo
61 62 63
    export REPO_DIR=$(pwd)
    # Set VERSION to the release being prepared (rc1 for first vote on version)
    export VERSION=0.34.1rc1
64
    export RELEASE=apache-superset-incubating-${VERSION}
65
    export RELEASE_TARBALL=${RELEASE}-source.tar.gz
66 67 68 69

    # Let's create a git tag
    git tag -f ${VERSION}

70 71
    # Create the target folder
    mkdir -p ~/svn/superset_dev/${VERSION}/
72 73
    git archive \
        --format=tar.gz ${VERSION} \
74
        --prefix="${RELEASE}/" \
75
        -o ~/svn/superset_dev/${VERSION}/${RELEASE_TARBALL}
76

77
    cd ~/svn/superset_dev/${VERSION}/
78
    ${REPO_DIR}/scripts/sign.sh ${RELEASE}-source.tar.gz
79 80
```

81 82
## Shipping to SVN

83
Now let's ship this RC into svn's dev folder
84 85

```bash
86
    cd ~/svn/superset_dev/
87
    svn add ${VERSION}
88
    svn commit -m "${VERSION}"
89 90
```

91 92
Now you're ready to start the VOTE thread.

93 94 95 96 97 98
## Validating a release

https://www.apache.org/info/verification.html

## Publishing a successful release

99 100 101 102 103 104
Upon a successful vote, you'll have to copy the folder into the non-"dev/"
folder.
```bash
    cp -r ~/svn/superset_dev/${VERSION}/ ~/svn/superset/${VERSION}/
    cd ~/svn/superset/
    svn add ${VERSION}
105
    svn commit -m "${VERSION}"
106 107 108 109
```

Now you can announce the release on the mailing list, make sure to use the
proper template
110

111 112 113 114 115 116 117
## Post release

In `UPDATING.md`, a file that contains a list of notifications around
deprecations and upgrading-related topics,
make sure to move the content now under the `Next Version` section under a new
section for the new release.

118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
## Build from source tarball

To make a working build given a tarball
```bash
# Building a docker from a tarball
VERSION=0.33.0rc2 && \
docker build -t apache-superset:$VERSION -f Dockerfile.from_tarball . --build-arg VERSION=$VERSION

# testing the resulting docker
docker run -p 5001:8088 apache-superset:$VERSION
# you should be able to access localhost:5001 on your browser
# login using admin/admin
```

# Refresh documentation website

Every once in a while we want to compile the documentation and publish it.
Here's how to do it.

```bash
# install doc dependencies
pip install -r docs/requirements.txt

# build the docs
python setup.py build_sphinx

# copy html files to temp folder
cp -r docs/_build/html/ /tmp/tmp_superset_docs/

# clone the docs repo
cd ~/
git clone https://git-wip-us.apache.org/repos/asf/incubator-superset-site.git

# copy
cp -r /tmp/tmp_superset_docs/ ~/incubator-superset-site.git/

# commit and push to `asf-site` branch
cd ~/incubator-superset-site.git/
git checkout asf-site
git add .
git commit -a -m "New doc version"
git push origin master
```