mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
use tools to create container
This commit is contained in:
parent
cecf31f29b
commit
3219011dfb
2 changed files with 42 additions and 33 deletions
53
.github/workflows/test-action.yml
vendored
53
.github/workflows/test-action.yml
vendored
|
@ -154,39 +154,28 @@ jobs:
|
|||
free -h
|
||||
|
||||
- name: "Create container ${{ matrix.container }}"
|
||||
env:
|
||||
GITHUB_ACTIONS: true
|
||||
CI: true
|
||||
SKIP_REQUIREMENTS_INSTALL: 1
|
||||
PRINT_TEST_SELECTION: 0
|
||||
PRINT_TEST_PLAN_ONLY: 0
|
||||
PRINT_SYSTEM_INFO: 0
|
||||
RERUN_FAILURES: 1
|
||||
GITHUB_ACTIONS_PIPELINE: 1
|
||||
SKIP_INITIAL_ONEDIR_FAILURES: 1
|
||||
SKIP_INITIAL_GH_ACTIONS_FAILURES: 1
|
||||
SKIP_CODE_COVERAGE: ${{ inputs.skip-code-coverage && '1' || '0' }}
|
||||
CONVERAGE_CONTEXT: ${{ matrix.slug }}
|
||||
COLUMNS: 190
|
||||
PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }}
|
||||
PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }}
|
||||
PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }}
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
run: |
|
||||
/usr/bin/docker \
|
||||
create --name ${{ github.run_id }}_salt-test \
|
||||
--workdir /__w/salt/salt \
|
||||
--privileged \
|
||||
--ulimit="nofile=262144:262144" \
|
||||
-e "HOME=/github/home" \
|
||||
-e GITHUB_ACTIONS=true \
|
||||
-e CI=true \
|
||||
-e SKIP_REQUIREMENTS_INSTALL=1 \
|
||||
-e PRINT_TEST_SELECTION=0 \
|
||||
-e PRINT_TEST_PLAN_ONLY=0 \
|
||||
-e PRINT_SYSTEM_INFO=0 \
|
||||
-e RERUN_FAILURES=1 \
|
||||
-e GITHUB_ACTIONS_PIPELINE=1 \
|
||||
-e SKIP_INITIAL_ONEDIR_FAILURES=1 \
|
||||
-e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \
|
||||
-e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \
|
||||
-e CONVERAGE_CONTEXT=${{ matrix.slug }} \
|
||||
-e COLUMNS=190 \
|
||||
-e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \
|
||||
-e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \
|
||||
-e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \
|
||||
-e PIP_DISABLE_PIP_VERSION_CHECK="1" \
|
||||
-e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \
|
||||
-e SALT_TRANSPORT=${{ matrix.transport }} \
|
||||
-e LANG="en_US.UTF-8" \
|
||||
-e SHELL=/bin/bash \
|
||||
-v "/home/runner/work":"/__w" \
|
||||
-v "/tmp/":"/var/lib/docker" \
|
||||
--entrypoint "/usr/lib/systemd/systemd" \
|
||||
${{ matrix.container }} \
|
||||
--systemd --unit rescue.target
|
||||
tools create ${{ matrix.container }} --name ${{ github.run_id }}_salt-test
|
||||
|
||||
- name: "Start container ${{ matrix.container }}"
|
||||
run: |
|
||||
|
|
22
.github/workflows/test-packages-action.yml
vendored
22
.github/workflows/test-packages-action.yml
vendored
|
@ -134,8 +134,28 @@ jobs:
|
|||
docker pull ${{ matrix.container }}
|
||||
|
||||
- name: "Create container ${{ matrix.container }}"
|
||||
env:
|
||||
GITHUB_ACTIONS: true
|
||||
CI: true
|
||||
SKIP_REQUIREMENTS_INSTALL: 1
|
||||
PRINT_TEST_SELECTION: 0
|
||||
PRINT_TEST_PLAN_ONLY: 0
|
||||
PRINT_SYSTEM_INFO: 0
|
||||
RERUN_FAILURES: 1
|
||||
GITHUB_ACTIONS_PIPELINE: 1
|
||||
SKIP_INITIAL_ONEDIR_FAILURES: 1
|
||||
SKIP_INITIAL_GH_ACTIONS_FAILURES: 1
|
||||
SKIP_CODE_COVERAGE: ${{ inputs.skip-code-coverage && '1' || '0' }}
|
||||
CONVERAGE_CONTEXT: ${{ matrix.slug }}
|
||||
COLUMNS: 190
|
||||
PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }}
|
||||
PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }}
|
||||
PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }}
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
run: |
|
||||
/usr/bin/docker create --name ${{ github.run_id }}_salt-test-pkg --workdir /__w/salt/salt --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" --entrypoint "/usr/lib/systemd/systemd" ${{ matrix.container }} --systemd --unit rescue.target
|
||||
tools create ${{ matrix.container }} --name ${{ github.run_id }}_salt-test
|
||||
|
||||
- name: "Start container ${{ matrix.container }}"
|
||||
run: |
|
||||
|
|
Loading…
Add table
Reference in a new issue