To release a new version, you need to be a member of gcp-variant-transforms
,
and gcp-variant-transforms-test
projects and have write access to the GitHub
repo.
The process is as follows:
-
Navigate to Container Builder build history and verifly that the latest integraion tests have passed.
-
Choose the appropriate version number by following the semantics in https://semver.org/. See the Summary section for a quick overview.
-
Update the version number in setup.py by submitting a change. Please note the commit SHA generated by GitHub (it's a long string like
4ff1fdfb3957a115a80fe9343306952cd98b6e5c
). You may run the following command to make the next steps easier:export COMMIT_SHA=<commit sha>
. -
Wait until the Cloud Build process builds a new image that contains the change submitted in the previous step. The image has the form
gcr.io/gcp-variant-transforms-test/gcp-variant-transforms:${COMMIT_SHA}
. -
The tests in the previous step only cover presubmit tests. We require the release image to pass all tests including
huge_tests
. Run the following on your workstation in a clean branch synced to the version change commit and replace${COMMIT_SHA}
with the appropriate value from the previous step.# To create a clean branch. Skip if you already have one. temp_dir="$(mktemp -d)" cd "${temp_dir}" git clone https://github.com/googlegenomics/gcp-variant-transforms.git cd gcp-variant-transforms git checkout "${COMMIT_SHA}" # Run tests. ./deploy_and_run_tests.sh --image_tag ${COMMIT_SHA} \ --keep_image --skip_build --run_all_tests \ --project gcp-variant-transforms-test
-
Wait until the test is done. It will take about 2 hours. Ensure that there are no failures. In case of failures, rollback the version change in
setup.py
and continue from Step #1 once the errors are fixed. -
To update the docker image, copy the verified image to the main project by running the following on your workstation. Note that you require docker to be installed.
gcloud auth configure-docker SOURCE_IMAGE=gcr.io/gcp-variant-transforms-test/gcp-variant-transforms:"${COMMIT_SHA}" TARGET_IMAGE=gcr.io/gcp-variant-transforms/gcp-variant-transforms:"${COMMIT_SHA}" docker pull "${SOURCE_IMAGE}" docker tag "${SOURCE_IMAGE}" "${TARGET_IMAGE}" docker push "${TARGET_IMAGE}"
-
Once the new image is published, navigate to the Container registry page and update the published image to have the labels
latest
andX.X.X
for the version number. You may optionally run a "sanity" test on the newly released image by running:temp_dir="$(mktemp -d)" virtualenv "${temp_dir}" source ${temp_dir}/bin/activate pip install --upgrade .[int_test] python gcp_variant_transforms/testing/integration/run_tests.py \ --project gcp-variant-transforms-test \ --staging_location "gs://integration_test_runs/staging" \ --temp_location "gs://integration_test_runs/temp" \ --logging_location "gs://integration_test_runs/temp/logs" \ --image gcr.io/gcp-variant-transforms/gcp-variant-transforms
-
Navigate to the releases tab and click on Draft a new release.
- Set the Tag version to
vX.X.X
whereX.X.X
is the release version specified previously. - Set the Target to the commit that changed the version number.
- Set the Release title to "Release vX.X.X".
- Enter a description of the main features and/or bug fixes going into the release.
- Click on Publish release.
- Set the Tag version to
-
Congratulations! The release process is now complete!