mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 17:20:19 +00:00
Update the tools requirements
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
74aced4867
commit
185a352d00
22 changed files with 403 additions and 244 deletions
56
.github/workflows/ci.yml
vendored
56
.github/workflows/ci.yml
vendored
|
@ -134,6 +134,18 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Cached Python Tools Virtualenvs
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ env.CACHE_SEED }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
|
@ -269,29 +281,29 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Cache Python Tools Docs Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/docs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}
|
||||
|
||||
- name: Cache Python Tools Changelog Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/changelog
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}
|
||||
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
|
@ -412,8 +424,16 @@ jobs:
|
|||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
|
@ -422,12 +442,6 @@ jobs:
|
|||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Cache Python Tools Build Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/build
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
|
||||
|
||||
- name: Build Source Tarball
|
||||
uses: ./.github/actions/build-source-tarball
|
||||
with:
|
||||
|
|
56
.github/workflows/nightly.yml
vendored
56
.github/workflows/nightly.yml
vendored
|
@ -178,6 +178,18 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Cached Python Tools Virtualenvs
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ env.CACHE_SEED }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
|
@ -313,29 +325,29 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Cache Python Tools Docs Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/docs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}
|
||||
|
||||
- name: Cache Python Tools Changelog Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/changelog
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}
|
||||
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
|
@ -461,8 +473,16 @@ jobs:
|
|||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
|
@ -471,12 +491,6 @@ jobs:
|
|||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Cache Python Tools Build Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/build
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
|
||||
|
||||
- name: Build Source Tarball
|
||||
uses: ./.github/actions/build-source-tarball
|
||||
with:
|
||||
|
|
56
.github/workflows/scheduled.yml
vendored
56
.github/workflows/scheduled.yml
vendored
|
@ -168,6 +168,18 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Cached Python Tools Virtualenvs
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ env.CACHE_SEED }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
|
@ -303,29 +315,29 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Cache Python Tools Docs Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/docs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}
|
||||
|
||||
- name: Cache Python Tools Changelog Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/changelog
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}
|
||||
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
|
@ -446,8 +458,16 @@ jobs:
|
|||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
|
@ -456,12 +476,6 @@ jobs:
|
|||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Cache Python Tools Build Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/build
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
|
||||
|
||||
- name: Build Source Tarball
|
||||
uses: ./.github/actions/build-source-tarball
|
||||
with:
|
||||
|
|
51
.github/workflows/staging.yml
vendored
51
.github/workflows/staging.yml
vendored
|
@ -164,6 +164,18 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Cached Python Tools Virtualenvs
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ env.CACHE_SEED }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
|
@ -318,23 +330,18 @@ jobs:
|
|||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Cache Python Tools Docs Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/docs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}
|
||||
|
||||
- name: Cache Python Tools Changelog Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/changelog
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}
|
||||
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
|
@ -456,8 +463,16 @@ jobs:
|
|||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
|
@ -466,12 +481,6 @@ jobs:
|
|||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Cache Python Tools Build Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/build
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
|
||||
|
||||
- name: Build Source Tarball
|
||||
uses: ./.github/actions/build-source-tarball
|
||||
with:
|
||||
|
|
48
.github/workflows/templates/ci.yml.jinja
vendored
48
.github/workflows/templates/ci.yml.jinja
vendored
|
@ -59,29 +59,33 @@
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
<%- if not prepare_actual_release %>
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
<%- endif %>
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|changelog
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Cache Python Tools Docs Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/docs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}
|
||||
|
||||
- name: Cache Python Tools Changelog Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/changelog
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}
|
||||
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
|
@ -228,8 +232,16 @@
|
|||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Python Tools Virtualenvs Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
restore-keys: |
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}|build
|
||||
${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
id: python-tools-scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
|
@ -238,12 +250,6 @@
|
|||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Cache Python Tools Build Virtualenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/build
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
|
||||
|
||||
- name: Build Source Tarball
|
||||
uses: ./.github/actions/build-source-tarball
|
||||
with:
|
||||
|
|
12
.github/workflows/templates/layout.yml.jinja
vendored
12
.github/workflows/templates/layout.yml.jinja
vendored
|
@ -182,6 +182,18 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Get Python Version
|
||||
id: get-python-version
|
||||
uses: ./.github/actions/get-python-version
|
||||
with:
|
||||
python-binary: python3
|
||||
|
||||
- name: Restore Cached Python Tools Virtualenvs
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs
|
||||
key: ${{ env.CACHE_SEED }}|${{ github.workflow }}|tools-venvs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -145,3 +145,5 @@ nox.*.tar.xz
|
|||
/pkg/debian/salt-ssh
|
||||
/pkg/debian/salt-syndic
|
||||
/pkg/debian/debhelper-build-stamp
|
||||
|
||||
.tools-venvs
|
||||
|
|
|
@ -46,7 +46,7 @@ repos:
|
|||
)$
|
||||
|
||||
- repo: https://github.com/s0undt3ch/python-tools-scripts
|
||||
rev: "0.15.0"
|
||||
rev: "0.18.3"
|
||||
hooks:
|
||||
- id: tools
|
||||
alias: check-changelog-entries
|
||||
|
@ -1078,16 +1078,24 @@ repos:
|
|||
- requirements/static/ci/tools.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-tools-3.11-requirements
|
||||
name: Linux CI Py3.11 Tools Requirements
|
||||
files: ^requirements/static/ci/(tools\.in|py3.11/(tools|linux)\.txt)$
|
||||
alias: compile-ci-tools-virustotal-3.9-requirements
|
||||
name: Linux CI Py3.9 Tools virustotal Requirements
|
||||
files: ^requirements/static/ci/(tools(-virustotal)?\.in|py3.9/(tools(-virustotal)?|linux)\.txt)$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --build-isolation
|
||||
- --py-version=3.11
|
||||
- --no-emit-index-url
|
||||
- requirements/static/ci/tools.in
|
||||
- --py-version=3.9
|
||||
- requirements/static/ci/tools-virustotal.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-tools-virustotal-3.10-requirements
|
||||
name: Linux CI Py3.10 Tools virustotal Requirements
|
||||
files: ^requirements/static/ci/(tools(-virustotal)?\.in|py3.10/(tools(-virustotal)?|linux)\.txt)$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.10
|
||||
- requirements/static/ci/tools-virustotal.in
|
||||
# <---- Tools -----------------------------------------------------------------------------------------------------
|
||||
|
||||
# ----- Code Formatting ------------------------------------------------------------------------------------------->
|
||||
|
@ -1319,6 +1327,7 @@ repos:
|
|||
- types-attrs
|
||||
- types-pyyaml
|
||||
- types-requests
|
||||
- python-tools-scripts>=0.18.3
|
||||
|
||||
- repo: https://github.com/saltstack/mirrors-nox
|
||||
rev: v2021.6.12
|
||||
|
|
28
requirements/static/ci/py3.10/tools-virustotal.txt
Normal file
28
requirements/static/ci/py3.10/tools-virustotal.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.10/tools-virustotal.txt requirements/static/ci/tools-virustotal.in
|
||||
#
|
||||
certifi==2023.7.22
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
charset-normalizer==3.2.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
idna==3.2
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
requests==2.31.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# virustotal3
|
||||
urllib3==1.26.18
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
virustotal3==1.0.8
|
||||
# via -r requirements/static/ci/tools-virustotal.in
|
|
@ -4,57 +4,77 @@
|
|||
#
|
||||
# pip-compile --no-emit-index-url --output-file=requirements/static/ci/py3.10/tools.txt requirements/static/ci/tools.in
|
||||
#
|
||||
attrs==22.1.0
|
||||
attrs==20.3.0
|
||||
# via
|
||||
# -r requirements/static/ci/tools.in
|
||||
# python-tools-scripts
|
||||
boto3==1.21.46
|
||||
boto3==1.26.147
|
||||
# via -r requirements/static/ci/tools.in
|
||||
botocore==1.24.46
|
||||
botocore==1.29.147
|
||||
# via
|
||||
# boto3
|
||||
# s3transfer
|
||||
certifi==2023.07.22
|
||||
# via requests
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
commonmark==0.9.1
|
||||
# via rich
|
||||
certifi==2023.7.22
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
charset-normalizer==3.2.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
idna==3.2
|
||||
# via requests
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# requests
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/static/ci/tools.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# -r requirements/static/ci/tools.in
|
||||
jmespath==1.0.1
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# boto3
|
||||
# botocore
|
||||
markdown-it-py==2.2.0
|
||||
# via rich
|
||||
markupsafe==2.1.2
|
||||
# via jinja2
|
||||
packaging==23.0
|
||||
# via -r requirements/static/ci/tools.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# jinja2
|
||||
mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
packaging==22.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# -r requirements/static/ci/tools.in
|
||||
pygments==2.13.0
|
||||
# via rich
|
||||
python-dateutil==2.8.2
|
||||
# via botocore
|
||||
python-tools-scripts==0.18.1
|
||||
python-dateutil==2.8.1
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# botocore
|
||||
python-tools-scripts==0.18.3
|
||||
# via -r requirements/static/ci/tools.in
|
||||
pyyaml==6.0.1
|
||||
# via -r requirements/static/ci/tools.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# -r requirements/static/ci/tools.in
|
||||
requests==2.31.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# python-tools-scripts
|
||||
# virustotal3
|
||||
rich==12.5.1
|
||||
rich==13.3.5
|
||||
# via python-tools-scripts
|
||||
s3transfer==0.5.2
|
||||
s3transfer==0.6.1
|
||||
# via boto3
|
||||
six==1.16.0
|
||||
# via python-dateutil
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# python-dateutil
|
||||
typing-extensions==4.2.0
|
||||
# via python-tools-scripts
|
||||
urllib3==1.26.18
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/linux.txt
|
||||
# botocore
|
||||
# requests
|
||||
virustotal3==1.0.8
|
||||
# via -r requirements/static/ci/tools.in
|
||||
|
|
28
requirements/static/ci/py3.9/tools-virustotal.txt
Normal file
28
requirements/static/ci/py3.9/tools-virustotal.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.9/tools-virustotal.txt requirements/static/ci/tools-virustotal.in
|
||||
#
|
||||
certifi==2023.7.22
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
charset-normalizer==3.2.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
idna==3.2
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
requests==2.31.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# virustotal3
|
||||
urllib3==1.26.18
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
virustotal3==1.0.8
|
||||
# via -r requirements/static/ci/tools-virustotal.in
|
|
@ -4,57 +4,77 @@
|
|||
#
|
||||
# pip-compile --no-emit-index-url --output-file=requirements/static/ci/py3.9/tools.txt requirements/static/ci/tools.in
|
||||
#
|
||||
attrs==22.1.0
|
||||
attrs==20.3.0
|
||||
# via
|
||||
# -r requirements/static/ci/tools.in
|
||||
# python-tools-scripts
|
||||
boto3==1.21.46
|
||||
boto3==1.26.147
|
||||
# via -r requirements/static/ci/tools.in
|
||||
botocore==1.24.46
|
||||
botocore==1.29.147
|
||||
# via
|
||||
# boto3
|
||||
# s3transfer
|
||||
certifi==2023.07.22
|
||||
# via requests
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
commonmark==0.9.1
|
||||
# via rich
|
||||
certifi==2023.7.22
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
charset-normalizer==3.2.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
idna==3.2
|
||||
# via requests
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# requests
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/static/ci/tools.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# -r requirements/static/ci/tools.in
|
||||
jmespath==1.0.1
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# boto3
|
||||
# botocore
|
||||
markdown-it-py==2.2.0
|
||||
# via rich
|
||||
markupsafe==2.1.2
|
||||
# via jinja2
|
||||
packaging==23.0
|
||||
# via -r requirements/static/ci/tools.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# jinja2
|
||||
mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
packaging==22.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# -r requirements/static/ci/tools.in
|
||||
pygments==2.13.0
|
||||
# via rich
|
||||
python-dateutil==2.8.2
|
||||
# via botocore
|
||||
python-tools-scripts==0.18.1
|
||||
python-dateutil==2.8.1
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# botocore
|
||||
python-tools-scripts==0.18.3
|
||||
# via -r requirements/static/ci/tools.in
|
||||
pyyaml==6.0.1
|
||||
# via -r requirements/static/ci/tools.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# -r requirements/static/ci/tools.in
|
||||
requests==2.31.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# python-tools-scripts
|
||||
# virustotal3
|
||||
rich==12.5.1
|
||||
rich==13.3.5
|
||||
# via python-tools-scripts
|
||||
s3transfer==0.5.2
|
||||
s3transfer==0.6.1
|
||||
# via boto3
|
||||
six==1.16.0
|
||||
# via python-dateutil
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# python-dateutil
|
||||
typing-extensions==4.2.0
|
||||
# via python-tools-scripts
|
||||
urllib3==1.26.18
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/linux.txt
|
||||
# botocore
|
||||
# requests
|
||||
virustotal3==1.0.8
|
||||
# via -r requirements/static/ci/tools.in
|
||||
|
|
3
requirements/static/ci/tools-virustotal.in
Normal file
3
requirements/static/ci/tools-virustotal.in
Normal file
|
@ -0,0 +1,3 @@
|
|||
--constraint=../pkg/py{py_version}/{platform}.txt
|
||||
|
||||
virustotal3
|
|
@ -1,7 +1,8 @@
|
|||
python-tools-scripts >= 0.18.1
|
||||
--constraint=../pkg/py{py_version}/{platform}.txt
|
||||
|
||||
attrs
|
||||
python-tools-scripts >= 0.18.3
|
||||
boto3
|
||||
pyyaml
|
||||
jinja2
|
||||
packaging
|
||||
virustotal3
|
||||
|
|
|
@ -1,7 +1,36 @@
|
|||
import logging
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import ptscripts
|
||||
from ptscripts.parser import DefaultRequirementsConfig
|
||||
from ptscripts.virtualenv import VirtualEnvConfig
|
||||
|
||||
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent
|
||||
REQUIREMENTS_FILES_PATH = REPO_ROOT / "requirements"
|
||||
STATIC_REQUIREMENTS_PATH = REQUIREMENTS_FILES_PATH / "static"
|
||||
CI_REQUIREMENTS_FILES_PATH = (
|
||||
STATIC_REQUIREMENTS_PATH / "ci" / "py{}.{}".format(*sys.version_info)
|
||||
)
|
||||
PKG_REQUIREMENTS_FILES_PATH = (
|
||||
STATIC_REQUIREMENTS_PATH / "pkg" / "py{}.{}".format(*sys.version_info)
|
||||
)
|
||||
DEFAULT_REQS_CONFIG = DefaultRequirementsConfig(
|
||||
pip_args=[
|
||||
f"--constraint={PKG_REQUIREMENTS_FILES_PATH / 'linux.txt'}",
|
||||
],
|
||||
requirements_files=[
|
||||
REQUIREMENTS_FILES_PATH / "base.txt",
|
||||
CI_REQUIREMENTS_FILES_PATH / "tools.txt",
|
||||
],
|
||||
)
|
||||
RELEASE_VENV_CONFIG = VirtualEnvConfig(
|
||||
requirements_files=[
|
||||
CI_REQUIREMENTS_FILES_PATH / "tools-virustotal.txt",
|
||||
],
|
||||
add_as_extra_site_packages=True,
|
||||
)
|
||||
ptscripts.set_default_requirements_config(DEFAULT_REQS_CONFIG)
|
||||
ptscripts.register_tools_module("tools.changelog")
|
||||
ptscripts.register_tools_module("tools.ci")
|
||||
ptscripts.register_tools_module("tools.docs")
|
||||
|
@ -13,9 +42,9 @@ ptscripts.register_tools_module("tools.pkg.repo.publish")
|
|||
ptscripts.register_tools_module("tools.precommit")
|
||||
ptscripts.register_tools_module("tools.precommit.changelog")
|
||||
ptscripts.register_tools_module("tools.precommit.workflows")
|
||||
ptscripts.register_tools_module("tools.release")
|
||||
ptscripts.register_tools_module("tools.testsuite")
|
||||
ptscripts.register_tools_module("tools.testsuite.download")
|
||||
ptscripts.register_tools_module("tools.release", venv_config=RELEASE_VENV_CONFIG)
|
||||
ptscripts.register_tools_module("tools.vm")
|
||||
|
||||
for name in ("boto3", "botocore", "urllib3"):
|
||||
|
|
|
@ -154,7 +154,7 @@ def set_salt_version(
|
|||
ret = venv.run_code(code, capture=True, check=False)
|
||||
if ret.returncode:
|
||||
ctx.error(ret.stderr.decode())
|
||||
ctx.exit(ctx.returncode)
|
||||
ctx.exit(ret.returncode)
|
||||
salt_version = ret.stdout.strip().decode()
|
||||
|
||||
if not tools.utils.REPO_ROOT.joinpath("salt").is_dir():
|
||||
|
|
|
@ -8,27 +8,16 @@ import logging
|
|||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
from ptscripts import Context, command_group
|
||||
|
||||
import tools.pkg
|
||||
import tools.utils
|
||||
from tools.utils import Version, get_salt_releases
|
||||
|
||||
try:
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
except ImportError:
|
||||
print(
|
||||
"\nPlease run 'python -m pip install -r "
|
||||
"requirements/static/ci/py{}.{}/tools.txt'\n".format(*sys.version_info),
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
raise
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Define the command group
|
||||
|
|
|
@ -10,11 +10,11 @@ import logging
|
|||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import sys
|
||||
import textwrap
|
||||
from datetime import datetime
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import boto3
|
||||
from ptscripts import Context, command_group
|
||||
|
||||
import tools.pkg
|
||||
|
@ -26,17 +26,6 @@ from tools.utils.repo import (
|
|||
get_repo_json_file_contents,
|
||||
)
|
||||
|
||||
try:
|
||||
import boto3
|
||||
except ImportError:
|
||||
print(
|
||||
"\nPlease run 'python -m pip install -r "
|
||||
"requirements/static/ci/py{}.{}/tools.txt'\n".format(*sys.version_info),
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
raise
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
create = command_group(
|
||||
|
@ -157,7 +146,7 @@ def debian(
|
|||
distro_details = _deb_distro_info[distro][distro_version]
|
||||
|
||||
ctx.info("Distribution Details:")
|
||||
ctx.info(distro_details)
|
||||
ctx.print(distro_details, soft_wrap=True)
|
||||
if TYPE_CHECKING:
|
||||
assert isinstance(distro_details["label"], str)
|
||||
assert isinstance(distro_details["codename"], str)
|
||||
|
|
|
@ -10,12 +10,13 @@ import logging
|
|||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
import tempfile
|
||||
import textwrap
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
import boto3
|
||||
import packaging.version
|
||||
from botocore.exceptions import ClientError
|
||||
from ptscripts import Context, command_group
|
||||
|
||||
import tools.pkg
|
||||
|
@ -24,18 +25,6 @@ import tools.utils.repo
|
|||
from tools.utils import Version, get_salt_releases, parse_versions
|
||||
from tools.utils.repo import create_full_repo_path, get_repo_json_file_contents
|
||||
|
||||
try:
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
except ImportError:
|
||||
print(
|
||||
"\nPlease run 'python -m pip install -r "
|
||||
"requirements/static/ci/py{}.{}/tools.txt'\n".format(*sys.version_info),
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
raise
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
publish = command_group(
|
||||
|
|
|
@ -8,28 +8,17 @@ import json
|
|||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
import boto3
|
||||
import virustotal3.core
|
||||
from botocore.exceptions import ClientError
|
||||
from ptscripts import Context, command_group
|
||||
|
||||
import tools.utils
|
||||
import tools.utils.repo
|
||||
|
||||
try:
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
except ImportError:
|
||||
print(
|
||||
"\nPlease run 'python -m pip install -r "
|
||||
"requirements/static/ci/py{}.{}/tools.txt'\n".format(*sys.version_info),
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
raise
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Define the command group
|
||||
|
|
|
@ -14,7 +14,9 @@ from datetime import datetime
|
|||
from enum import IntEnum
|
||||
from typing import Any
|
||||
|
||||
import boto3
|
||||
import packaging.version
|
||||
from botocore.exceptions import ClientError
|
||||
from ptscripts import Context
|
||||
from rich.progress import (
|
||||
BarColumn,
|
||||
|
@ -217,7 +219,7 @@ def download_file(
|
|||
ctx: Context,
|
||||
url: str,
|
||||
dest: pathlib.Path,
|
||||
auth: str | None = None,
|
||||
auth: tuple[str, str] | None = None,
|
||||
headers: dict[str, str] | None = None,
|
||||
) -> pathlib.Path:
|
||||
ctx.info(f"Downloading {dest.name!r} @ {url} ...")
|
||||
|
@ -235,7 +237,7 @@ def download_file(
|
|||
return dest
|
||||
wget = shutil.which("wget")
|
||||
if wget is not None:
|
||||
with ctx.cwd(dest.parent):
|
||||
with ctx.chdir(dest.parent):
|
||||
command = [wget, "--no-verbose"]
|
||||
if headers:
|
||||
for key, value in headers.items():
|
||||
|
@ -248,7 +250,8 @@ def download_file(
|
|||
return dest
|
||||
# NOTE the stream=True parameter below
|
||||
with ctx.web as web:
|
||||
web.headers.update(headers)
|
||||
if headers:
|
||||
web.headers.update(headers)
|
||||
with web.get(url, stream=True, auth=auth) as r:
|
||||
r.raise_for_status()
|
||||
with dest.open("wb") as f:
|
||||
|
|
35
tools/vm.py
35
tools/vm.py
|
@ -21,33 +21,22 @@ from datetime import datetime
|
|||
from functools import lru_cache
|
||||
from typing import TYPE_CHECKING, cast
|
||||
|
||||
import attr
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
from ptscripts import Context, command_group
|
||||
from requests.exceptions import ConnectTimeout
|
||||
from rich.progress import (
|
||||
BarColumn,
|
||||
Column,
|
||||
Progress,
|
||||
TaskProgressColumn,
|
||||
TextColumn,
|
||||
TimeRemainingColumn,
|
||||
)
|
||||
|
||||
import tools.utils
|
||||
|
||||
try:
|
||||
import attr
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
from rich.progress import (
|
||||
BarColumn,
|
||||
Column,
|
||||
Progress,
|
||||
TaskProgressColumn,
|
||||
TextColumn,
|
||||
TimeRemainingColumn,
|
||||
)
|
||||
except ImportError:
|
||||
print(
|
||||
"\nPlease run 'python -m pip install -r "
|
||||
"requirements/static/ci/py{}.{}/tools.txt'\n".format(*sys.version_info),
|
||||
file=sys.stderr,
|
||||
flush=True,
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=no-name-in-module
|
||||
from boto3.resources.factory.ec2 import Instance
|
||||
|
@ -1313,6 +1302,8 @@ class VM:
|
|||
"--exclude",
|
||||
".nox/",
|
||||
"--exclude",
|
||||
".tools-venvs/",
|
||||
"--exclude",
|
||||
".pytest_cache/",
|
||||
"--exclude",
|
||||
f"{STATE_DIR.relative_to(tools.utils.REPO_ROOT)}{os.path.sep}",
|
||||
|
|
Loading…
Add table
Reference in a new issue