Browse code

Fix documentation for release-checklist

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)

Tibor Vass authored on 2014/06/07 06:12:39
Showing 1 changed files
... ...
@@ -17,30 +17,51 @@ If you don't have an upstream remote, you can add one easily using something
17 17
 like:
18 18
 
19 19
 ```bash
20
+export GITHUBUSER="YOUR_GITHUB_USER"
20 21
 git remote add origin https://github.com/dotcloud/docker.git
21
-git remote add YOURUSER git@github.com:YOURUSER/docker.git
22
+git remote add $GITHUBUSER git@github.com:$GITHUBUSER/docker.git
22 23
 ```
23 24
 
24 25
 ### 1. Pull from master and create a release branch
25 26
 
27
+Note: Even for major releases, all of X, Y and Z in vX.Y.Z must be specified (e.g. v1.0.0).
28
+
26 29
 ```bash
27 30
 export VERSION=vX.Y.Z
28
-git checkout release
29
-git fetch
30
-git reset --hard origin/release
31
+git fetch origin
32
+git branch -D release || true
33
+git checkout --track origin/release
31 34
 git checkout -b bump_$VERSION
32 35
 git merge origin/master
33 36
 ```
34 37
 
35 38
 ### 2. Update CHANGELOG.md
36 39
 
37
-You can run this command for reference:
40
+You can run this command for reference with git 2.0:
41
+
42
+```bash
43
+git fetch --tags
44
+LAST_VERSION=$(git tag -l --sort=-version:refname "v*" | grep -E 'v[0-9\.]+$' | head -1)
45
+git log --stat $LAST_VERSION..bump_$VERSION
46
+```
38 47
 
48
+If you don't have git 2.0 but have a sort command that supports `-V`:
39 49
 ```bash
40
-LAST_VERSION=$(git tag | grep -E 'v[0-9\.]+$' | sort -nr | head -n 1)
41
-git log --stat $LAST_VERSION..HEAD
50
+git fetch --tags
51
+LAST_VERSION=$(git tag -l | grep -E 'v[0-9\.]+$' | sort -rV | head -1)
52
+git log --stat $LAST_VERSION..bump_$VERSION
42 53
 ```
43 54
 
55
+If releasing a major version (X or Y increased in vX.Y.Z), simply listing notable user-facing features is sufficient.
56
+```markdown
57
+#### Notable features since <last major version>
58
+* New docker command to do something useful
59
+* Remote API change (deprecating old version)
60
+* Performance improvements in some usecases
61
+* ...
62
+```
63
+
64
+For minor releases (only Z increases in vX.Y.Z), provide a list of user-facing changes.
44 65
 Each change should be listed under a category heading formatted as `#### CATEGORY`.
45 66
 
46 67
 `CATEGORY` should describe which part of the project is affected.
