Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3006.x] Use jinja templating for the release notes #64023

Merged
merged 5 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,13 @@ jobs:
shell: bash
if: ${{ startsWith(github.event.ref, 'refs/tags') == false }}
run: |
tools changelog update-release-notes --draft
tools changelog update-release-notes
if [ "${{ contains(fromJSON('["master"]'), github.ref_name) }}" == "true" ]; then
tools changelog update-release-notes --draft --next-release
tools changelog update-release-notes --next-release
else
tools changelog update-release-notes --draft
tools changelog update-release-notes
fi

- name: Generate MAN Pages
shell: bash
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/templates/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,18 @@ on:
shell: bash
if: ${{ startsWith(github.event.ref, 'refs/tags') == false }}
run: |
<%- if gh_environment == 'nightly' %>
if [ "${{ contains(fromJSON('["master"]'), github.ref_name) }}" == "true" ]; then
tools changelog update-release-notes --draft <%- if prepare_actual_release %> --release <%- endif %> --next-release
tools changelog update-release-notes <%- if prepare_actual_release %> --release <%- endif %> --next-release
else
tools changelog update-release-notes --draft <%- if prepare_actual_release %> --release <%- endif %>
tools changelog update-release-notes <%- if prepare_actual_release %> --release <%- endif %>
fi
<%- else %>
tools changelog update-release-notes --draft <%- if prepare_actual_release %> --release <%- endif %>
tools changelog update-release-notes <%- if prepare_actual_release %> --release <%- endif %>
<%- endif %>

- name: Generate MAN Pages
shell: bash
Expand Down
71 changes: 71 additions & 0 deletions doc/topics/development/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. _releasenotes:

=============
Release Notes
=============

You can edit the release notes to highlight a new feature being added
to a given release. The release notes are templatized with Jinja and
are generated at release time.


.. _edit-release-note:

How do I edit the release notes
-------------------------------

To edit the release notes you need to look in doc/topics/releases/templates
for your given release and edit the template. Do not edit the release note
files in doc/topics/releases/, as this will be written over with the content
in the template file. For example, if you want to add content to the 3006.0
release notes you would edit the doc/topics/releases/templates/3006.0.md.template
file. Do not edit the changelog portion of the template file, since that is
auto generated with the content generated for the changelog for each release.
Ch3LL marked this conversation as resolved.
Show resolved Hide resolved


How to generate the release notes
---------------------------------

This step is only used when we need to generate the release notes before releasing.
You should NOT need to run these steps as they are ran in the pipeline, but this
is documented so you can test your changes to the release notes template.

You will need the `tools` commdan to help run the command. The instructions below
will detail how to install and use `tools`.


Installing `tools`
..................

.. code-block: bash

python -m pip install -r requirements/static/ci/py3.10/tools.txt


To view the output the release notes will produce before generating them
you can run `tools` in draft mode:

.. code-block:: bash

tools changelog update-release-notes --draft

To generate the release notes just remove the `--draft` argument:

.. code-block:: bash

tools changelog update-release-notes


To specify a specific Salt version you add that version as an argument:

.. code-block:: bash

tools changelog update-release-notes 3006.0


To only generate the template for a new release


.. code-block:: bash

tools changelog update-release-notes --template-only
s0undt3ch marked this conversation as resolved.
Show resolved Hide resolved
Loading