-
-
Notifications
You must be signed in to change notification settings - Fork 79
Deploy
Here you will find how to deploy a new production version of ScanAPI.
Requirements:
- Docker
- Access to camilamaia/scanapi repo on Docker Hub
- Access to ScanAPI Twitter Account. Credentials are available at our 1Password
Steps:
- Release PR
- Deploy on GitHub
- Push Docker Images
Check the last release number at https://pypi.org/project/scanapi/#history
Increment the version number in the pyproject.toml
according to the version you have just got: https://github.com/scanapi/scanapi/blob/master/pyproject.toml#L3
Also, increment the version number in the Dockerfile
according to the version you have just got: https://github.com/scanapi/scanapi/blob/master/Dockerfile#L9
Add a new version title with the new version number and the current date, like this
And add the version links, like this
Create a PR named Release <version>
containing these two changes above.
Once the PR has been accepted and passed on all checks, merge it.
Deploy on GitHub is done when a new release is created.
- The
tag version
should bev<version>
, like for examplev0.0.18
. - The
release title
should be the same as tag version,(e.gv0.0.18
). - The
release description
should be the content copied from the CHANGELOG.md file from the corresponding version section.
Real examples are available at: https://github.com/scanapi/scanapi/releases.
When the Deploy on GitHub is done, the new version will be also automatically deployed on PyPI. Download the new ScanAPI version from PyPI and test if everything is working as expected.
On the ScanAPI repository, in the main branch, run the following commands from your terminal:
docker build -f Dockerfile -t camilamaia/scanapi:<version_number> -t camilamaia/scanapi:latest . --no-cache
docker tag camilamaia/scanapi:<version_number> camilamaia/scanapi:<version_number>
docker tag camilamaia/scanapi:latest camilamaia/scanapi:latest
docker push camilamaia/scanapi:<version_number>
docker push camilamaia/scanapi:latest
Example:
docker build -f Dockerfile -t camilamaia/scanapi:2.5.0 -t camilamaia/scanapi:latest . --no-cache
docker tag camilamaia/scanapi:2.5.0 camilamaia/scanapi:2.5.0
docker tag camilamaia/scanapi:latest camilamaia/scanapi:latest
docker push camilamaia/scanapi:2.5.0
docker push camilamaia/scanapi:latest
This will push the new images to Docker Hub.