... ...
@@ -95,13 +116,7 @@ a count, add a simple `| wc -l`.
95 95
 echo ${VERSION#v} > VERSION
96 96
 ```
97 97
 
98
-### 4. Run all tests
99
-
100
-```bash
101
-make test
102
-```
103
-
104
-### 5. Test the docs
98
+### 4. Test the docs
105 99
 
106 100
 Make sure that your tree includes documentation for any modified or
107 101
 new features, syntax or semantic changes.
... ...
@@ -120,44 +135,41 @@ To make a shared test at http://beta-docs.docker.io:
120 120
 make AWS_S3_BUCKET=beta-docs.docker.io docs-release
121 121
 ```
122 122
 
123
-### 6. Commit and create a pull request to the "release" branch
123
+### 5. Commit and create a pull request to the "release" branch
124 124
 
125 125
 ```bash
126
+export GITHUBUSER="YOUR_GITHUB_USER"
126 127
 git add VERSION CHANGELOG.md
127 128
 git commit -m "Bump version to $VERSION"
128
-git push origin bump_$VERSION
129
-echo "https://github.com/dotcloud/docker/compare/release...bump_$VERSION"
129
+git push $GITHUBUSER bump_$VERSION
130
+echo "https://github.com/$GITHUBUSER/docker/compare/dotcloud:master...$GITHUBUSER:bump_$VERSION?expand=1"
130 131
 ```
131 132
 
132 133
 That last command will give you the proper link to visit to ensure that you
133 134
 open the PR against the "release" branch instead of accidentally against
134 135
 "master" (like so many brave souls before you already have).
135 136
 
136
-### 7. Get 2 other maintainers to validate the pull request
137
+### 6. Get 2 other maintainers to validate the pull request
137 138
 
138
-### 8. Publish binaries
139
+### 7. Publish binaries
139 140
 
140
-To run this you will need access to the release credentials.
141
-Get them from [the infrastructure maintainers](
142
-https://github.com/dotcloud/docker/blob/master/hack/infrastructure/MAINTAINERS).
141
+To run this you will need access to the release credentials. Get them from the Core maintainers.
142
+
143
+Replace "..." with the respective credentials:
143 144
 
144 145
 ```bash
145 146
 docker build -t docker .
146
-export AWS_S3_BUCKET="test.docker.io"
147
-export AWS_ACCESS_KEY="$(cat ~/.aws/access_key)"
148
-export AWS_SECRET_KEY="$(cat ~/.aws/secret_key)"
149
-export GPG_PASSPHRASE=supersecretsesame
150 147
 docker run \
151 148
        -e AWS_S3_BUCKET=test.docker.io \
152
-       -e AWS_ACCESS_KEY \
153
-       -e AWS_SECRET_KEY \
154
-       -e GPG_PASSPHRASE \
149
+       -e AWS_ACCESS_KEY="..." \
150
+       -e AWS_SECRET_KEY="..." \
151
+       -e GPG_PASSPHRASE="..." \
155 152
        -i -t --privileged \
156 153
        docker \
157 154
        hack/release.sh
158 155
 ```
159 156
 
160
-It will run the test suite one more time, build the binaries and packages,
157
+It will run the test suite, build the binaries and packages,
161 158
 and upload to the specified bucket (you should use test.docker.io for
162 159
 general testing, and once everything is fine, switch to get.docker.io as
163 160
 noted below).
... ...
@@ -183,15 +195,15 @@ get.docker.io:
183 183
 ```bash
184 184
 docker run \
185 185
        -e AWS_S3_BUCKET=get.docker.io \
186
-       -e AWS_ACCESS_KEY \
187
-       -e AWS_SECRET_KEY \
188
-       -e GPG_PASSPHRASE \
186
+       -e AWS_ACCESS_KEY="..." \
187
+       -e AWS_SECRET_KEY="..." \
188
+       -e GPG_PASSPHRASE="..." \
189 189
        -i -t --privileged \
190 190
        docker \
191 191
        hack/release.sh
192 192
 ```
193 193
 
194
-### 9. Breakathon
194
+### 8. Breakathon
195 195
 
196 196
 Spend several days along with the community explicitly investing time and
197 197
 resources to try and break Docker in every possible way, documenting any
... ...
@@ -207,28 +219,28 @@ by the book.
207 207
 Any issues found may still remain issues for this release, but they should be
208 208
 documented and give appropriate warnings.
209 209
 
210
-### 10. Apply tag
210
+### 9. Apply tag
211
+
212
+It's very important that we don't make the tag until after the official
213
+release is uploaded to get.docker.io!
211 214
 
212 215
 ```bash
213 216
 git tag -a $VERSION -m $VERSION bump_$VERSION
214 217
 git push origin $VERSION
215 218
 ```
216 219
 
217
-It's very important that we don't make the tag until after the official
218
-release is uploaded to get.docker.io!
219
-
220
-### 11. Go to github to merge the `bump_$VERSION` branch into release
220
+### 10. Go to github to merge the `bump_$VERSION` branch into release
221 221
 
222 222
 Don't forget to push that pretty blue button to delete the leftover
223 223
 branch afterwards!
224 224
 
225
-### 12. Update the docs branch
225
+### 11. Update the docs branch
226 226
 
227 227
 You will need the `awsconfig` file added to the `docs/` directory to contain the
228 228
 s3 credentials for the bucket you are deploying to.
229 229
 
230 230
 ```bash
231
-git checkout docs
231
+git checkout -b docs release || git checkout docs
232 232
 git fetch
233 233
 git reset --hard origin/release
234 234
 git push -f origin docs
... ...
@@ -239,7 +251,7 @@ The docs will appear on http://docs.docker.io/ (though there may be cached
239 239
 versions, so its worth checking http://docs.docker.io.s3-website-us-west-2.amazonaws.com/).
240 240
 For more information about documentation releases, see `docs/README.md`.
241 241
 
242
-### 13. Create a new pull request to merge release back into master
242
+### 12. Create a new pull request to merge release back into master
243 243
 
244 244
 ```bash
245 245
 git checkout master
... ...
@@ -250,14 +262,14 @@ git checkout -b merge_release_$VERSION
250 250
 echo ${VERSION#v}-dev > VERSION
251 251
 git add VERSION
252 252
 git commit -m "Change version to $(cat VERSION)"
253
-git push origin merge_release_$VERSION
254
-echo "https://github.com/dotcloud/docker/compare/master...merge_release_$VERSION"
253
+git push $GITHUBUSER merge_release_$VERSION
254
+echo "https://github.com/$GITHUBUSER/docker/compare/dotcloud:master...$GITHUBUSER:merge_release_$VERSION?expand=1"
255 255
 ```
256 256
 
257 257
 Again, get two maintainers to validate, then merge, then push that pretty
258 258
 blue button to delete your branch.
259 259
 
260
-### 14. Rejoice and Evangelize!
260
+### 13. Rejoice and Evangelize!
261 261
 
262 262
 Congratulations! You're done.
263 263