Skip to content

Commit d2d9898

Browse files
j-riveroscpeters
andauthored
Change the way of using the releasepy credentials (#538)
* Change the way of using the releasepy credentials * Include section to install releasepy using pip --------- Signed-off-by: Jose Luis Rivero <[email protected]> Co-authored-by: Steve Peters <[email protected]>
1 parent 9aa0356 commit d2d9898

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

release_instructions.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,20 @@ Before starting the release process, make sure to ask for write access to:
3535
1. The Gz library intended to be released and
3636
2. `gazebo-release` repository.
3737

38-
There are some credentials needed to interact with the release
39-
process:
38+
To interact with Jenkins an API token needs to be created and stored in the
39+
user system:
4040

41-
* Release token: magic sequence of characters needed while running `release.py`
42-
to interact with `build.osrfoundation.org`. This should be given to Gz developers that run releases by the Infra team.
41+
1. Creating a Jenkins API token: opening https://build.osrfoundation.org/me/configure
42+
the section of "API Token" shows the "Add new Token" button (alternatively a github
43+
token could also be used but the Jenkins API helps to restrict the global scope
44+
of the credential).
45+
46+
2. The token needs to be stored in `~/.buildfarm/jenkins.ini` in the form:
47+
```
48+
[https://build.osrfoundation.org]
49+
username = <your-github-user>
50+
password = <token created in step 1>
51+
```
4352
4453
## For Each Release
4554
@@ -172,6 +181,17 @@ upload some Git tags ("release tags") to the source code repository.
172181
You will also need the token described in the [credentials
173182
section](#2-access-and-credentials).
174183
184+
There are a few external dependencies for running release.py. They can be
185+
esily installed using virtual enviroments and pip:
186+
187+
```
188+
# you can change .releasepy_venv by any directory of your preference
189+
python3 -m venv ~/.releasepy_venv
190+
. ~/.releasepy_venv/bin/activate
191+
cd <release-tools-dir>
192+
pip install .
193+
```
194+
175195
**dry-run simulation mode**
176196
177197
The `release.py` tool supports a `--dry-run` flag that allows users to
@@ -186,7 +206,7 @@ The script needs to be run from the repository with the source code (i.e., the r
186206
# Example of dry-run for gz-cmake3 bumped to 3.0.1
187207
cd gz-cmake3
188208
git checkout gz-cmake3
189-
~/release-tools/release.py gz-cmake3 3.0.1 dry-run-fake-token --dry-run
209+
~/release-tools/release.py gz-cmake3 3.0.1 --dry-run
190210
```
191211

192212
**release.py for stable releases**
@@ -196,11 +216,10 @@ git checkout gz-cmake3
196216
cd ign/gz-fooX
197217
git checkout ign/gz-fooX
198218

199-
# Example gz-cmake3 bumped to 3.0.1 with jenkins_token credential
219+
# Example gz-cmake3 bumped to 3.0.1
200220
cd gz-cmake3
201221
git checkout gz-cmake3
202-
# please replace <jenkins_token> with real release token (check crendentials section)
203-
~/release-tools/release.py gz-cmake3 3.0.1 <jenkins_token>
222+
~/release-tools/release.py gz-cmake3 3.0.1
204223
```
205224

206225
**release.py for prereleases or nightlies**
@@ -210,11 +229,10 @@ to be set. The `--upload-to-repo` argument is mandatory when running
210229
`release.py`, and should be set to `prerelease` or `nightly`.
211230

212231
```bash
213-
# Example gz-cmake3 bumped to prerelease 3.0.0~pre1 with jenkins_token credential
232+
# Example gz-cmake3 bumped to prerelease 3.0.0~pre1
214233
cd gz-cmake3
215234
git checkout gz-cmake3
216-
# please replace <jenkins_token> with real release token (check crendentials section)
217-
~/release-tools/release.py gz-cmake3 3.0.0~pre1 <jenkins_token> --upload-to-repo prerelease
235+
~/release-tools/release.py gz-cmake3 3.0.0~pre1 --upload-to-repo prerelease
218236
```
219237

220238
Nightly invocation is generally coded in the server. The version will be
@@ -223,10 +241,8 @@ code will be uploaded, but taken directly in the binary build from the
223241
branch pointed by `--nightly-src-branch`.
224242

225243
```bash
226-
# Example gz-cmake3 nightly from main branch with jenkins_token credential
227-
# please replace <jenkins_token> with real release token (check crendentials section)
228-
~/release-tools/release.py gz-cmake3 3.0.0~pre1 <jenkins_token> --upload-to-repo nightly --nightly-src-branch main
229-
244+
# Example gz-cmake3 nightly from main branch
245+
~/release-tools/release.py gz-cmake3 3.0.0~pre1 --upload-to-repo nightly --nightly-src-branch main
230246
```
231247

232248
**Binary version schema for prereleases and nightlies**
@@ -247,9 +263,8 @@ or the information should appear in the parameters of the Jenkins -debbuilder bu
247263
the first version of the sofware.
248264

249265
```bash
250-
# Example gz-cmake3 bumped from 3.0.1-1 to 3.0.1-2 with jenkins_token credential
251-
# please replace <jenkins_token> with real release token (check crendentials section)
252-
~/release-tools/release.py gz-cmake3 3.0.1 <jenkins_token> --source-tarball-uri https://osrf-distributions.s3.amazonaws.com/gz-cmake/releases/gz-cmake-3.0.1.tar.bz2 --only-bump-revision-linux -release-version 2
266+
# Example gz-cmake3 bumped from 3.0.1-1 to 3.0.1-2
267+
~/release-tools/release.py gz-cmake3 3.0.1 --source-tarball-uri https://osrf-distributions.s3.amazonaws.com/gz-cmake/releases/gz-cmake-3.0.1.tar.bz2 --only-bump-revision-linux -release-version 2
253268
```
254269

255270
## Checking the Building Process

0 commit comments

Comments
 (0)