Skip to content

Latest commit

 

History

History
87 lines (80 loc) · 4.12 KB

release.md

File metadata and controls

87 lines (80 loc) · 4.12 KB

Release process

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:

  1. Navigate to Container Builder build history and verifly that the latest integraion tests have passed.

  2. Choose the appropriate version number by following the semantics in https://semver.org/. See the Summary section for a quick overview.

  3. 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>.

  4. 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}.

  5. 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
  6. 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.

  7. 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}"
  8. Once the new image is published, navigate to the Container registry page and update the published image to have the labels latest and X.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
  9. Navigate to the releases tab and click on Draft a new release.

    1. Set the Tag version to vX.X.X where X.X.X is the release version specified previously.
    2. Set the Target to the commit that changed the version number.
    3. Set the Release title to "Release vX.X.X".
    4. Enter a description of the main features and/or bug fixes going into the release.
    5. Click on Publish release.
  10. Congratulations! The release process is now complete!