Updates to deployment docs/files
Change-Id: If4aa072aeca41c18fb5918f6353a4ae61c23257c
This commit is contained in:
@@ -1,76 +1,46 @@
|
|||||||
# powertrain_build Deployment
|
# powertrain-build Deployment
|
||||||
|
|
||||||
[TOC]
|
[TOC]
|
||||||
|
|
||||||
<!--:powertrain_build:-->
|
<!--:powertrain-build:-->
|
||||||
|
|
||||||
|
After changes has been made to powertrain-build, a new version must be deployed.
|
||||||
|
|
||||||
## Repositories
|
## Repositories
|
||||||
|
|
||||||
### powertrain_build Repository
|
The powertrain-build git repository can be found
|
||||||
|
|
||||||
The powertrain_build git repository can be found
|
|
||||||
[here](https://opendev.org/volvocars/powertrain-build).
|
[here](https://opendev.org/volvocars/powertrain-build).
|
||||||
The powertrain_build LTS artifactory repository can be found
|
|
||||||
[here (PLACEHOLDER)](https://artifactory-link).
|
|
||||||
|
|
||||||
## Deployment
|
The powertrain-build PyPi repository can be found
|
||||||
|
[here](https://pypi.org/project/powertrain-build/).
|
||||||
|
|
||||||
After changes (important commits, JIRA stories etc.) has been made to powertrain_build,
|
## Creating a Release
|
||||||
a new version must be deployed.
|
|
||||||
|
|
||||||
## Versioning
|
powertrain-build use [pbr](https://docs.openstack.org/pbr/latest/) to create package meta data.
|
||||||
|
Please read and use the features of pbr if updating resource files or non-python scripts.
|
||||||
|
|
||||||
powertrain_build use semantic versioning, _MAJOR.MINOR.PATCH_. The version
|
powertrain-build use semantic versioning, _MAJOR.MINOR.PATCH_.
|
||||||
is changed by setting an annotated tag with the version (only) at the commit
|
The version is changed by creating and pushing a signed tag with the version on the commit that should be the released commit.
|
||||||
that should be the released commit.
|
|
||||||
|
|
||||||
### Development versioning
|
Creating a tag will trigger the release pipeline which will run a Zuul jobs that uploads to PyPi.
|
||||||
|
For more information about creating releases in an opendev project,
|
||||||
|
see <https://docs.opendev.org/opendev/infra-manual/latest/drivers.html#tagging-a-release>.
|
||||||
|
|
||||||
If distribution of a development version is needed, set a tag
|
### Development Releases
|
||||||
"dev/\<explanatory-name\>". Scripts will update the patch part and add .devN,
|
|
||||||
where N is the number of commits since last proper sematic versioning tag.
|
|
||||||
|
|
||||||
## Instructions
|
Currently, due to the use of pbr, it is hard to utilize the experimental pipeline to upload development releases.
|
||||||
|
Therefore, we recommend building and uploading locally,
|
||||||
|
following [this](https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives) guideline.
|
||||||
|
Note that the Zuul release job also use the _build_ and _twine_ python modules.
|
||||||
|
|
||||||
1. Upload the change to Gerrit, have it reviewed, verified and merged.
|
If you have access to the powertrain-build api token, development releases can be uploaded to the official PyPi repository.
|
||||||
1. Retrieve the merged commit from Gerrit and ensure it is checked out.
|
Otherwise, we recommend creating your own TestPyPi package, see [TestPyPi](https://packaging.python.org/en/latest/guides/using-testpypi/).
|
||||||
1. Create an annotated tag on the commit.\
|
|
||||||
`git tag -a -m'<annotation text>' <version>`
|
|
||||||
1. For a development version:\
|
|
||||||
`git tag -a -m'<annotation text>' dev/<explanatory>`
|
|
||||||
1. Push the tag to Gerrit:\
|
|
||||||
`git push origin <tag-name>`
|
|
||||||
1. Steps after merge can also be done by setting a tag in Gerrit GUI
|
|
||||||
1. Zuul will now:
|
|
||||||
1. Run verification steps.
|
|
||||||
1. Check that the version complies with PEP440 and semantic version
|
|
||||||
1. Check that there is no package with this version on artifactory already.
|
|
||||||
1. Upload the package to artifactory.
|
|
||||||
1. Modify the _requirements.txt_ file in any repo that requires these
|
|
||||||
updates.
|
|
||||||
|
|
||||||
## Additional notes
|
If distribution of a development version is needed, `.devN` should be used as postfix,
|
||||||
|
where "N" equals the release number of the development release.
|
||||||
|
Note that pbr creates this postfix automatically.
|
||||||
|
|
||||||
If powertrain_build become dependent on a new package, add the dependency to
|
## Additional Notes
|
||||||
_\<package\>/requirements.txt_, or _\<package\>/test-requirements.txt_ if the
|
|
||||||
dependency is needed only for testing the package, not for using it.
|
|
||||||
|
|
||||||
powertrain_build use [pbr](https://docs.openstack.org/pbr/latest/) to create
|
If powertrain-build become dependent on a new package, add the dependency to _/requirements.txt_,
|
||||||
package meta data. Please read and use the features of pbr if updating resource
|
or _test-requirements.txt_ if the dependency is needed only for testing the package, not for using it.
|
||||||
files or non-python scripts.
|
|
||||||
|
|
||||||
## Manual deployment
|
|
||||||
|
|
||||||
1. The python package _setuptools_ is required to deploy powertrain_build.
|
|
||||||
1. Follow the guidelines on the
|
|
||||||
[LTS artifactory (PLACEHOLDER)](https://artifactory-link)
|
|
||||||
page about deploying python packages.
|
|
||||||
1. [LTS artifactory (PLACEHOLDER)](https://artifactory-link) -> Set Me Up
|
|
||||||
1. `py -3.6 setup.py sdist`, to build the package.
|
|
||||||
1. `py -3.6 setup.py sdist upload -r local`, to deploy.
|
|
||||||
1. Deployment in this way may overwrite the package on artifactory
|
|
||||||
if the user has enough privilege. Be careful not to upload the
|
|
||||||
same version twice without intending to, as artifactory has no
|
|
||||||
package upload history and an overwritten package is lost.
|
|
||||||
1. The bullet about _requirements.txt_ in [Instructions](#instructions) is valid here too.
|
|
||||||
1. The same [additional notes](#additional-notes) apply to manual deployment.
|
|
||||||
|
@@ -5,6 +5,8 @@ author-email = henrik.wahlqvist@volvocars.com
|
|||||||
summary = A Continuous Integration (CI) build system testing all configurations where a Simulink model is used.
|
summary = A Continuous Integration (CI) build system testing all configurations where a Simulink model is used.
|
||||||
description-file = README.md
|
description-file = README.md
|
||||||
description-content-type = text/x-rst; charset=UTF-8
|
description-content-type = text/x-rst; charset=UTF-8
|
||||||
|
url = https://opendev.org/volvocars/powertrain-build
|
||||||
|
download_url = https://pypi.org/project/powertrain-build/
|
||||||
license = Apache License, Version 2.0
|
license = Apache License, Version 2.0
|
||||||
classifier =
|
classifier =
|
||||||
Development Status :: 5 - Production/Stable
|
Development Status :: 5 - Production/Stable
|
||||||
|
Reference in New Issue
Block a user