Skip to content

Commit 85369a3

Browse files
authored
Merge branch 'master' into patch-5
2 parents bcf2578 + da88937 commit 85369a3

1,144 files changed

Lines changed: 420912 additions & 105158 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/docs.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Docs
3+
about: Issue related to Salt Documentation
4+
title: "[DOCS]"
5+
labels: Documentation
6+
assignees: ''
7+
8+
---
9+
10+
**Description**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Suggested Fix**
14+
What did you expect to see in the documentation that is missing or needs updating?
15+
16+
**Type of documentation**
17+
This could be Salt documentation, Salt modules, the Salt Repo or the Getting Started guide.
18+
19+
**Location or format of documentation**
20+
Insert page URL if applicable.
21+
22+
**Additional context**
23+
Add any other context or screenshots about the feature request here.

.github/config.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ newIssueWelcomeComment: >
77
possible. In the meantime, here’s some information that may help as you continue your Salt
88
journey.
99
10-
Please be sure to review our [Code of Conduct]
11-
(https://github.com/saltstack/salt/blob/master/CODE_OF_CONDUCT.md).
10+
Please be sure to review our [Code of Conduct](https://github.com/saltstack/salt/blob/master/CODE_OF_CONDUCT.md).
1211
Also, check out some of our community
1312
resources including:
1413
@@ -23,9 +22,9 @@ newIssueWelcomeComment: >
2322
opportunities to meet with other contributors and the Salt Core team and collaborate in real
2423
time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
2524
26-
If you have additional questions, email us at core@saltstack.com or reach out directly to the
27-
Community Manager, Cassandra Faris via Slack. We’re glad you’ve joined our community and
28-
look forward to doing awesome things with you!
25+
If you have additional questions, email us at core@saltstack.com. We’re glad
26+
you’ve joined our community and look forward to doing awesome things with
27+
you!
2928
3029
# Comment to be posted to on PRs from first time contributors in your repository
3130
newPRWelcomeComment: >
@@ -34,8 +33,7 @@ newPRWelcomeComment: >
3433
possible. In the meantime, here’s some information that may help as you continue your Salt
3534
journey.
3635
37-
Please be sure to review our [Code of Conduct]
38-
(https://github.com/saltstack/salt/blob/master/CODE_OF_CONDUCT.md).
36+
Please be sure to review our [Code of Conduct](https://github.com/saltstack/salt/blob/master/CODE_OF_CONDUCT.md).
3937
Also, check out some of our community
4038
resources including:
4139
@@ -50,9 +48,9 @@ newPRWelcomeComment: >
5048
opportunities to meet with other contributors and the Salt Core team and collaborate in real
5149
time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
5250
53-
If you have additional questions, email us at core@saltstack.com or reach out directly to the
54-
Community Manager, Cassandra Faris via Slack. We’re glad you’ve joined our community and
55-
look forward to doing awesome things with you!
51+
If you have additional questions, email us at core@saltstack.com. We’re glad
52+
you’ve joined our community and look forward to doing awesome things with
53+
you!
5654
5755
# Comment to be posted to on pull requests merged by a first time user
5856
firstPRMergeComment: >

.github/workflows/docs.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Docs
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Salt:
7+
name: Build Salt Documentation
8+
runs-on: ubuntu-latest
9+
10+
container:
11+
image: python:3.8.6-slim-buster
12+
13+
steps:
14+
15+
- name: Install System Deps
16+
run: |
17+
apt-get update
18+
apt-get install -y enchant git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev xz-utils
19+
20+
- uses: actions/checkout@v2
21+
22+
- name: Set Python Version Env Var
23+
run: |
24+
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
25+
26+
- name: Install Nox
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install nox
30+
31+
- id: changed-files
32+
name: Get Changed Files
33+
uses: dorny/paths-filter@v2
34+
with:
35+
token: ${{ github.token }}
36+
list-files: json
37+
filters: |
38+
docs:
39+
- docs/**
40+
41+
- name: Set Docs Python Cache Key
42+
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
43+
44+
- name: Setup Nox Cache
45+
uses: pat-s/always-upload-cache@v2.1.3
46+
with:
47+
path: .nox/
48+
key: docs-salt|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
49+
50+
- name: Install Python Requirements
51+
env:
52+
PIP_EXTRA_INDEX_URL: https://artifactory.saltstack.net/artifactory/api/pypi/pypi-open/simple/
53+
run:
54+
nox --install-only --forcecolor -e 'docs-html(compress=False, clean=True)'
55+
56+
- name: Build Docs
57+
env:
58+
SKIP_REQUIREMENTS_INSTALL: YES
59+
run: |
60+
nox --forcecolor -e 'docs-html(compress=False, clean=True)'
61+
62+
- name: Store Generated Documentation
63+
uses: actions/upload-artifact@v2
64+
with:
65+
name: salt-html-docs
66+
path: doc/_build/html
67+
68+
Manpages:
69+
name: Build Salt man Pages
70+
runs-on: ubuntu-latest
71+
72+
container:
73+
image: python:3.8.6-slim-buster
74+
75+
steps:
76+
77+
- name: Install System Deps
78+
run: |
79+
apt-get update
80+
apt-get install -y enchant git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev
81+
82+
- uses: actions/checkout@v2
83+
84+
- id: changed-files
85+
name: Get Changed Files
86+
uses: dorny/paths-filter@v2
87+
with:
88+
token: ${{ github.token }}
89+
list-files: json
90+
filters: |
91+
docs:
92+
- docs/**
93+
94+
- name: Set Python Version Env Var
95+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
96+
run: |
97+
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
98+
99+
- name: Install Nox
100+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
101+
run: |
102+
python -m pip install --upgrade pip
103+
pip install nox
104+
105+
- name: Set Docs Python Cache Key
106+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
107+
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
108+
109+
- name: Setup Nox Cache
110+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
111+
uses: pat-s/always-upload-cache@v2.1.3
112+
with:
113+
path: .nox/
114+
key: docs-man|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
115+
116+
- name: Install Python Requirements
117+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
118+
env:
119+
PIP_EXTRA_INDEX_URL: https://artifactory.saltstack.net/artifactory/api/pypi/pypi-open/simple/
120+
run:
121+
nox --install-only --forcecolor -e 'docs-man(compress=False, update=False, clean=True)'
122+
123+
- name: Build Manpages
124+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
125+
env:
126+
SKIP_REQUIREMENTS_INSTALL: YES
127+
run: |
128+
nox --forcecolor -e 'docs-man(compress=False, update=False, clean=True)'
129+
130+
- name: Store Generated Documentation
131+
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
132+
uses: actions/upload-artifact@v2
133+
with:
134+
name: salt-man-pages
135+
path: doc/_build/man

.github/workflows/lint.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Salt:
7+
name: Lint Salt's Source Code
8+
runs-on: ubuntu-latest
9+
10+
container:
11+
image: python:3.8.6-slim-buster
12+
13+
steps:
14+
15+
- name: Install System Deps
16+
run: |
17+
apt-get update
18+
apt-get install -y enchant git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev
19+
20+
- uses: actions/checkout@v2
21+
22+
- name: Set Python Version Env Var
23+
run: |
24+
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
25+
26+
- name: Install Nox
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install nox
30+
31+
- name: Set Lint Python Cache Key
32+
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
33+
34+
- name: Setup Nox Cache
35+
uses: pat-s/always-upload-cache@v2.1.3
36+
with:
37+
path: .nox/
38+
key: lint-salt|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
39+
40+
- id: changed-files
41+
name: Get Changed Files
42+
uses: dorny/paths-filter@v2
43+
with:
44+
token: ${{ github.token }}
45+
list-files: json
46+
filters: |
47+
salt:
48+
- added|modified:
49+
- setup.py
50+
- noxfile.py
51+
- salt/**/*.py
52+
- tasks/**/*.py
53+
54+
- name: Install Python Requirements
55+
env:
56+
PIP_EXTRA_INDEX_URL: https://artifactory.saltstack.net/artifactory/api/pypi/pypi-open/simple/
57+
run:
58+
nox --install-only --forcecolor -e lint-salt
59+
60+
- name: Lint Changed Files
61+
if: github.event_name == 'pull_request' && steps.changed-files.outputs.salt == 'true'
62+
env:
63+
SKIP_REQUIREMENTS_INSTALL: YES
64+
run: |
65+
nox --forcecolor -e lint-salt -- ${{ join(fromJSON(steps.changed-files.outputs.salt_files), ' ') }}
66+
67+
- name: Lint ALL Files
68+
if: steps.changed-files.outputs.salt == 'true'
69+
env:
70+
SKIP_REQUIREMENTS_INSTALL: YES
71+
run: |
72+
nox --forcecolor -e lint-salt
73+
74+
Tests:
75+
name: Lint Salt's Test Suite
76+
runs-on: ubuntu-latest
77+
78+
container:
79+
image: python:3.8.6-slim-buster
80+
81+
steps:
82+
83+
- name: Install System Deps
84+
run: |
85+
apt-get update
86+
apt-get install -y enchant git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev
87+
88+
- uses: actions/checkout@v2
89+
90+
- name: Set Python Version Env Var
91+
run: |
92+
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
93+
94+
- name: Install Nox
95+
run: |
96+
python -m pip install --upgrade pip
97+
pip install nox
98+
99+
- name: Set Lint Python Cache Key
100+
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
101+
102+
- name: Setup Nox Cache
103+
uses: pat-s/always-upload-cache@v2.1.3
104+
with:
105+
path: .nox/
106+
key: lint-tests|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
107+
108+
- id: changed-files
109+
name: Get Changed Files
110+
uses: dorny/paths-filter@v2
111+
with:
112+
token: ${{ github.token }}
113+
list-files: json
114+
filters: |
115+
tests:
116+
- added|modified:
117+
- tests/**/*.py
118+
119+
- name: Install Python Requirements
120+
env:
121+
PIP_EXTRA_INDEX_URL: https://artifactory.saltstack.net/artifactory/api/pypi/pypi-open/simple/
122+
run:
123+
nox --install-only --forcecolor -e lint-tests
124+
125+
- name: Lint Changed Files
126+
if: github.event_name == 'pull_request' && steps.changed-files.outputs.tests == 'true'
127+
env:
128+
SKIP_REQUIREMENTS_INSTALL: YES
129+
run: |
130+
nox --forcecolor -e lint-tests -- ${{ join(fromJSON(steps.changed-files.outputs.tests_files), ' ') }}
131+
132+
- name: Lint ALL Files
133+
if: steps.changed-files.outputs.tests == 'true'
134+
env:
135+
SKIP_REQUIREMENTS_INSTALL: YES
136+
run: |
137+
nox --forcecolor -e lint-tests

.github/workflows/pre-commit.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Pre-Commit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Pre-Commit:
7+
name: Run Pre-Commit Against Salt
8+
9+
runs-on: ubuntu-latest
10+
11+
container:
12+
image: python:3.8.6-slim-buster
13+
14+
steps:
15+
16+
- name: Install System Deps
17+
run: |
18+
apt-get update
19+
apt-get install -y enchant git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev
20+
21+
- uses: actions/checkout@v2
22+
23+
- name: Set Pre-Commit Cache Key
24+
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
25+
26+
- name: Setup Pre-Commit Cache
27+
uses: pat-s/always-upload-cache@v2.1.3
28+
with:
29+
path: ~/.cache/pre-commit
30+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
31+
32+
- id: changed-files
33+
name: Get Changed Files
34+
uses: dorny/paths-filter@v2
35+
with:
36+
token: ${{ github.token }}
37+
list-files: json
38+
filters: |
39+
repo:
40+
- added|modified:
41+
- '**'
42+
43+
- name: Check ALL Files On Branch
44+
uses: pre-commit/action@v2.0.0
45+
if: github.event_name != 'pull_request'
46+
env:
47+
SKIP: lint-salt,lint-tests,pyupgrade,remove-import-headers,rstcheck
48+
49+
- name: Check Changed Files On PR
50+
uses: pre-commit/action@v2.0.0
51+
if: github.event_name == 'pull_request' && steps.changed-files.outputs.repo == 'true'
52+
with:
53+
extra_args: --files ${{ join(fromJSON(steps.changed-files.outputs.repo_files), ' ') }}
54+
env:
55+
SKIP: lint-salt,lint-tests

0 commit comments

Comments
 (0)