Skip to content

Commit 3429e4b

Browse files
Merge pull request #21 from ScriptAutomate/sitevars-autoupdate
Use sitevars, nox, and json to update versions
2 parents 51ff19d + 33f4630 commit 3429e4b

30 files changed

+289
-408
lines changed

.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Salt Install Guide",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/python:0-3.10-bullseye",
6+
"image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm",
77
"features": {
88
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {
99
"version": "latest"

.github/workflows/build-sphinx-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ defaults:
2222
jobs:
2323

2424
build:
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-24.04
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v4
2929
- name: Setup Python
3030
uses: actions/setup-python@v5
3131
with:
32-
python-version: '3.10'
32+
python-version: '3.13'
3333
cache: pip
3434
- name: Run pre-commit
3535
run: |
@@ -39,7 +39,7 @@ jobs:
3939
pre-commit run -a -v --color always
4040
- name: Build docs
4141
run: |
42-
nox -e 'docs-html(download_versions=True, clean=True)'
42+
nox -e 'docs-html(gen_sitevars=True, clean=True)'
4343
- name: Upload artifact
4444
uses: actions/upload-artifact@v4
4545
with:
@@ -52,7 +52,7 @@ jobs:
5252
deploy:
5353
permissions:
5454
contents: write
55-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04
5656
needs:
5757
- build
5858
if: success() && startsWith(github.ref, 'refs/tags/')

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ instance/
7474
# Sphinx documentation
7575
docs/_build/
7676
## Generated stuff from Sphinx templates
77-
# docs/sitevars.rst
78-
# docs/topics/announcements.rst
77+
docs/sitevars.rst
7978

8079
# PyBuilder
8180
.pybuilder/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
minimum_pre_commit_version: 2.9.3
2+
minimum_pre_commit_version: 4.0.1
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
55
rev: v5.0.0

.rstcheck.cfg

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,24 @@ ignore_substitutions=
4747
windows-x86-exe-md5,
4848
windows-x86-exe-sha256,
4949
windows-amd64-exe-gpg,
50-
macos-amd64-lts-download,
51-
macos-arm64-lts-download,
52-
macos-amd64-sts-download,
53-
macos-arm64-sts-download,
54-
minor-lts-version-badge,
55-
minor-sts-version-badge,
56-
windows-amd64-exe-lts-download,
57-
windows-amd64-msi-lts-download,
58-
windows-x86-exe-lts-download,
59-
windows-x86-msi-lts-download,
60-
windows-amd64-exe-sts-download,
61-
windows-amd64-msi-sts-download,
62-
windows-x86-exe-sts-download,
63-
windows-x86-msi-sts-download,
64-
minor-lts-version,
65-
minor-sts-version,
66-
relenv-lts-python-version,
67-
relenv-sts-python-version,
50+
macos-amd64-one-download,
51+
macos-arm64-one-download,
52+
macos-amd64-two-download,
53+
macos-arm64-two-download,
54+
minor-one-version-badge,
55+
minor-two-version-badge,
56+
windows-amd64-exe-one-download,
57+
windows-amd64-msi-one-download,
58+
windows-x86-exe-one-download,
59+
windows-x86-msi-one-download,
60+
windows-amd64-exe-two-download,
61+
windows-amd64-msi-two-download,
62+
windows-x86-exe-two-download,
63+
windows-x86-msi-two-download,
64+
minor-one-version,
65+
minor-two-version,
66+
relenv-one-python-version,
67+
relenv-two-python-version,
68+
major-one-version-text,
69+
major-two-version-text
6870
ignore_messages=(.*(aix|arista)\.rst.* \(ERROR\/3\) Error in "code-block" directive\:$)

README.rst

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Salt install guide
1010
:alt: PyPi Package Downloads
1111
:target: https://pypi.org/project/salt
1212

13-
.. image:: https://img.shields.io/twitch/status/saltprojectoss
14-
:alt: Salt Project Twitch Channel
15-
:target: https://www.twitch.tv/saltprojectoss
16-
1713
.. image:: https://img.shields.io/reddit/subreddit-subscribers/saltstack?style=social
1814
:alt: Salt Project subreddit
1915
:target: https://www.reddit.com/r/saltstack/
@@ -27,24 +23,21 @@ Salt install guide
2723

2824
If you're looking to install Salt, you've come to the right place!
2925

30-
- `View the Sphinx-built documentation here <https://saltstack.gitlab.io/open/docs/salt-install-guide>`__
31-
- `View the source repo here <https://gitlab.com/saltstack/open/docs/salt-install-guide>`__
26+
- `View the Sphinx-built documentation here <https://docs.saltproject.io/salt/install-guide/en/latest/>`__
27+
- `View the source repo here <https://github.com/saltstack/salt-install-guide>`__
3228

3329
About the Salt install guide
3430
============================
3531

3632
The Salt Install Guide supplements and extends the core documentation for the
3733
`Salt Project <https://github.com/saltstack/salt>`__. This guide is intended to
38-
help Salt users install ``salt`` in their environment, ultimately superseding
39-
documentation where applicable:
40-
41-
* Install directions on `docs.saltproject.io <https://docs.saltproject.io/en/master/topics/installation/index.html>`__
34+
help Salt users install ``salt`` in their environment.
4235

4336
Contributions from anyone inside the Salt project community are always welcome.
4437
Please read the :ref:`contributing` for more information. The contributing
4538
guide can also be found in the source repository:
4639

47-
* `CONTRIBUTING.rst <https://gitlab.com/saltstack/open/docs/salt-install-guide/-/blob/master/CONTRIBUTING.rst>`__
40+
* `CONTRIBUTING.rst <https://github.com/saltstack/salt-install-guide/-/blob/master/CONTRIBUTING.rst>`__
4841

4942

5043
Related links
@@ -77,7 +70,7 @@ The following documentation is part of the Salt Project documentation:
7770
* `Module documentation <https://docs.saltproject.io/en/latest/py-modindex.html>`__:
7871
The Salt modules and state modules explain the use cases and arguments needed
7972
to execute the Salt modules.
80-
* `Salt User Guide <https://saltstack.gitlab.io/open/docs/salt-user-guide/>`__:
73+
* `Salt User Guide <https://docs.saltproject.io/salt/user-guide/en/latest/>`__:
8174
The Salt User Guide supplements and extends the core documentation for the
8275
Salt Project. This guide is intended to help Salt users learn about Salt's
8376
core concepts and features. It was originally authored by Alan Cugler and
@@ -96,8 +89,28 @@ This repository uses the following tools:
9689
web.
9790
* Sphinx applies the
9891
`Furo Theme for Sphinx <https://pradyunsg.me/furo/>`__ to render the site.
99-
* The guide is hosted directly on GitLab using the
100-
`GitLab pages <https://docs.gitlab.com/ee/user/project/pages/>`__ feature.
101-
* GitLab handles the
102-
`CI/CD pipeline <https://gitlab.com/saltstack/open/docs/salt-install-guide/-/pipelines>`__
92+
* The guide is hosted directly on GitHub using the
93+
`GitHub pages <https://pages.github.com/>`__ feature.
94+
* GitHub Actions handle the
95+
`CI/CD pipelines <https://github.com/saltstack/salt-install-guide/actions>`__
10396
for the project.
97+
98+
Release Process
99+
===============
100+
101+
New releases of the ``salt-install-guide`` are required in order to ensure the latest docs changes
102+
make it into ``docs.saltproject.io``, which are collectively published via a private repository
103+
called ``builddocs``. ``builddocs`` will do the following:
104+
105+
* Downloads the latest tarball builds from GitHub Releases of target docs repos
106+
* ``salt-install-guide``
107+
* ``salt-user-guide``
108+
* Build reference docs from ``salt`` repo for supported release versions
109+
110+
To cut a new release of ``salt-install-guide``:
111+
112+
* Create and push a new tag via git
113+
* The new tag will trigger a GitHub Action workflow which will create a new release
114+
* The new release will include the latest built tarball!
115+
* Upon completion of a new ``salt-install-guide`` release, a new workflow must be launched
116+
via ``builddocs`` if wanting these changes to be immediately live

docs/_templates/sitevars.rst

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,45 @@
1-
.. |major-lts-version| replace:: 3006
2-
.. |major-sts-version| replace:: 3007
3-
.. |minor-lts-version| replace:: 3006.9
4-
.. |minor-sts-version| replace:: 3007.1
5-
.. |minor-lts-version-badge| replace:: :bdg-link-primary:`3006.9 <https://docs.saltproject.io/en/3006/topics/releases/3006.9.html>`
6-
.. |minor-sts-version-badge| replace:: :bdg-link-success:`3007.1 <https://docs.saltproject.io/en/latest/topics/releases/3007.1.html>`
7-
8-
.. |relenv-lts-python-version| replace:: **Python v3.10.x**
9-
.. |relenv-sts-python-version| replace:: **Python v3.10.x**
1+
.. |major-latest-version| replace:: LATEST_MAJOR
2+
.. |major-one-version| replace:: ONE_MAJOR
3+
.. |major-two-version| replace:: TWO_MAJOR
4+
.. |major-latest-version-text| replace:: LATEST_MAJOR LATEST_SUPPORT_TYPE
5+
.. |major-one-version-text| replace:: ONE_MAJOR ONE_SUPPORT_TYPE
6+
.. |major-two-version-text| replace:: TWO_MAJOR TWO_SUPPORT_TYPE
7+
.. |major-two-version-repo-postfix| replace:: TWO_MAJOR-TWO_LOWER_SUPPORT_TYPE
8+
.. |minor-latest-version| replace:: LATEST_MINOR
9+
.. |minor-one-version| replace:: ONE_MINOR
10+
.. |minor-two-version| replace:: TWO_MINOR
11+
.. |minor-one-version-badge| replace:: :bdg-link-primary:`ONE_MINOR <https://docs.saltproject.io/en/ONE_MAJOR/topics/releases/ONE_MINOR.html>`
12+
.. |minor-two-version-badge| replace:: :bdg-link-success:`TWO_MINOR <https://docs.saltproject.io/en/TWO_MAJOR/topics/releases/TWO_MINOR.html>`
13+
14+
.. |relenv-one-python-version| replace:: **Python vONE_RELENV_PYTHON.x**
15+
.. |relenv-two-python-version| replace:: **Python vTWO_RELENV_PYTHON.x**
1016

1117
.. |quickstart-script-path| replace:: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/salt-quick-start.sh
1218
.. |quickstart-script-path-windows| replace:: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/salt-quick-start.ps1
1319
.. |windows-vs-buildtools-script| replace:: https://raw.githubusercontent.com/saltstack/salt/master/pkg/windows/install_vs_buildtools.ps1
1420

15-
.. |release-candidate-version| replace:: RC_RELEASE
16-
.. |bootstrap-release-candidate| replace:: python3 git vRC_RELEASE
17-
.. |pip-install-release-candidate| replace:: pip install salt==RC_RELEASE
21+
.. |release-candidate-version| replace:: RC_FULL_VERSION
22+
.. |bootstrap-release-candidate| replace:: python3 git vRC_FULL_VERSION
23+
.. |pip-install-release-candidate| replace:: pip install salt==RC_FULL_VERSION
1824

19-
.. |macos-amd64-lts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/3006.9/salt-3006.9-py3-x86_64.pkg
20-
.. |macos-arm64-lts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/3006.9/salt-3006.9-py3-arm64.pkg
25+
.. |macos-amd64-one-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/ONE_MINOR/salt-ONE_MINOR-py3-x86_64.pkg
26+
.. |macos-arm64-one-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/ONE_MINOR/salt-ONE_MINOR-py3-arm64.pkg
2127

22-
.. |macos-amd64-sts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/3007.1/salt-3007.1-py3-x86_64.pkg
23-
.. |macos-arm64-sts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/3007.1/salt-3007.1-py3-arm64.pkg
28+
.. |macos-amd64-two-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/TWO_MINOR/salt-TWO_MINOR-py3-x86_64.pkg
29+
.. |macos-arm64-two-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/macos/TWO_MINOR/salt-TWO_MINOR-py3-arm64.pkg
2430

25-
.. |windows-install-exe-example| replace:: Salt-Minion-3006.9-Py3-AMD64-Setup.exe
26-
.. |windows-install-msi-example| replace:: Salt-Minion-3006.9-Py3-AMD64.msi
31+
.. |windows-install-exe-example| replace:: Salt-Minion-ONE_MINOR-Py3-AMD64-Setup.exe
32+
.. |windows-install-msi-example| replace:: Salt-Minion-ONE_MINOR-Py3-AMD64.msi
2733

28-
.. |windows-amd64-exe-lts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3006.9/Salt-Minion-3006.9-Py3-AMD64-Setup.exe
29-
.. |windows-amd64-msi-lts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3006.9/Salt-Minion-3006.9-Py3-AMD64.msi
30-
.. |windows-x86-exe-lts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3006.9/Salt-Minion-3006.9-Py3-x86-Setup.exe
31-
.. |windows-x86-msi-lts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3006.9/Salt-Minion-3006.9-Py3-x86.msi
34+
.. |windows-amd64-exe-one-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/ONE_MINOR/Salt-Minion-ONE_MINOR-Py3-AMD64-Setup.exe
35+
.. |windows-amd64-msi-one-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/ONE_MINOR/Salt-Minion-ONE_MINOR-Py3-AMD64.msi
36+
.. |windows-x86-exe-one-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/ONE_MINOR/Salt-Minion-ONE_MINOR-Py3-x86-Setup.exe
37+
.. |windows-x86-msi-one-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/ONE_MINOR/Salt-Minion-ONE_MINOR-Py3-x86.msi
3238

33-
.. |windows-amd64-exe-sts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3007.1/Salt-Minion-3007.1-Py3-AMD64-Setup.exe
34-
.. |windows-amd64-msi-sts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3007.1/Salt-Minion-3007.1-Py3-AMD64.msi
35-
.. |windows-x86-exe-sts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3007.1/Salt-Minion-3007.1-Py3-x86-Setup.exe
36-
.. |windows-x86-msi-sts-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/3007.1/Salt-Minion-3007.1-Py3-x86.msi
39+
.. |windows-amd64-exe-two-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/TWO_MINOR/Salt-Minion-TWO_MINOR-Py3-AMD64-Setup.exe
40+
.. |windows-amd64-msi-two-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/TWO_MINOR/Salt-Minion-TWO_MINOR-Py3-AMD64.msi
41+
.. |windows-x86-exe-two-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/TWO_MINOR/Salt-Minion-TWO_MINOR-Py3-x86-Setup.exe
42+
.. |windows-x86-msi-two-download| replace:: https://packages.broadcom.com/artifactory/saltproject-generic/windows/TWO_MINOR/Salt-Minion-TWO_MINOR-Py3-x86.msi
3743

3844
.. |windows-release-candidate-amd64-exe-file-name| replace:: TBD
3945
.. |windows-release-candidate-amd64-exe-url| replace:: TBD

docs/conf.py

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import datetime
1717
import os
1818

19-
import requests
19+
# import requests
2020
from docutils import nodes
2121
from docutils.nodes import Element
2222
from sphinx.writers.html import HTMLTranslator
@@ -93,39 +93,12 @@ def setup(app):
9393
)
9494

9595
# Pull release from "release" in sitevars.rst
96-
release = [s for s in site_vars if "|minor-lts-version|" in s][0].split(":: ")[1]
96+
release = [s for s in site_vars if "|minor-one-version|" in s][0].split(":: ")[1]
9797
version = release
9898

9999
# Grab major version for URL version selector generation
100100
current_version = version.split(".")[0]
101101

102-
##
103-
# Furo theme version selector setup
104-
##
105-
# Pull from JSON in GitLab Snippet
106-
"""
107-
supported_versions_json = requests.get(
108-
"https://gitlab.com/saltstack/open/docs/salt-install-guide/-/snippets/2580440/raw/main/supported-versions.json"
109-
)
110-
supported_versions = supported_versions_json.json()
111-
supported_major_versions = [
112-
full_version.split(".")[0]
113-
for full_version in supported_versions["supported_versions"]
114-
]
115-
supported_major_versions.sort()
116-
117-
# Build out version menu
118-
latest_version = supported_versions["latest_version"].split(".")[0]
119-
versions = supported_major_versions
120-
url_prefix = "https://docs.saltproject.io/salt/install-guide/en/"
121-
html_context = make_html_context(
122-
url_prefix=url_prefix,
123-
current_version=current_version,
124-
latest_version=latest_version,
125-
versions=versions,
126-
)
127-
"""
128-
129102
# -- General configuration ---------------------------------------------------
130103

131104
# Add any Sphinx extension module names here, as strings. They can be
@@ -182,7 +155,7 @@ def setup(app):
182155
"color-brand-primary": "#66CCF4",
183156
"color-brand-content": "#66CCF4",
184157
},
185-
"announcement": '<font color="orange"><strong>IMPORTANT ANNOUNCEMENT:</strong> repo.saltproject.io has migrated to packages.broadcom.com!<br /><strong><a href="https://saltproject.io/blog/post-migration-salt-project-faqs/" target="_blank" rel="noopener noreferrer">Click here for latest update (2024-11-22)</a></strong></font>',
158+
"announcement": '<font color="orange"><strong>IMPORTANT ANNOUNCEMENT:</strong> repo.saltproject.io has migrated to packages.broadcom.com!<br /><strong><a href="https://saltproject.io/blog/post-migration-salt-project-faqs/" target="_blank" rel="noopener noreferrer">Click here for migration FAQs (2024-11-22)</a></strong></font>',
186159
}
187160

188161
# Add any paths that contain custom static files (such as style sheets) here,

docs/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
furo>=2024.8.6
2-
requests>=2.31.0
32
sphinx-copybutton>=0.5.2
43
sphinx-design>=0.5.0
54
sphinx-inline-tabs>=2023.4.21

docs/sitevars.rst

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)