diff --git a/.circleci/config.yml b/.circleci/config.yml index 091e8e2187..b511c275bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,20 @@ executors: image: windows-server-2019-vs2019:stable shell: bash.exe +commands: + designate_upload_channel: + description: "inserts the correct upload channel into ${BASH_ENV}" + steps: + - run: + name: adding UPLOAD_CHANNEL to BASH_ENV + command: | + our_upload_channel=nightly + # On tags upload to test instead + if [[ -n "${CIRCLE_TAG}" ]]; then + our_upload_channel=test + fi + echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} + binary_common: &binary_common parameters: # Edit these defaults to do a release @@ -176,6 +190,7 @@ jobs: steps: - attach_workspace: at: ~/workspace + - designate_upload_channel - run: command: | # Prevent credential from leaking @@ -191,6 +206,7 @@ jobs: - attach_workspace: at: ~/workspace - checkout + - designate_upload_channel - run: command: | pip install --user awscli @@ -530,6 +546,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.6 python_version: '3.6' - binary_wheel_upload: @@ -537,6 +555,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.6_upload requires: - nightly_binary_linux_wheel_py3.6 @@ -544,6 +564,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.6_smoke_test_pip python_version: '3.6' requires: @@ -552,6 +574,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.7 python_version: '3.7' - binary_wheel_upload: @@ -559,6 +583,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.7_upload requires: - nightly_binary_linux_wheel_py3.7 @@ -566,6 +592,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.7_smoke_test_pip python_version: '3.7' requires: @@ -574,6 +602,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.8 python_version: '3.8' - binary_wheel_upload: @@ -581,6 +611,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.8_upload requires: - nightly_binary_linux_wheel_py3.8 @@ -588,6 +620,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_wheel_py3.8_smoke_test_pip python_version: '3.8' requires: @@ -596,6 +630,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_wheel_py3.6 python_version: '3.6' - binary_wheel_upload: @@ -603,6 +639,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_wheel_py3.6_upload requires: - nightly_binary_macos_wheel_py3.6 @@ -610,6 +648,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_wheel_py3.7 python_version: '3.7' - binary_wheel_upload: @@ -617,6 +657,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_wheel_py3.7_upload requires: - nightly_binary_macos_wheel_py3.7 @@ -624,6 +666,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_wheel_py3.8 python_version: '3.8' - binary_wheel_upload: @@ -631,6 +675,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_wheel_py3.8_upload requires: - nightly_binary_macos_wheel_py3.8 @@ -638,6 +684,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.6 python_version: '3.6' - binary_wheel_upload: @@ -645,6 +693,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.6_upload requires: - nightly_binary_windows_wheel_py3.6 @@ -652,6 +702,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.6_smoke_test_pip python_version: '3.6' requires: @@ -660,6 +712,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.7 python_version: '3.7' - binary_wheel_upload: @@ -667,6 +721,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.7_upload requires: - nightly_binary_windows_wheel_py3.7 @@ -674,6 +730,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.7_smoke_test_pip python_version: '3.7' requires: @@ -682,6 +740,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.8 python_version: '3.8' - binary_wheel_upload: @@ -689,6 +749,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.8_upload requires: - nightly_binary_windows_wheel_py3.8 @@ -696,6 +758,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_wheel_py3.8_smoke_test_pip python_version: '3.8' requires: @@ -704,6 +768,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.6 python_version: '3.6' - binary_conda_upload: @@ -711,6 +777,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.6_upload requires: - nightly_binary_linux_conda_py3.6 @@ -718,6 +786,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.6_smoke_test_conda python_version: '3.6' requires: @@ -726,6 +796,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.7 python_version: '3.7' - binary_conda_upload: @@ -733,6 +805,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.7_upload requires: - nightly_binary_linux_conda_py3.7 @@ -740,6 +814,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.7_smoke_test_conda python_version: '3.7' requires: @@ -748,6 +824,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.8 python_version: '3.8' - binary_conda_upload: @@ -755,6 +833,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.8_upload requires: - nightly_binary_linux_conda_py3.8 @@ -762,6 +842,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_linux_conda_py3.8_smoke_test_conda python_version: '3.8' requires: @@ -770,6 +852,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_conda_py3.6 python_version: '3.6' - binary_conda_upload: @@ -777,6 +861,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_conda_py3.6_upload requires: - nightly_binary_macos_conda_py3.6 @@ -784,6 +870,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_conda_py3.7 python_version: '3.7' - binary_conda_upload: @@ -791,6 +879,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_conda_py3.7_upload requires: - nightly_binary_macos_conda_py3.7 @@ -798,6 +888,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_conda_py3.8 python_version: '3.8' - binary_conda_upload: @@ -805,6 +897,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_macos_conda_py3.8_upload requires: - nightly_binary_macos_conda_py3.8 @@ -812,6 +906,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.6 python_version: '3.6' - binary_conda_upload: @@ -819,6 +915,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.6_upload requires: - nightly_binary_windows_conda_py3.6 @@ -826,6 +924,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.6_smoke_test_conda python_version: '3.6' requires: @@ -834,6 +934,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.7 python_version: '3.7' - binary_conda_upload: @@ -841,6 +943,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.7_upload requires: - nightly_binary_windows_conda_py3.7 @@ -848,6 +952,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.7_smoke_test_conda python_version: '3.7' requires: @@ -856,6 +962,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.8 python_version: '3.8' - binary_conda_upload: @@ -863,6 +971,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.8_upload requires: - nightly_binary_windows_conda_py3.8 @@ -870,6 +980,8 @@ workflows: filters: branches: only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: nightly_binary_windows_conda_py3.8_smoke_test_conda python_version: '3.8' requires: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 5be6211842..547682572c 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -16,6 +16,20 @@ executors: image: windows-server-2019-vs2019:stable shell: bash.exe +commands: + designate_upload_channel: + description: "inserts the correct upload channel into ${BASH_ENV}" + steps: + - run: + name: adding UPLOAD_CHANNEL to BASH_ENV + command: | + our_upload_channel=nightly + # On tags upload to test instead + if [[ -n "${CIRCLE_TAG}" ]]; then + our_upload_channel=test + fi + echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} + binary_common: &binary_common parameters: # Edit these defaults to do a release @@ -176,6 +190,7 @@ jobs: steps: - attach_workspace: at: ~/workspace + - designate_upload_channel - run: command: | # Prevent credential from leaking @@ -191,6 +206,7 @@ jobs: - attach_workspace: at: ~/workspace - checkout + - designate_upload_channel - run: command: | pip install --user awscli diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 93ab431b9a..7ec631bfa3 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -57,7 +57,16 @@ def generate_base_workflow(base_workflow_name, python_version, filter_branch, os def gen_filter_branch_tree(branch_name): - return {"branches": {"only": branch_name}} + return { + "branches": { + "only": branch_name + }, + "tags": { + # Using a raw string here to avoid having to escape + # anything + "only": r"/v[0-9]+(\.[0-9]+)*-rc[0-9]+/" + } + } def generate_upload_workflow(base_workflow_name, filter_branch, btype):