mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch 'master' into hotfix/salt-run-in-spec-file
This commit is contained in:
commit
2fbb30b668
24 changed files with 289 additions and 1161 deletions
41
.github/workflows/nightly.yml
vendored
41
.github/workflows/nightly.yml
vendored
|
@ -4,6 +4,7 @@
|
|||
name: Nightly
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
schedule:
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
|
||||
- cron: '0 3 * * *' # Every day at 3AM
|
||||
|
@ -16,6 +17,7 @@ env:
|
|||
permissions:
|
||||
contents: read # for dorny/paths-filter to fetch a list of changed files
|
||||
pull-requests: read # for dorny/paths-filter to read pull requests
|
||||
actions: write # to trigger branch nightly builds
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.repository }}-${{ github.head_ref || github.run_id }}
|
||||
|
@ -23,9 +25,46 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
|
||||
workflow-requirements:
|
||||
name: Check Workflow Requirements
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
requirements-met: ${{ fromJSON(steps.check-requirements.outputs.requirements-met) }}
|
||||
steps:
|
||||
- name: Check Requirements
|
||||
id: check-requirements
|
||||
run: |
|
||||
if [ "${RUN_SCHEDULED_BUILDS}" = "1" ]; then
|
||||
echo "Running workflow because RUN_SCHEDULED_BUILDS=1"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
elif [ "${{ github.event.repository.fork }}" = "true" ]; then
|
||||
echo "Not running workflow because ${{ github.repository }} is a fork"
|
||||
echo "requirements-met=false" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "Running workflow because ${{ github.repository }} is not a fork"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
trigger-branch-nightly-builds:
|
||||
name: Trigger Branch Schedule Workflows
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
needs:
|
||||
- workflow-requirements
|
||||
steps:
|
||||
- name: Trigger 3006.x branch
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh workflow run nightly.yml --repo ${{ github.repository }} --ref 3006.x
|
||||
|
||||
prepare-workflow:
|
||||
name: Prepare Workflow Run
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.workflow-requirements.outputs.requirements-met }}
|
||||
needs:
|
||||
- workflow-requirements
|
||||
outputs:
|
||||
jobs: ${{ steps.define-jobs.outputs.jobs }}
|
||||
runners: ${{ steps.runner-types.outputs.runners }}
|
||||
|
@ -1732,6 +1771,8 @@ jobs:
|
|||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- workflow-requirements
|
||||
- trigger-branch-nightly-builds
|
||||
- prepare-workflow
|
||||
- pre-commit
|
||||
- lint
|
||||
|
|
24
.github/workflows/scheduled.yml
vendored
24
.github/workflows/scheduled.yml
vendored
|
@ -23,9 +23,32 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
|
||||
workflow-requirements:
|
||||
name: Check Workflow Requirements
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
requirements-met: ${{ fromJSON(steps.check-requirements.outputs.requirements-met) }}
|
||||
steps:
|
||||
- name: Check Requirements
|
||||
id: check-requirements
|
||||
run: |
|
||||
if [ "${RUN_SCHEDULED_BUILDS}" = "1" ]; then
|
||||
echo "Running workflow because RUN_SCHEDULED_BUILDS=1"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
elif [ "${{ github.event.repository.fork }}" = "true" ]; then
|
||||
echo "Not running workflow because ${{ github.repository }} is a fork"
|
||||
echo "requirements-met=false" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "Running workflow because ${{ github.repository }} is not a fork"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
prepare-workflow:
|
||||
name: Prepare Workflow Run
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ needs.workflow-requirements.outputs.requirements-met }}
|
||||
needs:
|
||||
- workflow-requirements
|
||||
outputs:
|
||||
jobs: ${{ steps.define-jobs.outputs.jobs }}
|
||||
runners: ${{ steps.runner-types.outputs.runners }}
|
||||
|
@ -1114,6 +1137,7 @@ jobs:
|
|||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- workflow-requirements
|
||||
- prepare-workflow
|
||||
- pre-commit
|
||||
- lint
|
||||
|
|
4
.github/workflows/templates/layout.yml.jinja
vendored
4
.github/workflows/templates/layout.yml.jinja
vendored
|
@ -1,5 +1,6 @@
|
|||
# Do not edit these workflows directly as the changes made will be overwritten.
|
||||
# Instead, edit the template '<{ template }>'
|
||||
<%- set prepare_workflow_if_check = prepare_workflow_if_check|default(False) %>
|
||||
<%- set prepare_workflow_skip_test_suite = prepare_workflow_skip_test_suite|default("") %>
|
||||
<%- set prepare_workflow_skip_pkg_test_suite = prepare_workflow_skip_pkg_test_suite|default("") %>
|
||||
<%- set prepare_workflow_salt_version_input = prepare_workflow_salt_version_input|default("") %>
|
||||
|
@ -63,6 +64,9 @@ jobs:
|
|||
prepare-workflow:
|
||||
name: Prepare Workflow Run
|
||||
runs-on: ubuntu-latest
|
||||
<%- if prepare_workflow_if_check %>
|
||||
if: <{ prepare_workflow_if_check }>
|
||||
<%- endif %>
|
||||
<%- if prepare_workflow_needs %>
|
||||
needs:
|
||||
<%- for need in prepare_workflow_needs.iter(consume=False) %>
|
||||
|
|
56
.github/workflows/templates/nightly.yml.jinja
vendored
56
.github/workflows/templates/nightly.yml.jinja
vendored
|
@ -1,9 +1,11 @@
|
|||
<%- set gh_environment = gh_environment|default("nightly") %>
|
||||
<%- set prepare_workflow_if_check = prepare_workflow_if_check|default("${{ needs.workflow-requirements.outputs.requirements-met }}") %>
|
||||
<%- extends 'ci.yml.jinja' %>
|
||||
|
||||
<%- block on %>
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
schedule:
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
|
||||
- cron: '0 3 * * *' # Every day at 3AM
|
||||
|
@ -18,6 +20,60 @@ concurrency:
|
|||
|
||||
<%- endblock concurrency %>
|
||||
|
||||
<%- block permissions %>
|
||||
<{- super() }>
|
||||
<%- if workflow_slug == "nightly" %>
|
||||
actions: write # to trigger branch nightly builds
|
||||
<%- endif %>
|
||||
<%- endblock permissions %>
|
||||
|
||||
<%- block pre_jobs %>
|
||||
|
||||
<%- set job_name = "workflow-requirements" %>
|
||||
|
||||
<{ job_name }>:
|
||||
<%- do prepare_workflow_needs.append(job_name) %>
|
||||
name: Check Workflow Requirements
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
requirements-met: ${{ fromJSON(steps.check-requirements.outputs.requirements-met) }}
|
||||
steps:
|
||||
- name: Check Requirements
|
||||
id: check-requirements
|
||||
run: |
|
||||
if [ "${RUN_SCHEDULED_BUILDS}" = "1" ]; then
|
||||
echo "Running workflow because RUN_SCHEDULED_BUILDS=1"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
elif [ "${{ github.event.repository.fork }}" = "true" ]; then
|
||||
echo "Not running workflow because ${{ github.repository }} is a fork"
|
||||
echo "requirements-met=false" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "Running workflow because ${{ github.repository }} is not a fork"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
<%- set job_name = "trigger-branch-nightly-builds" %>
|
||||
<%- set branches = ["3006.x"] %>
|
||||
|
||||
<{ job_name }>:
|
||||
<%- do conclusion_needs.append(job_name) %>
|
||||
name: Trigger Branch Schedule Workflows
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
needs:
|
||||
- workflow-requirements
|
||||
steps:
|
||||
<%- for branch in branches %>
|
||||
- name: Trigger <{ branch }> branch
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh workflow run <{ gh_environment }>.yml --repo ${{ github.repository }} --ref <{ branch }>
|
||||
<%- endfor %>
|
||||
|
||||
<%- endblock pre_jobs %>
|
||||
|
||||
<%- block jobs %>
|
||||
<{- super() }>
|
||||
|
||||
|
|
31
.github/workflows/templates/scheduled.yml.jinja
vendored
31
.github/workflows/templates/scheduled.yml.jinja
vendored
|
@ -1,3 +1,4 @@
|
|||
<%- set prepare_workflow_if_check = "${{ needs.workflow-requirements.outputs.requirements-met }}" %>
|
||||
<%- extends 'ci.yml.jinja' %>
|
||||
|
||||
<%- block on %>
|
||||
|
@ -6,6 +7,7 @@ on:
|
|||
schedule:
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
|
||||
- cron: '0 */8 * * *' # Run every 8 hours
|
||||
|
||||
<%- endblock %>
|
||||
|
||||
<%- block concurrency %>
|
||||
|
@ -13,4 +15,33 @@ on:
|
|||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: false
|
||||
|
||||
<%- endblock %>
|
||||
|
||||
|
||||
<%- block pre_jobs %>
|
||||
|
||||
<%- set job_name = "workflow-requirements" %>
|
||||
|
||||
<{ job_name }>:
|
||||
<%- do prepare_workflow_needs.append(job_name) %>
|
||||
name: Check Workflow Requirements
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
requirements-met: ${{ fromJSON(steps.check-requirements.outputs.requirements-met) }}
|
||||
steps:
|
||||
- name: Check Requirements
|
||||
id: check-requirements
|
||||
run: |
|
||||
if [ "${RUN_SCHEDULED_BUILDS}" = "1" ]; then
|
||||
echo "Running workflow because RUN_SCHEDULED_BUILDS=1"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
elif [ "${{ github.event.repository.fork }}" = "true" ]; then
|
||||
echo "Not running workflow because ${{ github.repository }} is a fork"
|
||||
echo "requirements-met=false" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "Running workflow because ${{ github.repository }} is not a fork"
|
||||
echo "requirements-met=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
<%- endblock pre_jobs %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<%- set prepare_workflow_if_check = False %>
|
||||
<%- set prepare_workflow_salt_version_input = "${{ inputs.salt-version }}" %>
|
||||
<%- set prepare_workflow_skip_test_suite = "${{ inputs.skip-salt-test-suite && ' --skip-tests' || '' }}" %>
|
||||
<%- set prepare_workflow_skip_pkg_test_suite = "${{ inputs.skip-salt-pkg-test-suite && ' --skip-pkg-tests' || '' }}" %>
|
||||
|
|
1
.github/workflows/test-action-macos.yml
vendored
1
.github/workflows/test-action-macos.yml
vendored
|
@ -114,6 +114,7 @@ jobs:
|
|||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/setup-python@v4
|
||||
|
|
18
.github/workflows/test-action.yml
vendored
18
.github/workflows/test-action.yml
vendored
|
@ -103,7 +103,6 @@ jobs:
|
|||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
|
||||
|
||||
# Skip jobs if nox.*.tar.* is already cached
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/download-artifact@v3
|
||||
|
@ -137,11 +136,18 @@ jobs:
|
|||
echo NOX_SESSION=${{ inputs.nox-session }}-tcp >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
id: spin-up-vm
|
||||
run: |
|
||||
tools --timestamps vm create --retries=2 ${{ inputs.distro-slug }}
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
|
@ -241,12 +247,18 @@ jobs:
|
|||
with:
|
||||
name: testrun-changed-files.txt
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
id: spin-up-vm
|
||||
env:
|
||||
TESTS_CHUNK: ${{ matrix.tests-chunk }}
|
||||
run: |
|
||||
tools --timestamps vm create --retries=2 ${{ inputs.distro-slug }}
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
run: |
|
||||
|
|
14
.github/workflows/test-packages-action-macos.yml
vendored
14
.github/workflows/test-packages-action-macos.yml
vendored
|
@ -89,7 +89,6 @@ jobs:
|
|||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.distro-slug }}|${{ matrix.nox-session }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
|
||||
|
||||
# Skip jobs if nox.*.tar.* is already cached
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/download-artifact@v3
|
||||
|
@ -187,6 +186,19 @@ jobs:
|
|||
run: |
|
||||
tree pkg/artifacts
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
|
18
.github/workflows/test-packages-action.yml
vendored
18
.github/workflows/test-packages-action.yml
vendored
|
@ -90,7 +90,6 @@ jobs:
|
|||
path: nox.${{ inputs.distro-slug }}.tar.*
|
||||
key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.distro-slug }}|${{ matrix.nox-session }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
|
||||
|
||||
# Skip jobs if nox.*.tar.* is already cached
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/download-artifact@v3
|
||||
|
@ -110,11 +109,18 @@ jobs:
|
|||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
id: spin-up-vm
|
||||
run: |
|
||||
tools --timestamps vm create --retries=2 ${{ inputs.distro-slug }}
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
|
@ -216,10 +222,16 @@ jobs:
|
|||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
id: spin-up-vm
|
||||
run: |
|
||||
tools --timestamps vm create --retries=2 ${{ inputs.distro-slug }}
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
run: |
|
||||
|
|
|
@ -968,45 +968,6 @@ repos:
|
|||
# <---- Invoke -----------------------------------------------------------------------------------------------------
|
||||
|
||||
# <---- PKG ci requirements-----------------------------------------------------------------------------------------
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-pkg-3.7-requirements
|
||||
name: PKG tests CI Py3.7 Requirements
|
||||
files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((pkgtests|common)\.in|py3\.7/pkgtests\.in)))$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.7
|
||||
- --platform=linux
|
||||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-pkg-3.8-requirements
|
||||
name: PKG tests CI Py3.8 Requirements
|
||||
files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((pkgtests|common)\.in|py3\.8/pkgtests\.in)))$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.8
|
||||
- --platform=linux
|
||||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-pkg-3.9-requirements
|
||||
name: PKG tests CI Py3.9 Requirements
|
||||
files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((pkgtests|common)\.in|py3\.9/pkgtests\.in)))$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.9
|
||||
- --platform=linux
|
||||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-pkg-3.10-requirements
|
||||
name: PKG tests CI Py3.10 Requirements
|
||||
|
@ -1020,45 +981,6 @@ repos:
|
|||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-windows-pkg-3.7-requirements
|
||||
name: PKG tests Windows CI Py3.7 Requirements
|
||||
files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((pkgtests-windows|common)\.in|py3\.7/pkgtests-windows\.in)))$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.7
|
||||
- --platform=windows
|
||||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests-windows.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-windows-pkg-3.8-requirements
|
||||
name: PKG tests Windows CI Py3.8 Requirements
|
||||
files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((pkgtests-windows|common)\.in|py3\.8/pkgtests-windows\.in)))$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.8
|
||||
- --platform=windows
|
||||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests-windows.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-windows-pkg-3.9-requirements
|
||||
name: PKG tests Windows CI Py3.9 Requirements
|
||||
files: ^requirements/((base|zeromq|pytest)\.txt|static/(pkg/linux\.in|ci/((pkgtests-windows|common)\.in|py3\.9/pkgtests-windows\.in)))$
|
||||
pass_filenames: false
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.9
|
||||
- --platform=windows
|
||||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests-windows.in
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-ci-windows-pkg-3.10-requirements
|
||||
name: PKG tests Windows CI Py3.10 Requirements
|
||||
|
@ -1071,6 +993,7 @@ repos:
|
|||
- --include=requirements/base.txt
|
||||
- --include=requirements/zeromq.txt
|
||||
- requirements/static/ci/pkgtests-windows.in
|
||||
|
||||
# <---- PKG ci requirements-----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -1330,6 +1253,7 @@ repos:
|
|||
- rich
|
||||
- types-attrs
|
||||
- types-pyyaml
|
||||
- types-requests
|
||||
|
||||
- repo: https://github.com/saltstack/mirrors-nox
|
||||
rev: v2021.6.12
|
||||
|
|
43
noxfile.py
43
noxfile.py
|
@ -1762,12 +1762,14 @@ def build(session):
|
|||
session.run("python", "-m", "twine", "check", "dist/*")
|
||||
|
||||
|
||||
def _pkg_test(session, cmd_args, test_type):
|
||||
def _pkg_test(session, cmd_args, test_type, onedir=False):
|
||||
pydir = _get_pydir(session)
|
||||
junit_report_filename = f"test-results-{test_type}"
|
||||
runtests_log_filename = f"runtests-{test_type}"
|
||||
# Install requirements
|
||||
if _upgrade_pip_setuptools_and_wheel(session):
|
||||
if onedir and IS_LINUX:
|
||||
session_run_always(session, "python3", "-m", "relenv", "toolchain", "fetch")
|
||||
if _upgrade_pip_setuptools_and_wheel(session, onedir=onedir):
|
||||
if IS_WINDOWS:
|
||||
file_name = "pkgtests-windows.txt"
|
||||
else:
|
||||
|
@ -1780,6 +1782,10 @@ def _pkg_test(session, cmd_args, test_type):
|
|||
install_command = ["--progress-bar=off", "-r", requirements_file]
|
||||
session.install(*install_command, silent=PIP_INSTALL_SILENT)
|
||||
|
||||
env = {}
|
||||
if onedir:
|
||||
env["ONEDIR_TESTRUN"] = "1"
|
||||
|
||||
pytest_args = (
|
||||
cmd_args[:]
|
||||
+ [
|
||||
|
@ -1788,20 +1794,31 @@ def _pkg_test(session, cmd_args, test_type):
|
|||
]
|
||||
+ session.posargs
|
||||
)
|
||||
_pytest(session, False, pytest_args)
|
||||
_pytest(session, False, pytest_args, env=env)
|
||||
|
||||
|
||||
@nox.session(python=_PYTHON_VERSIONS, name="test-pkgs")
|
||||
def test_pkgs(session):
|
||||
"""
|
||||
pytest pkg tests session
|
||||
"""
|
||||
_pkg_test(session, ["pkg/tests/"], "pkg")
|
||||
@nox.session(
|
||||
python=str(ONEDIR_PYTHON_PATH),
|
||||
name="test-pkgs-onedir",
|
||||
venv_params=["--system-site-packages"],
|
||||
)
|
||||
def test_pkgs_onedir(session):
|
||||
if not ONEDIR_ARTIFACT_PATH.exists():
|
||||
session.error(
|
||||
"The salt onedir artifact, expected to be in '{}', was not found".format(
|
||||
ONEDIR_ARTIFACT_PATH.relative_to(REPO_ROOT)
|
||||
)
|
||||
)
|
||||
_pkg_test(session, ["pkg/tests/"], "pkg", onedir=True)
|
||||
|
||||
|
||||
@nox.session(python=_PYTHON_VERSIONS, name="test-upgrade-pkgs")
|
||||
@nox.session(
|
||||
python=str(ONEDIR_PYTHON_PATH),
|
||||
name="test-upgrade-pkgs-onedir",
|
||||
venv_params=["--system-site-packages"],
|
||||
)
|
||||
@nox.parametrize("classic", [False, True])
|
||||
def test_upgrade_pkgs(session, classic):
|
||||
def test_upgrade_pkgs_onedir(session, classic):
|
||||
"""
|
||||
pytest pkg upgrade tests session
|
||||
"""
|
||||
|
@ -1817,9 +1834,9 @@ def test_upgrade_pkgs(session, classic):
|
|||
# They can only run with importlib-metadata<5.0.0.
|
||||
subprocess.run(["pip3", "install", "importlib-metadata==4.13.0"], check=False)
|
||||
try:
|
||||
_pkg_test(session, cmd_args, test_type)
|
||||
_pkg_test(session, cmd_args, test_type, onedir=True)
|
||||
except nox.command.CommandFailed:
|
||||
sys.exit(1)
|
||||
|
||||
cmd_args = ["pkg/tests/", "--no-install"] + session.posargs
|
||||
_pkg_test(session, cmd_args, test_type)
|
||||
_pkg_test(session, cmd_args, test_type, onedir=True)
|
||||
|
|
|
@ -658,14 +658,10 @@ class SaltPkgInstall:
|
|||
f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver}/{gpg_key}",
|
||||
)
|
||||
self._check_retcode(ret)
|
||||
ret = self.proc.run(
|
||||
"curl",
|
||||
"-fsSL",
|
||||
download_file(
|
||||
f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver}.repo",
|
||||
"-o",
|
||||
f"/etc/yum.repos.d/salt-{distro_name}.repo",
|
||||
)
|
||||
self._check_retcode(ret)
|
||||
ret = self.proc.run(self.pkg_mngr, "clean", "expire-cache")
|
||||
self._check_retcode(ret)
|
||||
ret = self.proc.run(
|
||||
|
@ -689,14 +685,10 @@ class SaltPkgInstall:
|
|||
else:
|
||||
arch = "amd64"
|
||||
pathlib.Path("/etc/apt/keyrings").mkdir(parents=True, exist_ok=True)
|
||||
ret = self.proc.run(
|
||||
"curl",
|
||||
"-fsSL",
|
||||
"-o",
|
||||
"/etc/apt/keyrings/salt-archive-keyring.gpg",
|
||||
download_file(
|
||||
f"https://repo.saltproject.io/{root_url}{distro_name}/{self.distro_version}/{arch}/{major_ver}/salt-archive-keyring.gpg",
|
||||
"/etc/apt/keyrings/salt-archive-keyring.gpg",
|
||||
)
|
||||
self._check_retcode(ret)
|
||||
with open(
|
||||
pathlib.Path("/etc", "apt", "sources.list.d", "salt.list"), "w"
|
||||
) as fp:
|
||||
|
@ -767,14 +759,10 @@ class SaltPkgInstall:
|
|||
mac_pkg_url = f"https://repo.saltproject.io/salt/py3/macos/{major_ver}.{minor_ver}-1/{mac_pkg}"
|
||||
mac_pkg_path = f"/tmp/{mac_pkg}"
|
||||
if not os.path.exists(mac_pkg_path):
|
||||
ret = self.proc.run(
|
||||
"curl",
|
||||
"-fsSL",
|
||||
"-o",
|
||||
f"/tmp/{mac_pkg}",
|
||||
download_file(
|
||||
f"{mac_pkg_url}",
|
||||
f"/tmp/{mac_pkg}",
|
||||
)
|
||||
self._check_retcode(ret)
|
||||
|
||||
ret = self.proc.run("installer", "-pkg", mac_pkg_path, "-target", "/")
|
||||
self._check_retcode(ret)
|
||||
|
@ -1704,3 +1692,13 @@ def remove_stale_master_key(master):
|
|||
master.id,
|
||||
key_path,
|
||||
)
|
||||
|
||||
|
||||
def download_file(url, dest):
|
||||
# NOTE the stream=True parameter below
|
||||
with requests.get(url, stream=True) as r:
|
||||
r.raise_for_status()
|
||||
with open(dest, "wb") as f:
|
||||
for chunk in r.iter_content(chunk_size=8192):
|
||||
if chunk:
|
||||
f.write(chunk)
|
||||
|
|
|
@ -153,7 +153,8 @@ if ( $PKG ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $PKG ) {
|
||||
# Make sure ssm.exe is present. This is needed for VMtools
|
||||
if ( ! (Test-Path -Path "$BUILD_DIR\ssm.exe") ) {
|
||||
Write-Host "Copying SSM to Root: " -NoNewline
|
||||
Invoke-WebRequest -Uri "$SALT_DEP_URL/ssm-2.24-103-gdee49fc.exe" -OutFile "$BUILD_DIR\ssm.exe"
|
||||
if ( Test-Path -Path "$BUILD_DIR\ssm.exe" ) {
|
||||
|
|
|
@ -1,184 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.7/pkgtests-windows.txt requirements/base.txt requirements/static/ci/pkgtests-windows.in requirements/zeromq.txt
|
||||
#
|
||||
attrs==22.2.0
|
||||
# via
|
||||
# pytest
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
autocommand==2.2.2
|
||||
# via jaraco.text
|
||||
certifi==2022.12.7
|
||||
# via requests
|
||||
cffi==1.15.1
|
||||
# via clr-loader
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
cheroot==9.0.0
|
||||
# via cherrypy
|
||||
cherrypy==18.8.0
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
clr-loader==0.2.5
|
||||
# via pythonnet
|
||||
colorama==0.4.6
|
||||
# via pytest
|
||||
contextvars==2.4
|
||||
# via -r requirements/base.txt
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
distro==1.8.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-skip-markers
|
||||
exceptiongroup==1.1.0
|
||||
# via pytest
|
||||
filelock==3.9.0
|
||||
# via virtualenv
|
||||
idna==3.4
|
||||
# via requests
|
||||
immutables==0.19
|
||||
# via contextvars
|
||||
importlib-metadata==6.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# pluggy
|
||||
# pytest
|
||||
# virtualenv
|
||||
importlib-resources==5.10.2
|
||||
# via jaraco.text
|
||||
inflect==6.0.2
|
||||
# via jaraco.text
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
jaraco.classes==3.2.3
|
||||
# via jaraco.collections
|
||||
jaraco.collections==3.8.0
|
||||
# via cherrypy
|
||||
jaraco.context==4.3.0
|
||||
# via jaraco.text
|
||||
jaraco.functools==3.5.2
|
||||
# via
|
||||
# cheroot
|
||||
# jaraco.text
|
||||
# tempora
|
||||
jaraco.text==3.11.1
|
||||
# via jaraco.collections
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/base.txt
|
||||
jmespath==1.0.1
|
||||
# via -r requirements/base.txt
|
||||
looseversion==1.0.3
|
||||
# via -r requirements/base.txt
|
||||
markupsafe==2.1.2
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# jinja2
|
||||
more-itertools==9.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# cherrypy
|
||||
# jaraco.classes
|
||||
# jaraco.functools
|
||||
# jaraco.text
|
||||
msgpack==1.0.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
packaging==23.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest
|
||||
platformdirs==2.6.2
|
||||
# via virtualenv
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
portend==3.1.0
|
||||
# via cherrypy
|
||||
psutil==5.9.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pycparser==2.21
|
||||
# via cffi
|
||||
pycryptodomex==3.17
|
||||
# via -r requirements/crypto.txt
|
||||
pydantic==1.10.4
|
||||
# via inflect
|
||||
pytest-helpers-namespace==2021.12.29
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
pytest-salt-factories==1.0.0rc17
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
pytest-shell-utilities==1.7.0
|
||||
# via pytest-salt-factories
|
||||
pytest-skip-markers==1.4.0
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pytest-system-statistics==1.0.2
|
||||
# via pytest-salt-factories
|
||||
pytest-tempdir==2019.10.12
|
||||
# via pytest-salt-factories
|
||||
pytest==7.2.1
|
||||
# via
|
||||
# pytest-helpers-namespace
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
# pytest-tempdir
|
||||
pythonnet==3.0.1 ; python_version >= "3.7"
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
pytz==2022.7.1
|
||||
# via tempora
|
||||
pywin32==305
|
||||
# via
|
||||
# cherrypy
|
||||
# pytest-skip-markers
|
||||
# wmi
|
||||
pyyaml==6.0
|
||||
# via -r requirements/base.txt
|
||||
pyzmq==25.0.0 ; sys_platform == "win32"
|
||||
# via
|
||||
# -r requirements/zeromq.txt
|
||||
# pytest-salt-factories
|
||||
requests==2.28.2
|
||||
# via -r requirements/base.txt
|
||||
six==1.16.0
|
||||
# via cheroot
|
||||
tempora==5.2.1
|
||||
# via portend
|
||||
tomli==2.0.1
|
||||
# via pytest
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# immutables
|
||||
# importlib-metadata
|
||||
# platformdirs
|
||||
# pydantic
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
urllib3==1.26.14
|
||||
# via requests
|
||||
virtualenv==20.18.0
|
||||
# via pytest-salt-factories
|
||||
wmi==1.5.1 ; sys_platform == "win32"
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
zc.lockfile==2.0
|
||||
# via cherrypy
|
||||
zipp==3.12.1
|
||||
# via
|
||||
# importlib-metadata
|
||||
# importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.7/pkgtests.txt requirements/base.txt requirements/static/ci/pkgtests.in requirements/zeromq.txt
|
||||
#
|
||||
attrs==22.2.0
|
||||
# via
|
||||
# pytest
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
autocommand==2.2.2
|
||||
# via jaraco.text
|
||||
certifi==2022.12.7
|
||||
# via requests
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
cheroot==9.0.0
|
||||
# via cherrypy
|
||||
cherrypy==18.8.0
|
||||
# via -r requirements/static/ci/pkgtests.in
|
||||
contextvars==2.4
|
||||
# via -r requirements/base.txt
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
distro==1.8.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-skip-markers
|
||||
exceptiongroup==1.1.0
|
||||
# via pytest
|
||||
filelock==3.9.0
|
||||
# via virtualenv
|
||||
idna==3.4
|
||||
# via requests
|
||||
immutables==0.19
|
||||
# via contextvars
|
||||
importlib-metadata==6.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# pluggy
|
||||
# pytest
|
||||
# virtualenv
|
||||
importlib-resources==5.10.2
|
||||
# via jaraco.text
|
||||
inflect==6.0.2
|
||||
# via jaraco.text
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
jaraco.classes==3.2.3
|
||||
# via jaraco.collections
|
||||
jaraco.collections==3.8.0
|
||||
# via cherrypy
|
||||
jaraco.context==4.2.0
|
||||
# via jaraco.text
|
||||
jaraco.functools==3.5.2
|
||||
# via
|
||||
# cheroot
|
||||
# jaraco.text
|
||||
jaraco.text==3.11.0
|
||||
# via jaraco.collections
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/base.txt
|
||||
jmespath==1.0.1
|
||||
# via -r requirements/base.txt
|
||||
looseversion==1.0.3
|
||||
# via -r requirements/base.txt
|
||||
markupsafe==2.1.1
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# jinja2
|
||||
more-itertools==9.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# cherrypy
|
||||
# jaraco.classes
|
||||
# jaraco.functools
|
||||
# jaraco.text
|
||||
msgpack==1.0.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
packaging==23.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest
|
||||
platformdirs==2.6.2
|
||||
# via virtualenv
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
portend==3.1.0
|
||||
# via cherrypy
|
||||
psutil==5.9.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pycryptodomex==3.16.0
|
||||
# via -r requirements/crypto.txt
|
||||
pydantic==1.10.4
|
||||
# via inflect
|
||||
pytest-helpers-namespace==2021.12.29
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
pytest-salt-factories==1.0.0rc17
|
||||
# via -r requirements/static/ci/pkgtests.in
|
||||
pytest-shell-utilities==1.7.0
|
||||
# via pytest-salt-factories
|
||||
pytest-skip-markers==1.4.0
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pytest-system-statistics==1.0.2
|
||||
# via pytest-salt-factories
|
||||
pytest-tempdir==2019.10.12
|
||||
# via pytest-salt-factories
|
||||
pytest==7.2.1
|
||||
# via
|
||||
# pytest-helpers-namespace
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
# pytest-tempdir
|
||||
pytz==2022.7.1
|
||||
# via tempora
|
||||
pyyaml==6.0
|
||||
# via -r requirements/base.txt
|
||||
pyzmq==22.0.3
|
||||
# via
|
||||
# -r requirements/zeromq.txt
|
||||
# pytest-salt-factories
|
||||
requests==2.28.2
|
||||
# via -r requirements/base.txt
|
||||
six==1.16.0
|
||||
# via cheroot
|
||||
tempora==5.2.0
|
||||
# via portend
|
||||
tomli==2.0.1
|
||||
# via pytest
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# immutables
|
||||
# importlib-metadata
|
||||
# platformdirs
|
||||
# pydantic
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
urllib3==1.26.14
|
||||
# via requests
|
||||
virtualenv==20.17.1
|
||||
# via pytest-salt-factories
|
||||
zc.lockfile==2.0
|
||||
# via cherrypy
|
||||
zipp==3.11.0
|
||||
# via
|
||||
# importlib-metadata
|
||||
# importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
|
@ -1,173 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.8/pkgtests-windows.txt requirements/base.txt requirements/static/ci/pkgtests-windows.in requirements/zeromq.txt
|
||||
#
|
||||
attrs==22.2.0
|
||||
# via
|
||||
# pytest
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
autocommand==2.2.2
|
||||
# via jaraco.text
|
||||
certifi==2022.12.7
|
||||
# via requests
|
||||
cffi==1.15.1
|
||||
# via clr-loader
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
cheroot==9.0.0
|
||||
# via cherrypy
|
||||
cherrypy==18.8.0
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
clr-loader==0.2.5
|
||||
# via pythonnet
|
||||
colorama==0.4.6
|
||||
# via pytest
|
||||
contextvars==2.4
|
||||
# via -r requirements/base.txt
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
distro==1.8.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-skip-markers
|
||||
exceptiongroup==1.1.0
|
||||
# via pytest
|
||||
filelock==3.9.0
|
||||
# via virtualenv
|
||||
idna==3.4
|
||||
# via requests
|
||||
immutables==0.19
|
||||
# via contextvars
|
||||
importlib-resources==5.10.2
|
||||
# via jaraco.text
|
||||
inflect==6.0.2
|
||||
# via jaraco.text
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
jaraco.classes==3.2.3
|
||||
# via jaraco.collections
|
||||
jaraco.collections==3.8.0
|
||||
# via cherrypy
|
||||
jaraco.context==4.3.0
|
||||
# via jaraco.text
|
||||
jaraco.functools==3.5.2
|
||||
# via
|
||||
# cheroot
|
||||
# jaraco.text
|
||||
# tempora
|
||||
jaraco.text==3.11.1
|
||||
# via jaraco.collections
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/base.txt
|
||||
jmespath==1.0.1
|
||||
# via -r requirements/base.txt
|
||||
looseversion==1.0.3
|
||||
# via -r requirements/base.txt
|
||||
markupsafe==2.1.2
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# jinja2
|
||||
more-itertools==9.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# cherrypy
|
||||
# jaraco.classes
|
||||
# jaraco.functools
|
||||
# jaraco.text
|
||||
msgpack==1.0.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
packaging==23.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest
|
||||
platformdirs==2.6.2
|
||||
# via virtualenv
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
portend==3.1.0
|
||||
# via cherrypy
|
||||
psutil==5.9.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pycparser==2.21
|
||||
# via cffi
|
||||
pycryptodomex==3.17
|
||||
# via -r requirements/crypto.txt
|
||||
pydantic==1.10.4
|
||||
# via inflect
|
||||
pytest-helpers-namespace==2021.12.29
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
pytest-salt-factories==1.0.0rc17
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
pytest-shell-utilities==1.7.0
|
||||
# via pytest-salt-factories
|
||||
pytest-skip-markers==1.4.0
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pytest-system-statistics==1.0.2
|
||||
# via pytest-salt-factories
|
||||
pytest-tempdir==2019.10.12
|
||||
# via pytest-salt-factories
|
||||
pytest==7.2.1
|
||||
# via
|
||||
# pytest-helpers-namespace
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
# pytest-tempdir
|
||||
pythonnet==3.0.1 ; python_version >= "3.7"
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
pytz==2022.7.1
|
||||
# via tempora
|
||||
pywin32==305
|
||||
# via
|
||||
# cherrypy
|
||||
# pytest-skip-markers
|
||||
# wmi
|
||||
pyyaml==6.0
|
||||
# via -r requirements/base.txt
|
||||
pyzmq==25.0.0 ; sys_platform == "win32"
|
||||
# via
|
||||
# -r requirements/zeromq.txt
|
||||
# pytest-salt-factories
|
||||
requests==2.28.2
|
||||
# via -r requirements/base.txt
|
||||
six==1.16.0
|
||||
# via cheroot
|
||||
tempora==5.2.1
|
||||
# via portend
|
||||
tomli==2.0.1
|
||||
# via pytest
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# pydantic
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
urllib3==1.26.14
|
||||
# via requests
|
||||
virtualenv==20.18.0
|
||||
# via pytest-salt-factories
|
||||
wmi==1.5.1 ; sys_platform == "win32"
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
zc.lockfile==2.0
|
||||
# via cherrypy
|
||||
zipp==3.12.1
|
||||
# via importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
|
@ -1,155 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.8/pkgtests.txt requirements/base.txt requirements/static/ci/pkgtests.in requirements/zeromq.txt
|
||||
#
|
||||
attrs==22.2.0
|
||||
# via
|
||||
# pytest
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
autocommand==2.2.2
|
||||
# via jaraco.text
|
||||
certifi==2022.12.7
|
||||
# via requests
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
cheroot==9.0.0
|
||||
# via cherrypy
|
||||
cherrypy==18.8.0
|
||||
# via -r requirements/static/ci/pkgtests.in
|
||||
contextvars==2.4
|
||||
# via -r requirements/base.txt
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
distro==1.8.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-skip-markers
|
||||
exceptiongroup==1.1.0
|
||||
# via pytest
|
||||
filelock==3.9.0
|
||||
# via virtualenv
|
||||
idna==3.4
|
||||
# via requests
|
||||
immutables==0.19
|
||||
# via contextvars
|
||||
importlib-resources==5.10.2
|
||||
# via jaraco.text
|
||||
inflect==6.0.2
|
||||
# via jaraco.text
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
jaraco.classes==3.2.3
|
||||
# via jaraco.collections
|
||||
jaraco.collections==3.8.0
|
||||
# via cherrypy
|
||||
jaraco.context==4.2.0
|
||||
# via jaraco.text
|
||||
jaraco.functools==3.5.2
|
||||
# via
|
||||
# cheroot
|
||||
# jaraco.text
|
||||
jaraco.text==3.11.0
|
||||
# via jaraco.collections
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/base.txt
|
||||
jmespath==1.0.1
|
||||
# via -r requirements/base.txt
|
||||
looseversion==1.0.3
|
||||
# via -r requirements/base.txt
|
||||
markupsafe==2.1.1
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# jinja2
|
||||
more-itertools==9.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# cherrypy
|
||||
# jaraco.classes
|
||||
# jaraco.functools
|
||||
# jaraco.text
|
||||
msgpack==1.0.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
packaging==23.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest
|
||||
platformdirs==2.6.2
|
||||
# via virtualenv
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
portend==3.1.0
|
||||
# via cherrypy
|
||||
psutil==5.9.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pycryptodomex==3.16.0
|
||||
# via -r requirements/crypto.txt
|
||||
pydantic==1.10.4
|
||||
# via inflect
|
||||
pytest-helpers-namespace==2021.12.29
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
pytest-salt-factories==1.0.0rc17
|
||||
# via -r requirements/static/ci/pkgtests.in
|
||||
pytest-shell-utilities==1.7.0
|
||||
# via pytest-salt-factories
|
||||
pytest-skip-markers==1.4.0
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pytest-system-statistics==1.0.2
|
||||
# via pytest-salt-factories
|
||||
pytest-tempdir==2019.10.12
|
||||
# via pytest-salt-factories
|
||||
pytest==7.2.1
|
||||
# via
|
||||
# pytest-helpers-namespace
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
# pytest-tempdir
|
||||
pytz==2022.7.1
|
||||
# via tempora
|
||||
pyyaml==6.0
|
||||
# via -r requirements/base.txt
|
||||
pyzmq==22.0.3
|
||||
# via
|
||||
# -r requirements/zeromq.txt
|
||||
# pytest-salt-factories
|
||||
requests==2.28.2
|
||||
# via -r requirements/base.txt
|
||||
six==1.16.0
|
||||
# via cheroot
|
||||
tempora==5.2.0
|
||||
# via portend
|
||||
tomli==2.0.1
|
||||
# via pytest
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# pydantic
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
urllib3==1.26.14
|
||||
# via requests
|
||||
virtualenv==20.17.1
|
||||
# via pytest-salt-factories
|
||||
zc.lockfile==2.0
|
||||
# via cherrypy
|
||||
zipp==3.11.0
|
||||
# via importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
|
@ -1,169 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.9/pkgtests-windows.txt requirements/base.txt requirements/static/ci/pkgtests-windows.in requirements/zeromq.txt
|
||||
#
|
||||
attrs==22.2.0
|
||||
# via
|
||||
# pytest
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
autocommand==2.2.2
|
||||
# via jaraco.text
|
||||
certifi==2022.12.7
|
||||
# via requests
|
||||
cffi==1.15.1
|
||||
# via clr-loader
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
cheroot==9.0.0
|
||||
# via cherrypy
|
||||
cherrypy==18.8.0
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
clr-loader==0.2.5
|
||||
# via pythonnet
|
||||
colorama==0.4.6
|
||||
# via pytest
|
||||
contextvars==2.4
|
||||
# via -r requirements/base.txt
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
distro==1.8.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-skip-markers
|
||||
exceptiongroup==1.1.0
|
||||
# via pytest
|
||||
filelock==3.9.0
|
||||
# via virtualenv
|
||||
idna==3.4
|
||||
# via requests
|
||||
immutables==0.19
|
||||
# via contextvars
|
||||
inflect==6.0.2
|
||||
# via jaraco.text
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
jaraco.classes==3.2.3
|
||||
# via jaraco.collections
|
||||
jaraco.collections==3.8.0
|
||||
# via cherrypy
|
||||
jaraco.context==4.3.0
|
||||
# via jaraco.text
|
||||
jaraco.functools==3.5.2
|
||||
# via
|
||||
# cheroot
|
||||
# jaraco.text
|
||||
# tempora
|
||||
jaraco.text==3.11.1
|
||||
# via jaraco.collections
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/base.txt
|
||||
jmespath==1.0.1
|
||||
# via -r requirements/base.txt
|
||||
looseversion==1.0.3
|
||||
# via -r requirements/base.txt
|
||||
markupsafe==2.1.2
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# jinja2
|
||||
more-itertools==9.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# cherrypy
|
||||
# jaraco.classes
|
||||
# jaraco.functools
|
||||
# jaraco.text
|
||||
msgpack==1.0.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
packaging==23.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest
|
||||
platformdirs==2.6.2
|
||||
# via virtualenv
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
portend==3.1.0
|
||||
# via cherrypy
|
||||
psutil==5.9.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pycparser==2.21
|
||||
# via cffi
|
||||
pycryptodomex==3.17
|
||||
# via -r requirements/crypto.txt
|
||||
pydantic==1.10.4
|
||||
# via inflect
|
||||
pytest-helpers-namespace==2021.12.29
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
pytest-salt-factories==1.0.0rc17
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
pytest-shell-utilities==1.7.0
|
||||
# via pytest-salt-factories
|
||||
pytest-skip-markers==1.4.0
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pytest-system-statistics==1.0.2
|
||||
# via pytest-salt-factories
|
||||
pytest-tempdir==2019.10.12
|
||||
# via pytest-salt-factories
|
||||
pytest==7.2.1
|
||||
# via
|
||||
# pytest-helpers-namespace
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
# pytest-tempdir
|
||||
pythonnet==3.0.1 ; python_version >= "3.7"
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
pytz==2022.7.1
|
||||
# via tempora
|
||||
pywin32==305
|
||||
# via
|
||||
# cherrypy
|
||||
# pytest-skip-markers
|
||||
# wmi
|
||||
pyyaml==6.0
|
||||
# via -r requirements/base.txt
|
||||
pyzmq==25.0.0 ; sys_platform == "win32"
|
||||
# via
|
||||
# -r requirements/zeromq.txt
|
||||
# pytest-salt-factories
|
||||
requests==2.28.2
|
||||
# via -r requirements/base.txt
|
||||
six==1.16.0
|
||||
# via cheroot
|
||||
tempora==5.2.1
|
||||
# via portend
|
||||
tomli==2.0.1
|
||||
# via pytest
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# pydantic
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
urllib3==1.26.14
|
||||
# via requests
|
||||
virtualenv==20.18.0
|
||||
# via pytest-salt-factories
|
||||
wmi==1.5.1 ; sys_platform == "win32"
|
||||
# via -r requirements/static/ci/pkgtests-windows.in
|
||||
zc.lockfile==2.0
|
||||
# via cherrypy
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
|
@ -1,151 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=requirements/static/ci/py3.9/pkgtests.txt requirements/base.txt requirements/static/ci/pkgtests.in requirements/zeromq.txt
|
||||
#
|
||||
attrs==22.2.0
|
||||
# via
|
||||
# pytest
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
autocommand==2.2.2
|
||||
# via jaraco.text
|
||||
certifi==2022.12.7
|
||||
# via requests
|
||||
charset-normalizer==3.0.1
|
||||
# via requests
|
||||
cheroot==9.0.0
|
||||
# via cherrypy
|
||||
cherrypy==18.8.0
|
||||
# via -r requirements/static/ci/pkgtests.in
|
||||
contextvars==2.4
|
||||
# via -r requirements/base.txt
|
||||
distlib==0.3.6
|
||||
# via virtualenv
|
||||
distro==1.8.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-skip-markers
|
||||
exceptiongroup==1.1.0
|
||||
# via pytest
|
||||
filelock==3.9.0
|
||||
# via virtualenv
|
||||
idna==3.4
|
||||
# via requests
|
||||
immutables==0.19
|
||||
# via contextvars
|
||||
inflect==6.0.2
|
||||
# via jaraco.text
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
jaraco.classes==3.2.3
|
||||
# via jaraco.collections
|
||||
jaraco.collections==3.8.0
|
||||
# via cherrypy
|
||||
jaraco.context==4.2.0
|
||||
# via jaraco.text
|
||||
jaraco.functools==3.5.2
|
||||
# via
|
||||
# cheroot
|
||||
# jaraco.text
|
||||
jaraco.text==3.11.0
|
||||
# via jaraco.collections
|
||||
jinja2==3.1.2
|
||||
# via -r requirements/base.txt
|
||||
jmespath==1.0.1
|
||||
# via -r requirements/base.txt
|
||||
looseversion==1.0.3
|
||||
# via -r requirements/base.txt
|
||||
markupsafe==2.1.1
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# jinja2
|
||||
more-itertools==9.0.0
|
||||
# via
|
||||
# cheroot
|
||||
# cherrypy
|
||||
# jaraco.classes
|
||||
# jaraco.functools
|
||||
# jaraco.text
|
||||
msgpack==1.0.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
packaging==23.0
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest
|
||||
platformdirs==2.6.2
|
||||
# via virtualenv
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
portend==3.1.0
|
||||
# via cherrypy
|
||||
psutil==5.9.4
|
||||
# via
|
||||
# -r requirements/base.txt
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pycryptodomex==3.16.0
|
||||
# via -r requirements/crypto.txt
|
||||
pydantic==1.10.4
|
||||
# via inflect
|
||||
pytest-helpers-namespace==2021.12.29
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
pytest-salt-factories==1.0.0rc17
|
||||
# via -r requirements/static/ci/pkgtests.in
|
||||
pytest-shell-utilities==1.7.0
|
||||
# via pytest-salt-factories
|
||||
pytest-skip-markers==1.4.0
|
||||
# via
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
pytest-system-statistics==1.0.2
|
||||
# via pytest-salt-factories
|
||||
pytest-tempdir==2019.10.12
|
||||
# via pytest-salt-factories
|
||||
pytest==7.2.1
|
||||
# via
|
||||
# pytest-helpers-namespace
|
||||
# pytest-salt-factories
|
||||
# pytest-shell-utilities
|
||||
# pytest-skip-markers
|
||||
# pytest-system-statistics
|
||||
# pytest-tempdir
|
||||
pytz==2022.7.1
|
||||
# via tempora
|
||||
pyyaml==6.0
|
||||
# via -r requirements/base.txt
|
||||
pyzmq==25.0.0
|
||||
# via
|
||||
# -r requirements/zeromq.txt
|
||||
# pytest-salt-factories
|
||||
requests==2.28.2
|
||||
# via -r requirements/base.txt
|
||||
six==1.16.0
|
||||
# via cheroot
|
||||
tempora==5.2.0
|
||||
# via portend
|
||||
tomli==2.0.1
|
||||
# via pytest
|
||||
typing-extensions==4.4.0
|
||||
# via
|
||||
# pydantic
|
||||
# pytest-shell-utilities
|
||||
# pytest-system-statistics
|
||||
urllib3==1.26.14
|
||||
# via requests
|
||||
virtualenv==20.17.1
|
||||
# via pytest-salt-factories
|
||||
zc.lockfile==2.0
|
||||
# via cherrypy
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
39
setup.py
39
setup.py
|
@ -1130,45 +1130,6 @@ class SaltDistribution(distutils.dist.Distribution):
|
|||
install_requires += _parse_requirements_file(reqfile)
|
||||
return install_requires
|
||||
|
||||
@property
|
||||
def _property_scripts(self):
|
||||
# Scripts common to all scenarios
|
||||
scripts = ["scripts/salt-call"]
|
||||
if self.ssh_packaging or PACKAGED_FOR_SALT_SSH:
|
||||
scripts.append("scripts/salt-ssh")
|
||||
if IS_WINDOWS_PLATFORM and not os.environ.get("SALT_BUILD_ALL_BINS"):
|
||||
return scripts
|
||||
scripts.extend(["scripts/salt-cloud", "scripts/spm"])
|
||||
return scripts
|
||||
|
||||
if IS_WINDOWS_PLATFORM and not os.environ.get("SALT_BUILD_ALL_BINS"):
|
||||
scripts.extend(
|
||||
[
|
||||
"scripts/salt-cp",
|
||||
"scripts/salt-minion",
|
||||
]
|
||||
)
|
||||
return scripts
|
||||
|
||||
# *nix, so, we need all scripts
|
||||
scripts.extend(
|
||||
[
|
||||
"scripts/salt",
|
||||
"scripts/salt-api",
|
||||
"scripts/salt-cloud",
|
||||
"scripts/salt-cp",
|
||||
"scripts/salt-key",
|
||||
"scripts/salt-master",
|
||||
"scripts/salt-minion",
|
||||
"scripts/salt-proxy",
|
||||
"scripts/salt-run",
|
||||
"scripts/salt-ssh",
|
||||
"scripts/salt-syndic",
|
||||
"scripts/spm",
|
||||
]
|
||||
)
|
||||
return scripts
|
||||
|
||||
@property
|
||||
def _property_entry_points(self):
|
||||
entrypoints = {
|
||||
|
|
13
tools/ci.py
13
tools/ci.py
|
@ -196,7 +196,10 @@ def runner_types(ctx: Context, event_name: str):
|
|||
|
||||
# This is a push or a scheduled event
|
||||
ctx.info(f"Running from a {event_name!r} event")
|
||||
if gh_event["repository"]["fork"] is True:
|
||||
if (
|
||||
gh_event["repository"]["fork"] is True
|
||||
and os.environ.get("FORK_HAS_SELF_HOSTED_RUNNERS", "0") == "1"
|
||||
):
|
||||
# This is running on a forked repository, don't run tests
|
||||
ctx.info("The push event is on a forked repository")
|
||||
runners["github-hosted"] = True
|
||||
|
@ -205,7 +208,7 @@ def runner_types(ctx: Context, event_name: str):
|
|||
wfh.write(f"runners={json.dumps(runners)}\n")
|
||||
ctx.exit(0)
|
||||
|
||||
# Not running on a fork, run everything
|
||||
# Not running on a fork, or the fork has self hosted runners, run everything
|
||||
ctx.info(f"The {event_name!r} event is from the main repository")
|
||||
runners["github-hosted"] = runners["self-hosted"] = True
|
||||
ctx.info("Writing 'runners' to the github outputs file")
|
||||
|
@ -667,7 +670,7 @@ def pkg_matrix(ctx: Context, distro_slug: str, pkg_type: str):
|
|||
"""
|
||||
_matrix = []
|
||||
sessions = [
|
||||
"test-pkgs-3",
|
||||
"test-pkgs-onedir",
|
||||
]
|
||||
if (
|
||||
distro_slug
|
||||
|
@ -683,13 +686,13 @@ def pkg_matrix(ctx: Context, distro_slug: str, pkg_type: str):
|
|||
# we will need to ensure when we release 3006.0
|
||||
# we allow for 3006.0 jobs to run, because then
|
||||
# we will have arm64 onedir packages to upgrade from
|
||||
sessions.append("'test-upgrade-pkgs-3(classic=False)'")
|
||||
sessions.append("'test-upgrade-pkgs-onedir(classic=False)'")
|
||||
if (
|
||||
distro_slug not in ["centosstream-9", "ubuntu-22.04", "ubuntu-22.04-arm64"]
|
||||
and "MSI" != pkg_type
|
||||
):
|
||||
# Packages for these OSs where never built for classic previously
|
||||
sessions.append("'test-upgrade-pkgs-3(classic=True)'")
|
||||
sessions.append("'test-upgrade-pkgs-onedir(classic=True)'")
|
||||
|
||||
for sess in sessions:
|
||||
_matrix.append({"nox-session": sess})
|
||||
|
|
|
@ -223,7 +223,7 @@ def set_salt_version(
|
|||
)
|
||||
def pre_archive_cleanup(ctx: Context, cleanup_path: str, pkg: bool = False):
|
||||
"""
|
||||
Clean the provided path of paths that shouyld not be included in the archive.
|
||||
Clean the provided path of paths that should not be included in the archive.
|
||||
|
||||
For example:
|
||||
|
||||
|
|
32
tools/vm.py
32
tools/vm.py
|
@ -21,6 +21,7 @@ from functools import lru_cache
|
|||
from typing import TYPE_CHECKING, cast
|
||||
|
||||
from ptscripts import Context, command_group
|
||||
from requests.exceptions import ConnectTimeout
|
||||
|
||||
import tools.utils
|
||||
|
||||
|
@ -95,8 +96,13 @@ vm.add_argument("--region", help="The AWS region.", default=AWS_REGION)
|
|||
"help": "How many times to retry creating and connecting to a vm",
|
||||
},
|
||||
"environment": {
|
||||
"help": "The AWS environment to use.",
|
||||
"choices": ("prod", "test"),
|
||||
"help": (
|
||||
"The AWS environment to use. When the value is auto, an "
|
||||
"attempt will be made to get the right environment from the "
|
||||
"AWS instance metadata endpoint. This only works for bastion "
|
||||
"VMs."
|
||||
),
|
||||
"choices": ("prod", "test", "auto"),
|
||||
},
|
||||
}
|
||||
)
|
||||
|
@ -117,6 +123,28 @@ def create(
|
|||
ctx.exit(1, "We need a key name to spin a VM")
|
||||
if not retries:
|
||||
retries = 1
|
||||
if environment == "auto":
|
||||
# Lets get the environment from the instance profile if we're on a bastion VM
|
||||
with ctx.web as web:
|
||||
try:
|
||||
ret = web.put(
|
||||
"http://169.254.169.254/latest/api/token",
|
||||
headers={"X-aws-ec2-metadata-token-ttl-seconds": "10"},
|
||||
timeout=1,
|
||||
)
|
||||
token = ret.text.strip()
|
||||
ret = web.get(
|
||||
"http://169.254.169.254/latest/meta-data/tags/instance/spb:environment",
|
||||
headers={"X-aws-ec2-metadata-token": token},
|
||||
)
|
||||
spb_environment = ret.text.strip()
|
||||
if spb_environment:
|
||||
ctx.info(f"Discovered VM environment: {spb_environment}")
|
||||
environment = spb_environment
|
||||
except ConnectTimeout:
|
||||
# We're apparently not in bastion VM
|
||||
environment = None
|
||||
|
||||
attempts = 0
|
||||
while True:
|
||||
attempts += 1
|
||||
|
|
Loading…
Add table
Reference in a new issue